/*
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;
	--sport1-color-font-primary: #000;
}

body {
	background-color: #f1f0f5;
}

/* Author archive. */
.sport1-author-page {
	background: #fff;
	max-width: none;
	padding: 48px 24px 64px;
	width: 100%;
}

.archive .sport1-author-page .site-main {
	width: 100%;
}

.sport1-author-page__wrap {
	margin: 0 auto;
	max-width: 1041px;
}

.sport1-author-page__profile {
	align-items: center;
	border-bottom: 1px solid #ddd;
	display: flex;
	gap: 32px;
	margin-bottom: 40px;
	padding-bottom: 40px;
}

.sport1-author-page__image {
	align-items: center;
	background: #f1f0f5;
	border-radius: 50%;
	display: flex;
	flex: 0 0 160px;
	height: 160px;
	justify-content: center;
	overflow: hidden;
}

.sport1-author-page__avatar {
	display: block;
	height: 160px;
	object-fit: cover;
	width: 160px;
}

.sport1-author-page__avatar--fallback {
	height: auto;
	object-fit: contain;
	padding: 32px;
}

.sport1-author-page__title {
	font-family: var(--wp--preset--font-family--barlow-bold);
	font-size: clamp(32px, 5vw, 48px);
	line-height: 1.1;
	margin: 0;
}

.sport1-author-page__description {
	font-size: 18px;
	line-height: 1.5;
	margin-top: 16px;
}

.sport1-author-page__description > :last-child {
	margin-bottom: 0;
}

.sport1-author-page__posts > h2 {
	font-family: var(--wp--preset--font-family--barlow-bold);
	font-size: 28px;
	margin: 0 0 24px;
}

@media (max-width: 599px) {

	.sport1-author-page {
		padding: 32px 16px 48px;
	}

	.sport1-author-page__profile {
		align-items: flex-start;
		flex-direction: column;
		gap: 20px;
		margin-bottom: 32px;
		padding-bottom: 32px;
	}

	.sport1-author-page__image,
	.sport1-author-page__avatar {
		flex-basis: 120px;
		height: 120px;
		width: 120px;
	}

	.sport1-author-page__avatar--fallback {
		height: auto;
		padding: 24px;
	}
}

/* SPORT1 footer. */
.sport1-footer {
	background: #fff;
	color: var(--sport1-color-font-primary);
	font-family: var(--wp--preset--font-family--barlow-regular);
	margin-top: 36px;
	padding: 24px;
}

.sport1-footer a,
.sport1-footer a:hover,
.sport1-footer a:focus {
	color: inherit;
}

.sport1-footer__inner {
	margin: 0 auto;
	max-width: 1100px;
}

.sport1-footer__header {
	align-items: center;
	display: flex;
	justify-content: space-between;
}

.sport1-footer__logo {
	display: block;
	width: 72px;
}

.sport1-footer__logo img {
	display: block;
	height: auto;
	width: 100%;
}

.sport1-footer__social ul {
	display: flex;
	gap: 16px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.sport1-footer__social a {
	align-items: center;
	border: 1px solid #e5e5e5;
	border-radius: 50%;
	display: flex;
	height: 44px;
	justify-content: center;
	width: 44px;
}

.sport1-footer__social img {
	display: block;
	height: 24px;
	width: 24px;
}

.sport1-footer__main {
	display: grid;
	gap: 32px;
	grid-template-columns: minmax(0, 1fr) 170px;
	padding: 24px 0;
}

.sport1-footer__navigation-list {
	display: grid;
	gap: 24px;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	list-style: none;
	margin: 0;
	padding: 0;
}

.sport1-footer__navigation-list > .menu-item > a {
	display: block;
	font-family: var(--wp--preset--font-family--barlow-bold);
	font-size: 16px;
	font-weight: 700;
	line-height: 20px;
	margin-bottom: 8px;
}

.sport1-footer__navigation-list .sub-menu {
	list-style: none;
	margin: 0;
	padding: 0;
}

.sport1-footer__navigation-list .sub-menu li + li {
	margin-top: 4px;
}

.sport1-footer__navigation-list .sub-menu a {
	font-family: var(--wp--preset--font-family--barlow-regular);
	font-size: 14px;
	font-style: normal;
	font-weight: 400;
	line-height: 20px;
}

.sport1-footer__section h2,
.sport1-footer__apps h2 {
	font-family: var(--wp--preset--font-family--barlow-bold);
	font-size: 16px;
	font-weight: 700;
	line-height: 20px;
	margin: 0 0 8px;
}

.sport1-footer__section ul,
.sport1-footer__partners {
	list-style: none;
	margin: 0;
	padding: 0;
}

.sport1-footer__section li + li {
	margin-top: 4px;
}

.sport1-footer__section a {
	font-family: var(--wp--preset--font-family--barlow-regular);
	font-size: 14px;
	font-style: normal;
	font-weight: 400;
	line-height: 20px;
}

.sport1-footer__app-badges {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.sport1-footer__app-badges a,
.sport1-footer__app-badges img {
	display: block;
}

.sport1-footer__app-badges img {
	height: 42px;
	width: 140px;
}

.sport1-footer__partners {
	display: grid;
	gap: 16px;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	padding: 24px 0;
}

.sport1-footer__partners a {
	align-items: center;
	background: #f4f3f7;
	border-radius: 8px;
	display: flex;
	height: 60px;
	justify-content: center;
	overflow: hidden;
}

.sport1-footer__partners img {
	display: block;
	height: 100%;
	object-fit: contain;
	width: 100%;
}

.sport1-footer__legal {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 24px;
	justify-content: center;
	padding: 0 0 24px;
}

.sport1-footer__legal a,
.sport1-footer__legal button {
	background: transparent;
	border: 0;
	color: var(--sport1-color-font-primary);
	cursor: pointer;
	font-family: var(--wp--preset--font-family--barlow-regular);
	font-size: 12px;
	font-style: normal;
	font-weight: 400;
	line-height: 18px;
	margin: 0;
	padding: 0;
	text-align: left;
	text-transform: none;
}

.sport1-footer__copyright {
	font-family: var(--wp--preset--font-family--barlow-regular);
	font-size: 10px;
	font-style: normal;
	font-weight: 400;
	line-height: 14px;
	margin: 0;
	text-align: center;
}

@media (max-width: 1023px) {
	.sport1-footer {
		padding: 24px;
	}

	.sport1-footer__inner {
		max-width: 760px;
	}

	.sport1-footer__main {
		display: block;
	}

	.sport1-footer__apps {
		margin-top: 24px;
	}

	.sport1-footer__app-badges {
		flex-direction: row;
		gap: 16px;
	}

	.sport1-footer__partners {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

@media (max-width: 600px) {
	.sport1-footer {
		margin-top: 24px;
		padding: 24px 20px 16px;
	}

	.sport1-footer__header {
		border-bottom: 1px solid #e5e5e5;
		flex-direction: column;
		gap: 16px;
		padding-bottom: 16px;
	}

	.sport1-footer__logo {
		width: 64px;
	}

	.sport1-footer__social ul {
		gap: 20px;
	}

	.sport1-footer__social a {
		height: 40px;
		width: 40px;
	}

	.sport1-footer__social img {
		height: 20px;
		width: 20px;
	}

	.sport1-footer__main {
		padding: 16px 0;
	}

	.sport1-footer__navigation-list {
		gap: 18px;
		grid-template-columns: 1fr;
	}

	.sport1-footer__navigation-list > .menu-item > a,
	.sport1-footer__section h2,
	.sport1-footer__apps h2 {
		font-size: 14px;
		line-height: 18px;
	}

	.sport1-footer__navigation-list .sub-menu a,
	.sport1-footer__section a {
		font-size: 12px;
		line-height: 18px;
	}

	.sport1-footer__apps {
		margin-top: 18px;
	}

	.sport1-footer__app-badges {
		display: grid;
		gap: 12px;
		grid-template-columns: repeat(2, minmax(0, 140px));
	}

	.sport1-footer__app-badges img {
		height: auto;
		max-width: 140px;
		width: 100%;
	}

	.sport1-footer__partners {
		border-top: 1px solid #e5e5e5;
		gap: 12px;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		padding: 16px 0;
	}

	.sport1-footer__partners a {
		height: 54px;
	}

	.sport1-footer__legal {
		border-bottom: 1px solid #e5e5e5;
		border-top: 1px solid #e5e5e5;
		gap: 8px 16px;
		padding: 16px 0;
	}

	.sport1-footer__legal a,
	.sport1-footer__legal button {
		font-size: 10px;
		line-height: 16px;
	}

	.sport1-footer__copyright {
		font-size: 8px;
		line-height: 12px;
		padding-top: 16px;
	}
}

/* The Pubstack ad unit uses the custom format, so the site owns its sticky
 * positioning and controls. Creatives are at most 320px wide and 100px high. */
.sport1-mobile-sticky-ad {
	background: #f4f3f7;
	display: flex;
	align-items: center;
	justify-content: center;
	position: fixed;
	left: 50%;
	width: 100%;
	max-height: 100px;
	bottom: var(--sport1-mobile-nav-height, 62px) !important;
	text-align: center;
	transform: translateX(-50%);
	visibility: hidden;
	z-index: 1000;
}

.sport1-mobile-sticky-ad > div {
	background: #fff;
	max-width: 320px;
	width: 100%;
}

.sport1-mobile-sticky-ad--filled {
	visibility: visible;
}

.sport1-mobile-sticky-ad__label {
	background: transparent;
	color: #555;
	display: none;
	font-family: Arial, sans-serif;
	font-size: 9px;
	height: 100%;
	justify-content: center;
	left: calc(50% - 188px);
	line-height: 16px;
	position: absolute;
	top: 50%;
	transform: translateY(-50%) rotate(180deg);
	width: 28px;
	writing-mode: vertical-rl;
	z-index: 1;
}

@media (min-width: 376px) {
	.sport1-mobile-sticky-ad__label {
		display: flex;
	}
}

.sport1-mobile-sticky-ad__close {
	align-items: center;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 50%;
	box-shadow: 0 2px 6px rgb(0 0 0 / 15%);
	color: #222;
	cursor: pointer;
	display: flex;
	font-family: Arial, sans-serif;
	font-size: 22px;
	height: 40px;
	justify-content: center;
	line-height: 1;
	padding: 0;
	position: absolute;
	right: max(8px, calc(50% - 196px));
	top: -26px;
	width: 40px;
	z-index: 1;
}

.sport1-mobile-sticky-ad__close:focus-visible {
	outline: 2px solid #106bfe;
	outline-offset: -2px;
}

/* 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;
}

.entry-content a {
	text-decoration: none;
	color: #000;
}

/* Dynamic team page. */
.sport1-team-page {
	width: 100%;
}

.sport1-team-page__header {
	display: flex;
	align-items: center;
	gap: 20px;
	margin-bottom: 24px;
	padding: 24px;
	border-radius: 12px;
	background: #fff;
}

.sport1-team-page__logo {
	width: 96px;
	height: 96px;
	object-fit: contain;
}

.sport1-team-page__name {
	margin: 0;
}

@media (max-width: 600px) {
	.sport1-team-page__header {
		align-items: flex-start;
	}

	.sport1-team-page__logo {
		width: 72px;
		height: 72px;
	}
}
