/* Affiliate Engine — front end. Override the variables in your theme's Customizer → Additional CSS. */
:root {
	--aee-accent: #e5254b;
	--aee-accent-ink: #fff;
	--aee-surface: #16161a;
	--aee-surface-2: #212128;
	--aee-ink: #ececf1;
	--aee-muted: #9a9aa6;
	--aee-radius: 10px;
	--aee-gap: 16px;
}

.aee-wrap { max-width: 1280px; margin: 0 auto; padding: 16px; box-sizing: border-box; }
.aee-title { font-size: clamp(1.4rem, 1.1rem + 1.4vw, 2.1rem); line-height: 1.2; margin: 8px 0; }
.aee-meta, .aee-crumbs { color: var(--aee-muted); font-size: .9rem; margin: 0 0 12px; }
.aee-crumbs a { color: inherit; }

/* Player */
.aee-player { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: var(--aee-radius); overflow: hidden; }
.aee-player iframe, .aee-player video, .aee-player > * { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.aee-player__fallback img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.55); }
.aee-player__fallback .aee-btn { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: 1.1rem; }

/* Buttons */
.aee-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border-radius: 999px; border: 1px solid currentColor; background: transparent; color: inherit; font-weight: 600; text-decoration: none; cursor: pointer; font-size: 1rem; line-height: 1.2; }
.aee-btn--primary, button.aee-btn--primary, .aee-agegate .aee-btn--primary { background: var(--aee-accent) !important; border-color: var(--aee-accent) !important; color: var(--aee-accent-ink) !important; }
.aee-btn:focus-visible { outline: 2px solid var(--aee-ink); outline-offset: 2px; }
.aee-btn--primary:hover { filter: brightness(1.1); }
.aee-cta-row { display: flex; justify-content: center; margin: 16px 0; }
.aee-btn--cta { min-width: min(100%, 320px); font-size: 1.1rem; padding: 14px 28px; }

/* Ad slots */
.aee-slot { position: relative; margin: 16px auto; text-align: center; max-width: 100%; overflow: hidden; }
.aee-slot img { max-width: 100%; height: auto; display: inline-block; border-radius: 6px; }
.aee-slot__label { display: block; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--aee-muted); margin-bottom: 4px; }
.aee-slot--header { margin: 8px auto; }

/* Grid & cards */
.aee-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--aee-gap); margin: 16px 0 24px; }
.aee-card { min-width: 0; }
.aee-card__link { color: inherit; text-decoration: none; display: block; }
.aee-card__thumb { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--aee-surface-2); border-radius: var(--aee-radius); overflow: hidden; }
.aee-card__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s ease; }
.aee-card__link:hover img { transform: scale(1.04); }
.aee-card__dur { position: absolute; right: 8px; bottom: 8px; background: rgba(0, 0, 0, .78); color: #fff; font-size: 12px; font-weight: 600; padding: 2px 6px; border-radius: 4px; }
.aee-card__title { font-size: .98rem; line-height: 1.3; margin: 8px 0 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.aee-card__niche { font-size: .8rem; color: var(--aee-muted); text-decoration: none; }

.aee-niches { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.aee-niches a { padding: 6px 12px; border-radius: 999px; background: var(--aee-surface-2); color: var(--aee-ink); text-decoration: none; font-size: .88rem; }
.aee-niches a span { color: var(--aee-muted); margin-left: 4px; font-size: .78rem; }
.aee-niches a:hover { background: var(--aee-accent); color: var(--aee-accent-ink); }
.aee-niches a:hover span { color: inherit; }

.aee-content { margin: 16px 0; }
.aee-facts { padding-left: 1.2em; color: var(--aee-muted); }
.aee-tags a { display: inline-block; margin: 0 6px 6px 0; font-size: .85rem; }
.aee-related h2 { font-size: 1.25rem; margin-top: 32px; }
.aee-empty { color: var(--aee-muted); padding: 24px 0; }

/* Sticky mobile bar */
.aee-sticky { display: none; }
@media (max-width: 767px) {
	.aee-sticky { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 9998; background: var(--aee-surface); padding: 6px 40px 6px 8px; box-shadow: 0 -4px 16px rgba(0, 0, 0, .35); }
	.aee-sticky .aee-slot { margin: 0; }
	.aee-sticky .aee-slot__label { display: none; }
	.aee-sticky .aee-btn { width: 100%; }
	.aee-sticky__close { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); padding: 0 !important; width: 28px; height: 28px; border: 0; border-radius: 50%; background: var(--aee-surface-2); color: var(--aee-ink); font-size: 18px; line-height: 1; cursor: pointer; }
	body { padding-bottom: 72px; }
}
.aee-sticky[hidden] { display: none !important; }

/* Legal footer */
.aee-legal { text-align: center; font-size: .8rem; color: var(--aee-muted); padding: 20px 16px 28px; border-top: 1px solid rgba(127, 127, 127, .2); }
.aee-legal__badge { display: inline-block; font-weight: 700; border: 1px solid currentColor; border-radius: 4px; padding: 0 5px; margin-right: 4px; }
.aee-legal nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; margin-top: 8px; }
.aee-legal a { color: inherit; }

/* 18+ gate */
.aee-agegate { position: fixed; inset: 0; z-index: 99999; display: grid; place-items: center; padding: 16px; background: rgba(8, 8, 10, .96); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.aee-agegate[hidden] { display: none; }
.aee-agegate__box { max-width: 460px; width: 100%; background: var(--aee-surface); color: var(--aee-ink); border-radius: 16px; padding: 28px 24px; text-align: center; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }
.aee-agegate__badge { display: inline-block; font-size: 1.4rem; font-weight: 800; color: var(--aee-accent); border: 2px solid var(--aee-accent); border-radius: 10px; padding: 2px 12px; margin: 0 0 8px; }
.aee-agegate h2 { margin: 4px 0 8px; font-size: 1.5rem; color: var(--aee-ink); }
.aee-agegate p { color: var(--aee-muted); line-height: 1.5; }
.aee-agegate__actions { display: flex; flex-direction: column; gap: 10px; margin: 20px 0 12px; }
.aee-agegate__actions .aee-btn:not(.aee-btn--primary) { color: var(--aee-muted); border-color: rgba(127, 127, 127, .4); }
.aee-agegate__small { font-size: .75rem; }
.aee-agegate__small a { color: inherit; }
html.aee-gated { overflow: hidden; }

/* Quick exit */
.aee-exit { position: fixed; right: 16px; bottom: 16px; z-index: 9999; padding: 6px 12px; border-radius: 999px; background: var(--aee-surface-2); color: var(--aee-ink) !important; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-decoration: none; opacity: .75; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.aee-exit:hover { opacity: 1; }
@media (max-width: 767px) { .aee-exit { top: auto; bottom: 84px; } }

/* Industry news */
.aee-news { list-style: none; margin: 0; padding: 0; }
.aee-news li { padding: 10px 0; border-bottom: 1px solid rgba(127,127,127,.18); }
.aee-news li:last-child { border-bottom: 0; }
.aee-news a { display: block; color: inherit; text-decoration: none; font-weight: 600; line-height: 1.35; }
.aee-news a:hover { color: var(--aee-accent); }
.aee-news span { display: block; font-size: .78rem; color: var(--aee-muted); margin-top: 2px; }

/* Daily picks list */
.aee-pick { display: grid; grid-template-columns: 200px 1fr; gap: 16px; align-items: start; margin: 0 0 20px; }
.aee-pick__thumb { display: block; aspect-ratio: 16 / 9; border-radius: var(--aee-radius); overflow: hidden; background: var(--aee-surface-2); }
.aee-pick__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.aee-pick h3 { margin: 0 0 4px; font-size: 1.1rem; line-height: 1.3; }
.aee-pick h3 span { color: var(--aee-accent); margin-right: 4px; }
.aee-pick h3 a { color: inherit; text-decoration: none; }
.aee-pick h3 a:hover { color: var(--aee-accent); }
.aee-pick p { margin: 0; color: var(--aee-muted); font-size: .92rem; }
@media (max-width: 600px) { .aee-pick { grid-template-columns: 1fr; gap: 8px; } }

/* Single video: player column + sidebar */
.aee-single__layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
.aee-single__main { min-width: 0; }
.aee-single__side { min-width: 0; }
.aee-single__side .aee-slot--sidebar { margin-top: 0; }
.aee-side__h { font-size: 1rem; margin: 20px 0 8px; }
.aee-single__side .aee-grid { grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; }
.aee-single__side .aee-card__title { font-size: .82rem; }
.aee-single__side .aee-card__niche { display: none; }
@media (max-width: 960px) { .aee-single__layout { grid-template-columns: 1fr; } }

/* Native (in-grid) ads */
.aee-grid > .aee-native { grid-column: 1 / -1; min-width: 0; }
.aee-native ins { display: block; min-height: 1px; }
