/* Administrator-managed promotion tiles, using the affiliate glass palette. */
.ap-promotion-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:20px;margin:24px 0}
.ap-promotion-card{--promotion-accent:#22e6ee;overflow:hidden;border:1px solid color-mix(in srgb,var(--promotion-accent) 50%,transparent);border-radius:14px;background:linear-gradient(145deg,rgba(255,255,255,.085),rgba(255,255,255,.025));box-shadow:inset 0 1px rgba(255,255,255,.1),0 12px 28px rgba(0,0,0,.12);min-width:0;display:flex;flex-direction:column}
.ap-promotion-card[data-badge-color=red]{--promotion-accent:#ff667d}.ap-promotion-card[data-badge-color=green]{--promotion-accent:#7cf0ba}.ap-promotion-card[data-badge-color=gold]{--promotion-accent:#ffda75}.ap-promotion-card[data-badge-color=purple]{--promotion-accent:#ccafff}
.ap-promotion-art{aspect-ratio:16/9;position:relative;overflow:hidden;background:radial-gradient(circle at 20% 10%,rgba(34,230,238,.3),transparent 65%),linear-gradient(135deg,#0b3c50,#163371)}
.ap-promotion-art img{width:100%;height:100%;display:block;object-fit:cover;object-position:center}
.ap-promotion-fallback{display:flex;align-items:center;justify-content:center;text-align:center;padding:24px;font-size:24px;font-weight:800;height:100%;color:#fff}
.ap-promotion-status{position:absolute;top:12px;right:12px;background:rgba(15,101,65,.94);border:1px solid rgba(124,240,186,.5);color:#b5ffdc;border-radius:6px;padding:3px 8px;font-size:11px;font-weight:700}
.ap-promotion-body{padding:20px;display:flex;flex-direction:column;align-items:flex-start;flex:1;gap:12px}.ap-promotion-body h2{font-size:19px;line-height:1.35;margin:0;overflow-wrap:anywhere}.ap-promotion-body p{font-size:13px;margin:0;flex:1}.ap-promotion-badge{font-size:11px;font-weight:750;color:var(--promotion-accent);border:1px solid var(--promotion-accent);border-radius:6px;padding:3px 8px;background:rgba(0,10,25,.2)}
body[data-admin-page="affiliate-portal"] .ap-promotion-body button{width:100%;margin-top:4px}
[data-ap-chart-panel]{position:relative}.ap-chart-tooltip{position:absolute;top:12px;z-index:8;white-space:pre-line;pointer-events:none;min-width:170px;max-width:220px;padding:12px 15px;border:1px solid rgba(34,230,238,.45);border-radius:12px;background:rgba(6,24,42,.96);color:#fff;box-shadow:0 8px 25px rgba(0,0,0,.25);font-size:12px;line-height:1.8}
.ap-dot{stroke:#092438;stroke-width:1.5}.ap-dot-0{fill:#55e2bd}.ap-dot-1{fill:#75aeff}.ap-dot-2{fill:#dda6ff}.ap-point-active .ap-dot{stroke:#fff;stroke-width:2.5}[data-ap-point]:focus{outline:none}[data-ap-point]:focus .ap-dot{stroke:#fff;stroke-width:3}
@media(max-width:1400px){.ap-promotion-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:1100px){.ap-promotion-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:560px){.ap-promotion-grid{grid-template-columns:minmax(0,1fr)}.ap-promotion-body{padding:18px}}

/* The permanent affiliate URL stays above catalog and event filters. */
.ap-default-link{margin:20px 0 24px;padding:20px;border:1px solid rgba(87,224,234,.32);border-radius:12px;background:linear-gradient(90deg,rgba(34,230,238,.065),transparent);min-width:0}
.ap-default-link h2{margin:0 0 8px;font-size:19px}.ap-default-link p{margin:0 0 16px;font-size:13px}
.ap-default-link-controls{display:flex;align-items:stretch;gap:12px;min-width:0}.ap-default-link-controls input{flex:1;min-width:0;width:100%;font-size:14px}.ap-default-link-controls button{flex-shrink:0;white-space:nowrap}
@media(max-width:560px){.ap-default-link-controls{flex-direction:column}.ap-default-link-controls button{width:100%}}

.ap-report-country{display:inline-flex;align-items:center;gap:8px;white-space:nowrap}.ap-report-country img{width:20px!important;height:15px!important;max-width:20px;object-fit:contain;border-radius:2px;flex-shrink:0}

body[data-admin-page="affiliate-portal"] .ap-top-performers .af-table thead th{text-transform:none!important}

.ap-refresh-countdown{font-size:11px;font-variant-numeric:tabular-nums;color:var(--admin-muted,#b1c4d9);white-space:nowrap;display:inline-flex;align-items:center;min-width:82px;justify-content:flex-end}
@media(max-width:540px){.ap-refresh-countdown{font-size:10px;min-width:72px}.account-bar{flex-wrap:wrap}}

.ap-env-slot{display:contents}

body[data-admin-page="affiliate-portal"] .account-bar>.ap-refresh-countdown{display:inline-flex}
@media(max-width:850px){body[data-admin-page="affiliate-portal"] .account-bar{flex-wrap:wrap;row-gap:2px}body[data-admin-page="affiliate-portal"] .account-bar>.ap-refresh-countdown{flex-basis:100%;font-size:10px;line-height:12px}}

.ap-custom-link{margin:20px 0;padding:18px 0;border-block:1px solid rgba(150,190,230,.2)}.ap-custom-link h2{margin:0 0 8px}.ap-custom-link .af-toolbar{align-items:end}.ap-custom-link label{min-width:0;flex:1 1 340px}.ap-custom-link input{width:100%;box-sizing:border-box}.ap-custom-link-result{flex-basis:100%!important}.ap-custom-link [data-af-custom-status]{flex-basis:100%;margin:0;overflow-wrap:anywhere}.ap-custom-link [hidden]{display:none!important}@media(max-width:600px){.ap-custom-link label,.ap-custom-link button{flex-basis:100%;width:100%}}

/* Hot promotions always use a red badge and a pulsing flame over the artwork. */
.ap-promotion-card[data-promotion-hot="1"] .ap-promotion-badge{background:#ef4444;border-color:#ef4444;color:#fff}
.ap-promotion-hot-icon{position:absolute;top:10px;left:10px;z-index:1;display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:40px;height:40px;border:3px solid #fff;border-radius:50%;background:#ef4444;color:#fff;pointer-events:none;box-shadow:0 0 0 3px rgba(239,68,68,.2),0 0 18px rgba(239,68,68,.7);animation:ap-hot-glow 2s ease-in-out infinite}
.ap-promotion-hot-icon svg{display:block;width:20px;height:20px;flex:0 0 20px}
@keyframes ap-hot-glow{0%,100%{opacity:1;box-shadow:0 0 0 3px rgba(239,68,68,.2),0 0 18px rgba(239,68,68,.7)}50%{opacity:.75;box-shadow:0 0 0 5px rgba(239,68,68,.1),0 0 26px rgba(239,68,68,.9)}}
@media(prefers-reduced-motion:reduce){.ap-promotion-hot-icon{animation:none}}

.ap-promotion-card[data-promotion-ready="0"] .ap-promotion-status{background:rgba(95,72,21,.94);border-color:rgba(245,202,110,.4);color:#ffe3a1}
.ap-promotion-coming-soon{cursor:default;opacity:.65}

/* Titles and badges share a row; long titles wrap without pushing badges below. */
.ap-promotion-title{display:flex;align-items:center;gap:10px;width:100%;min-width:0}
.ap-promotion-title h2{flex:0 1 auto;min-width:0}
.ap-promotion-title .ap-promotion-badge{flex:0 0 auto;max-width:45%;box-sizing:border-box;overflow-wrap:anywhere}

/* Keep the original compact badge style, aligned to the right of the title. */
.ap-promotion-title .ap-promotion-badge{margin-left:auto}
