/*
 * Banners (inc/banners.php): the custom format, HTML banners, the mobile sticky bar.
 * Loaded on the site and in WP admin → Banners (previews). Colours come per banner as --bn-* variables.
 */

/* Custom format: logo, text, button; the 21+ bar hangs under the box. .fl-bn-c is the container the narrow layout queries. */
.fl-bn-c { container-type: inline-size; padding-bottom: 22px; text-align: left; }
.fl-bn {
	position: relative; display: block; padding: 34px 20px; border-radius: 8px 8px 0 0;
	background: var(--bn-bg); color: var(--bn-text); text-decoration: none !important;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .15); font-family: Manrope, "Segoe UI", Arial, sans-serif;
}
.fl-bn__body { display: grid; grid-template-columns: 100px 1fr 140px; align-items: center; column-gap: 12px; }
.fl-bn__logo { display: block; width: 100px; height: 50px; margin: 0; object-fit: contain; border-radius: 0 !important; }
.fl-bn__text { padding: 0 10px; color: var(--bn-text); font: 700 15px/1.35 Manrope, "Segoe UI", Arial, sans-serif; letter-spacing: .06em; text-transform: uppercase; text-align: center; }
.fl-bn__btn {
	display: block; padding: 11px 10px; border-radius: 8px; background: var(--bn-btn-bg); color: var(--bn-btn-text);
	font: 800 14px/20px Manrope, "Segoe UI", Arial, sans-serif; letter-spacing: .04em; text-transform: uppercase; text-align: center;
	transition: background .15s, color .15s;
}
.fl-bn:hover .fl-bn__btn { background: var(--bn-btn-hover-bg); color: var(--bn-btn-hover-text); }
.fl-bn small { position: absolute; line-height: normal; }
.fl-bn__terms { right: 22px; bottom: 8px; font: 600 8px Verdana, sans-serif; color: var(--bn-terms); }
.fl-bn__note {
	left: 0; right: 0; bottom: -20px; padding: 5px 0; border-radius: 0 0 8px 8px;
	display: flex; align-items: center; justify-content: center; gap: 5px;
	background: var(--bn-disclaimer-bg); color: var(--bn-disclaimer-text); font: 9px Verdana, sans-serif; text-align: center;
}
/* The ΕΕΕΠ symbol, in the colour of the text around it. */
.fl-eeep-sym {
	display: inline-block; flex: none; width: 1.6em; height: 1.6em; background: currentColor;
	-webkit-mask: url(../img/rg/eeep-mark.png) center / contain no-repeat; mask: url(../img/rg/eeep-mark.png) center / contain no-repeat;
}

/* Narrow (sidebar, phones): logo and button on one row, the text under them. */
@container (max-width: 420px) {
	.fl-bn { padding: 14px 15px 26px; }
	.fl-bn__body { grid-template-columns: auto 1fr; grid-template-areas: "logo btn" "text text"; row-gap: 10px; }
	.fl-bn__logo { grid-area: logo; }
	.fl-bn__btn { grid-area: btn; justify-self: end; padding: 10px 14px; }
	.fl-bn__text { grid-area: text; padding: 0; font-size: 14px; }
	.fl-bn__terms { left: 0; right: 0; bottom: 8px; text-align: center; }
}

/* HTML banners: as pasted, shrunk to fit. */
.fl-bn-html { text-align: center; overflow: hidden; }
.fl-bn-html img { display: inline-block; max-width: 100%; height: auto; vertical-align: middle; }
.fl-bn-html iframe { max-width: 100%; }

/* Image banners: centred, shrunk to fit (an animated gif plays as is). */
.fl-bn-img { display: block; text-align: center; line-height: 0; }
.fl-bn-img img { display: inline-block; max-width: 100%; height: auto; }

/* In the theme's ad boxes: a custom banner is as wide as its box; no 300×250 placeholder height. */
.fl-ad--leader.fl-ad--custom .fl-bn-c, .fl-ad--leader.fl-ad--html .fl-bn-html, .fl-ad--leader.fl-ad--image .fl-bn-img { max-width: 970px; margin: 0 auto; }
.fl-ad--m.fl-ad--custom, .fl-ad--m.fl-ad--image { width: 100%; min-height: 0; }
.fl-bn-inline { margin: 24px 0; }
.fl-bn-inline.fl-bn-html, .fl-bn-inline.fl-bn-img { margin: 24px 0; }

/* Mobile sticky bar (phones only); × hides it. */
.fl-bn-sticky { display: none; }
@media (max-width: 820px) {
	.fl-bn-sticky {
		display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 99;
		background: #fff; box-shadow: 0 -2px 12px rgba(0, 0, 0, .25); padding-bottom: env(safe-area-inset-bottom);
	}
	.fl-bn-sticky--html, .fl-bn-sticky--image { padding-top: 5px; padding-bottom: calc(5px + env(safe-area-inset-bottom)); }
	.fl-bn-sticky__close {
		position: absolute; right: 8px; top: -30px; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%;
		background: #0a192f; color: #fff; font-size: 20px; line-height: 28px; text-align: center;
		box-shadow: 0 1px 6px rgba(0, 0, 0, .3); cursor: pointer;
	}
	.fl-bn-sticky .fl-bn { border-radius: 0; padding: 8px 12px 16px; box-shadow: none; }
	.fl-bn-sticky .fl-bn__body { grid-template-columns: 64px 1fr auto; grid-template-areas: none; column-gap: 10px; row-gap: 0; }
	.fl-bn-sticky .fl-bn__logo { grid-area: auto; width: 64px; height: 32px; }
	.fl-bn-sticky .fl-bn__text { grid-area: auto; padding: 0; font-size: 12px; line-height: 15px; letter-spacing: .03em; text-align: left; }
	.fl-bn-sticky .fl-bn__btn { grid-area: auto; padding: 8px 12px; font-size: 13px; }
	.fl-bn-sticky .fl-bn__terms { left: auto; right: 12px; bottom: 2px; }
}

/* -------------------------------------------------------------------------
   Sponsor banners (type 'sponsor'): the «Ευρώπη Ασφαλιστική» formats of the Listing mockup.
   Colours per banner: --sp-bg, --sp-text, --sp-btn-bg, --sp-btn-text, --sp-powered-bg.
   ------------------------------------------------------------------------- */
.fl-sp {
	display: block; position: relative; overflow: hidden; border-radius: 6px;
	background: radial-gradient(120% 60% at 100% 0, rgba(120, 140, 230, .35), transparent 55%), var(--sp-bg);
	color: var(--sp-text); font-family: Manrope, "Segoe UI", Arial, sans-serif; text-align: left; text-decoration: none !important;
	box-shadow: 0 2px 8px rgba(15, 23, 42, .12);
}
.fl-sp:hover { color: var(--sp-text); }
.fl-sp__logo { display: block; max-width: 100%; height: auto; margin: 0; border-radius: 0 !important; }
.fl-sp__logo--text { font: 800 22px/1.1 Manrope, "Segoe UI", Arial, sans-serif; text-transform: uppercase; }
.fl-sp__btn {
	display: block; padding: 13px 18px; border-radius: 4px; background: var(--sp-btn-bg); color: var(--sp-btn-text);
	font: 800 15px/1.2 Manrope, "Segoe UI", Arial, sans-serif; letter-spacing: .02em; text-transform: uppercase; text-align: center;
	transition: filter .15s;
}
.fl-sp:hover .fl-sp__btn { filter: brightness(1.35); }
.fl-sp__headline:empty, .fl-sp__text:empty, .fl-sp__note:empty, .fl-sp__name:empty { display: none; }

/* Card: left column. */
.fl-sp--card { display: flex; flex-direction: column; padding: 22px 20px 16px; }
.fl-sp--card .fl-sp__logo { width: 100%; max-width: 260px; max-height: 110px; object-fit: contain; object-position: left center; margin-bottom: 22px; }
.fl-sp__meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.fl-sp__kicker { padding: 4px 8px; border-radius: 3px; background: rgba(0, 0, 0, .35); font: 600 10px/1.2 Manrope, "Segoe UI", Arial, sans-serif; letter-spacing: .04em; text-transform: uppercase; }
.fl-sp__kicker:empty { visibility: hidden; }
.fl-sp__advert { font: 500 10px Manrope, "Segoe UI", Arial, sans-serif; letter-spacing: .04em; opacity: .65; }
.fl-sp__name { font: 800 17px/1.25 Manrope, "Segoe UI", Arial, sans-serif; text-transform: uppercase; }
.fl-sp--card .fl-sp__headline { margin-top: 4px; font: 800 13px/1.6 Manrope, "Segoe UI", Arial, sans-serif; text-transform: uppercase; }
.fl-sp__text { margin-top: 8px; font: 400 14px/1.65 Manrope, "Segoe UI", Arial, sans-serif; opacity: .78; white-space: pre-line; }
.fl-sp--card .fl-sp__btn { margin-top: 30px; }
.fl-sp__note { margin-top: 10px; font: 500 8px/1.4 Manrope, "Segoe UI", Arial, sans-serif; letter-spacing: .04em; text-align: center; text-transform: uppercase; opacity: .6; }

/* Box: the logo in a square, right column. */
.fl-sp--box { display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / .85; padding: 12%; }
.fl-sp--box .fl-sp__logo { max-height: 100%; object-fit: contain; }

/* Strip: logo, «SPONSORED BY» + title, button; in a list, an article, the site's other positions. */
.fl-sp--strip { display: grid; grid-template-columns: 110px 1fr auto; align-items: center; gap: 22px; padding: 18px 22px; }
.fl-sp--strip .fl-sp__logo { max-height: 56px; object-fit: contain; }
.fl-sp__copy { min-width: 0; }
.fl-sp__by { display: block; margin-bottom: 4px; font: 500 11px/1.3 Manrope, "Segoe UI", Arial, sans-serif; letter-spacing: .03em; text-transform: uppercase; }
.fl-sp--strip .fl-sp__headline { display: block; font: 800 15px/1.55 Manrope, "Segoe UI", Arial, sans-serif; text-transform: uppercase; }
.fl-sp--strip .fl-sp__btn { padding: 13px 22px; white-space: nowrap; }
@container (max-width: 520px) {
	.fl-sp--strip { grid-template-columns: 80px 1fr; gap: 12px 16px; padding: 16px; }
	.fl-sp--strip .fl-sp__btn { grid-column: 1 / -1; }
}

/* «POWERED BY» next to a title. */
.fl-sp-powered { display: inline-flex; align-items: center; gap: 12px; color: var(--muted, #64748b); text-decoration: none !important; }
.fl-sp-powered__by { font: 500 11px Manrope, "Segoe UI", Arial, sans-serif; letter-spacing: .06em; white-space: nowrap; }
.fl-sp-powered__logo { display: flex; align-items: center; height: 52px; padding: 4px 10px; border-radius: 4px; background: var(--sp-powered-bg); }
.fl-sp-powered__logo.is-dark { background: var(--sp-bg); color: var(--sp-text); }
.fl-sp-powered .fl-sp__logo { width: auto; max-width: 150px; max-height: 44px; object-fit: contain; }
.fl-sp-powered .fl-sp__logo--text { font-size: 14px; }

/* Team page positions (inc/banners.php flnews_banner_team_slot()). */
.fl-page-head__sponsor { margin-left: auto; }
.fl-ad--team-left { margin-bottom: 28px; }
.fl-ad--team-inline { container-type: inline-size; margin: 6px 0 22px; }
.fl-ad--box .fl-bn-c, .fl-ad--box .fl-sp { margin-bottom: 0; }
@media (max-width: 820px) {
	.fl-page-head__sponsor .fl-sp-powered__by { display: none; }
	.fl-page-head__sponsor .fl-sp-powered__logo { height: 40px; }
	.fl-listing .fl-ad--team-left { order: 3; }
	.fl-listing .fl-ad--team-left .fl-sp--card { max-width: 420px; margin: 0 auto; }
}
