/*
Theme Name: Newspack Sport1
Theme URI: https://github.com/wpcomvip/sport1
Template: newspack-theme
Author: Damian Zamojski
Author URI: https://www.sport1.de/
Description: Child theme for Newspack, customized for Sport1 needs.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: newspack-sport1-theme
Tags: Newspack, Child Theme, Sport
*/

/* ---------------------------------------------------------------------------
   Single-article page styles now live in the sport1-blocks plugin:
   plugins/sport1-blocks/src/article/*.scss → build/article/article.css,
   enqueued on is_singular(['post','video']). What remains in this file is
   genuinely global: resets, the shared video-teaser overlay (rendered in
   teasers across every page type), and ad-slot styling.
   --------------------------------------------------------------------------- */

:root {
	--newspack-theme-font-body: "Barlow Regular", sans-serif;
	--newspack-theme-font-heading: "Barlow Regular", sans-serif;
}

body {
	background-color: #f1f0f5;
}

/* Override parent theme's global a:hover underline.
   Specific components that intentionally use underline (breadcrumb, author)
   keep it via their own more-specific selectors. */
a:hover,
a:focus {
	text-decoration: none;
}

/* Teaser card / article title links — no underline on hover.
   !important needed: parent theme sets .entry-content a { text-decoration: underline }
   and newspack-blocks inline styles may load after external sheets. */
.entry-title a,
.entry-title a:hover,
.entry-title a:focus,
.wpnbha .entry-title a,
.wpnbha .entry-title a:hover,
.wpnbha .entry-title a:focus,
.sport1-weitere-news-section .entry-title a,
.sport1-weitere-news-section .entry-title a:hover,
.sport1-weitere-news-section .entry-title a:focus {
	text-decoration: none !important;
}

.rm-top-margin {
	margin-top: -35px;
}

.sport1-video-play-icon--fontello {
    align-items: center;
    color: #fff;
    display: flex;
    justify-content: center;
    line-height: 1;
}

.sport1-video-play-btn.sport1-video-play-btn--autoplay,
.sport1-video-play-btn--sm.sport1-video-play-btn--autoplay {
    background: #000;
}

.sport1-video-play-icon--fontello .icon-play_arrow,
.sport1-video-play-icon--fontello .icon-autoplay {
    align-items: center;
    display: inline-flex;
    justify-content: center;
    line-height: 1;
}

.sport1-video-play-icon--fontello .icon-play_arrow:before,
.sport1-video-play-icon--fontello .icon-autoplay:before {
	line-height: 1;
	margin: 0;
	width: auto;
}

/* ── Video thumbnail overlay for teaser cards ───────────────────────────── */
.sport1-video-teaser-wrap {
	position: relative;
	display: block;
	line-height: 0;
}

.sport1-video-teaser-wrap img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.sport1-video-teaser-overlay {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

/* Smaller play button variant for teaser thumbnails */
.sport1-video-play-btn--sm {
	position: absolute;
	bottom: 10px;
	left: 10px;
	width: 48px;
	height: 48px;
	background: #106bfe;
	display: flex;
	align-items: center;
	justify-content: center;
}

.sport1-video-play-btn--sm .sport1-video-play-icon {
	display: flex;
	align-items: center;
	justify-content: center;
}

.sport1-video-play-btn--sm .sport1-video-play-icon svg,
.sport1-video-play-btn--sm .sport1-video-play-icon--fontello .icon-autoplay {
    width: 14px;
    height: 18px;
    fill: #fff;
    color: #fff;
    font-size: 18px;
    margin-left: 2px;
}

.sport1-video-play-btn--sm .sport1-video-play-icon--fontello .icon-play_arrow:before,
.sport1-video-play-btn--sm .sport1-video-play-icon--fontello .icon-autoplay:before {
    line-height: 1;
    margin: 0;
    width: auto;
}

.sport1-video-play-btn--sm .sport1-video-play-icon--fontello .icon-play_arrow {
    width: 36px;
    height: 36px;
    color: #fff;
    font-size: 36px;
    line-height: 1;
    margin-left: 0;
}

.entry .entry-content > .wp-block-group.alignwide + .wp-block-group.alignwide,
[id="pico"] > .wp-block-group.alignwide + .wp-block-group.alignwide {
    margin-top: 32px;
}

@media (min-width: 1025px) {
    .sport1-video-play-btn--sm.sport1-video-play-btn--autoplay {
        width: 48px;
        height: 48px;
    }

    .sport1-video-play-btn--sm.sport1-video-play-btn--autoplay .sport1-video-play-icon--fontello .icon-autoplay {
        width: 36px;
        height: 36px;
        font-size: 36px;
        margin-left: 0;
    }
}

/* Duration badge — base styles copied from video/style.css so the badge is available
   on pages where the video block is not rendered (e.g. home page teaser thumbnails). */
.sport1-video-duration-badge {
	position: absolute;
	bottom: 24px;
	right: 16px;
	background: #fff;
	padding: 2px 6px 2px 4px;
	height: 22px;
	display: flex;
	align-items: center;
	font-family: "Barlow SC Black Italic", sans-serif;
	font-weight: 900;
	font-size: 14px;
	font-style: italic;
	text-transform: uppercase;
	line-height: 18px;
	color: #000;
	pointer-events: none;
	box-sizing: border-box;
}

/* ── Ad slot base classes ── */

.sport1-ad {
	box-sizing: border-box;
}

.sport1-ad--placeholder {
	border: 1px solid #e5e5e5;
	border-radius: 12px;
	background: #f1f0f5;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: sans-serif;
	color: #999;
	font-size: 13px;
	width: 100%;
}

.sport1-ad--placeholder::before {
	content: "Werbung";
}

/* ── Ad preview mode (?ads_preview=1, admin only) ──
   Adds visible labelled placeholders for every ad slot so the layout can be
   verified on staging before Pubstack is whitelisted.
   These rules apply only when <body class="sport1-ads-preview"> is present. ── */

.sport1-ads-preview .sport1-sky-small,
.sport1-ads-preview .sport1-sky-large {
	background: #f1f0f5;
	border: 2px dashed #bbb;
	border-radius: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: sans-serif;
	font-size: 11px;
	color: #888;
	text-align: center;
	line-height: 1.4;
}

.sport1-ads-preview .sport1-sky-small {
	width: 160px;
	height: 600px;
}

.sport1-ads-preview .sport1-sky-small::after {
	content: "sky1small / sky2small\A 160×600";
	white-space: pre;
}

.sport1-ads-preview .sport1-sky-large {
	width: 300px;
	height: 600px;
}

.sport1-ads-preview .sport1-sky-large::after {
	content: "sky1 / sky2\A 300×600";
	white-space: pre;
}

.sport1-ads-preview .sport1-top-leaderboard {
	outline: 2px dashed #bbb;
	outline-offset: -4px;
	min-height: 250px;
	align-items: center;
	justify-content: center;
	font-family: sans-serif;
	font-size: 11px;
	color: #888;
}

.sport1-ads-preview .sport1-top-leaderboard::after {
	content: "banner1 leaderboard\A 970×250";
	white-space: pre;
	text-align: center;
	line-height: 1.4;
}

/* overriding styles globally */

p {
	margin-block: 0;
}

table td,
table th {
	border: none;
	word-break: normal;
	padding: 0;
}

table {
	margin: 0;
	border-collapse: collapse;
}
