/* templates/theme_2/css/styles.css
   Stateful / component CSS: buttons, slot carousel, mobile menu, icon
   chips, accessibility. Utility classes live in utilities.css. */

body {
    font-family: 'Roboto', Arial, sans-serif;
    background-color: var(--color-primary);
    margin: 0;
    padding: 0;
}

h1, h2, h3, h4, h5, h6, .font-display {
    font-family: 'Poppins', 'Roboto', sans-serif;
}

/* Inline SVG icons (replaces Font Awesome <i> tags): sized off font-size
   like an icon font, colored via currentColor so text-color utilities
   (text-accent, text-lg sizing, etc.) keep working unchanged. */
.icon {
    display: inline-block;
    width: 1em;
    height: 1em;
    fill: currentColor;
    vertical-align: -0.125em;
}

/* ==== Buttons (pill-shaped) ==== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    /* Real brand data check (9 random domains) showed white text on a
       medium-bright accent (btn_primary_bg) is a common combo that dips
       just under WCAG 3:1 — a filled button can't take a darkening
       overlay like the outline buttons do without hiding the brand
       color entirely. A soft shadow improves perceived edge contrast
       without touching the actual brand-chosen colors; it's invisible
       when contrast is already fine (dark text needs no help).
       0.35 opacity wasn't dark enough — a live audit measured the
       shadow-vs-text contrast at 3.83:1 against orange brand colors
       (needs 4.5:1); 0.85 clears it with margin regardless of brand hue. */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
    border: none;
    border-radius: 30px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background-color var(--transition-speed), transform var(--transition-speed);
}
.btn-primary:hover {
    background-color: var(--btn-primary-hover);
    color: var(--btn-primary-text);
    text-decoration: none;
    transform: translateY(-1px);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* Dark backing tint, not fully transparent: an outline-only pill can
       nearly vanish when a brand's btn_secondary color sits close in
       luminance to color_primary. Darkening the immediate background
       widens that gap regardless of which brand hue is in play. Checked
       against 3 real random domains — 0.8 clears WCAG 3:1 for every case
       except one brand whose btn_secondary_text is byte-identical to
       color_primary (a data bug in that brand's own DB config no amount
       of tinting can fix — see [[theme-2-new-design]] memory notes). */
    background-color: rgba(0, 0, 0, 0.8);
    border: 1px solid var(--btn-secondary-border);
    color: var(--btn-secondary-text);
    border-radius: 30px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-speed);
}
.btn-secondary:hover {
    background-color: var(--btn-secondary-hover);
    border-color: var(--btn-secondary-hover);
    color: var(--btn-primary-text);
    text-decoration: none;
}

.view-all {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--btn-secondary-text);
    background-color: rgba(0, 0, 0, 0.8);
    border: 1px solid var(--btn-secondary-border);
    border-radius: 30px;
    padding: 0.5rem 1.25rem;
    text-decoration: none;
    transition: all var(--transition-speed);
}
.view-all:hover {
    color: var(--btn-primary-text);
    background-color: var(--btn-secondary-hover);
    border-color: var(--btn-secondary-hover);
    text-decoration: none;
}

/* ==== Hero CTA badge (overlaid on hero image) ==== */
.hero-cta-badge {
    display: inline-flex;
    background-color: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85); /* see .btn-primary note on contrast */
    padding: 0.75rem 2rem;
    border-radius: 30px;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45);
    transition: background-color var(--transition-speed), transform var(--transition-speed);
    white-space: nowrap;
}
.hero-cta-badge:hover {
    background-color: var(--btn-primary-hover);
    transform: scale(1.04);
    text-decoration: none;
}

/* ==== Slot carousel ==== */
.slots-carousel {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 0.25rem 0.25rem 1rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}
.slots-carousel::-webkit-scrollbar { height: 6px; }
.slots-carousel::-webkit-scrollbar-track { background: transparent; }
.slots-carousel::-webkit-scrollbar-thumb {
    background-color: var(--color-primary);
    background-color: color-mix(in srgb, var(--color-primary) 80%, white 20%);
    border-radius: 3px;
}

.slot-card {
    scroll-snap-align: start;
    flex: 0 0 auto;
    width: 200px;
    position: relative;
    /* Derived from color_primary, not color_light: brand data shows
       color_light is unreliable (theme_1 never renders it, so brands set
       it to arbitrary values — some pale, some dark; two of three random
       real domains tested had a near-white color_light, which made
       color_verylight card-name text unreadable at ~1.4:1 contrast).
       A primary+white tint stays in the same dark family as the rest of
       the canvas and reliably clears WCAG AA (8.7–14.7:1 across every
       real domain tested). Fallback line first for color-mix()-less browsers. */
    background-color: var(--color-primary);
    background-color: color-mix(in srgb, var(--color-primary) 92%, white 8%);
    border-radius: 0.75rem;
    border: 2px solid transparent;
    overflow: hidden;
    text-decoration: none;
    display: block;
    transition: border-color var(--transition-speed), transform var(--transition-speed);
}
@media (min-width: 768px) { .slot-card { width: 230px; } }
@media (min-width: 1024px) { .slot-card { width: 250px; } }

.slot-card:hover,
.slot-card:focus-within {
    border-color: var(--color-accent);
    transform: translateY(-4px);
}

.slot-card-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.slot-card-body {
    padding: 0.75rem;
}

.slot-card-name {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    color: #F5F5F7; /* hardcoded, not brand-var: see color_verylight reliability note above */
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.slot-play-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background-color: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.85); /* see .btn-primary note on contrast */
    font-family: 'Poppins', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.3rem 0.65rem;
    border-radius: 30px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}

/* ==== Icon chips (footer: licenses / social / payment on dark bg) ==== */
.icon-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #F5F5F7; /* hardcoded, not brand-var: see color_verylight reliability note above */
    border-radius: 0.5rem;
    padding: 0.4rem 0.6rem;
    transition: transform var(--transition-speed);
}
.icon-chip:hover { transform: scale(1.05); }

/* Real license badge artwork (logo files, not icon fonts) is frequently
   drawn pure-white or very pale, meant to sit on an arbitrary/dark page
   background — placed on this chip's light fill they can disappear
   entirely (confirmed: betblocker.png and gamcare.webp are literally
   #ffffff on transparent). A soft dark outline makes any light-colored
   mark's silhouette visible regardless of the chip's fill, without
   visibly affecting already-colorful logos. */
.icon-chip img {
    filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.55)) drop-shadow(0 0 1px rgba(0, 0, 0, 0.55));
}

.icon-chip-round {
    border-radius: 9999px;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    color: var(--color-primary);
    font-size: 1.1rem;
}

/* ==== Header / mobile menu (checkbox-driven, no JS) ==== */
header.site-header {
    background-color: var(--color-primary);
    color: #F5F5F7; /* hardcoded, not brand-var: see color_verylight reliability note above */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.mobile-menu-toggle { display: none; }

.hamburger {
    cursor: pointer;
    display: inline-flex;
    flex-direction: column;
    gap: 5px;
    padding: 0.25rem;
}
.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: #F5F5F7; /* hardcoded, not brand-var: see color_verylight reliability note above */
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.mobile-menu {
    display: none;
}
.mobile-menu-toggle:checked ~ .mobile-menu {
    display: block;
}
.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 40;
}
.mobile-menu-content {
    position: fixed;
    inset: 0;
    background-color: var(--color-primary);
    color: #F5F5F7; /* hardcoded, not brand-var: see color_verylight reliability note above */
    z-index: 50;
    transform: translateY(-100%);
    transition: transform 0.3s ease-in-out;
    overflow-y: auto;
}
.mobile-menu-toggle:checked ~ .mobile-menu .mobile-menu-content {
    transform: translateY(0);
}
.mobile-menu-toggle:checked ~ .mobile-buttons .hamburger span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.mobile-menu-toggle:checked ~ .mobile-buttons .hamburger span:nth-child(2) {
    opacity: 0;
}
.mobile-menu-toggle:checked ~ .mobile-buttons .hamburger span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav-link {
    display: block;
    padding: 0.85rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #F5F5F7; /* hardcoded, not brand-var: see color_verylight reliability note above */
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    transition: color var(--transition-speed);
}
.mobile-nav-link:hover { color: var(--color-accent); }

/* Footer text links: text-sm (14px) + space-y-1's 4px gap left a ~16px
   clickable area — below the 24x24px minimum touch target. Vertical
   padding grows the tap area without changing visible text size/spacing. */
.footer-link {
    display: inline-block;
    padding: 4px 0;
}

/* ==== Accessibility ==== */
:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .slot-card,
    .slot-card-image,
    .btn-primary,
    .btn-secondary,
    .view-all,
    .hero-cta-badge,
    .icon-chip,
    .mobile-menu-content,
    .hamburger span {
        transition: none !important;
    }
    .slot-card:hover,
    .hero-cta-badge:hover {
        transform: none !important;
    }
}

@media (prefers-contrast: more) {
    .slot-card { border: 2px solid #fff; }
    .icon-chip { border: 1px solid #000; }
    .view-all { border-width: 2px; }
}
