/* ==========================================================================
   DrinkMixr design system
   Dark-first, one accent color (brand doc: "dark, sleek, confident" —
   Linear/Raycast). Light theme is opt-in from Settings.

   1. Tokens            6. Bottom tab bar     11. Forms
   2. Bootstrap mapping 7. Footer             12. Overlays (menus, modals, toasts)
   3. Base              8. Buttons            13. Pagination, alerts, empty states
   4. Layout            9. Cards & tiles      14. Legacy components (other pages)
   5. Header / nav     10. Chips & badges     15. Utilities
   ========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */
:root {
    color-scheme: light;
    --bottom-tab-height: 64px;
    --header-height: 60px;

    /* Accent — the one brand color. Business accounts override --brand-primary. */
    --brand-primary: #7c3aed;
    --brand-primary-rgb: 124, 58, 237;
    --brand-primary-dark: #6d28d9;
    --brand-primary-dark-rgb: 109, 40, 217;
    --accent: var(--brand-primary);
    --accent-hover: var(--brand-primary-dark);
    --accent-contrast: #ffffff;
    --accent-text: #6d28d9;              /* accent as text/icons on surfaces */
    --accent-text-rgb: 109, 40, 217;
    --accent-soft: rgba(var(--brand-primary-rgb), 0.10);
    --accent-border: rgba(var(--brand-primary-rgb), 0.35);
    --accent-ring: rgba(var(--brand-primary-rgb), 0.35);

    /* Premium is a status color (crown), not a second brand color */
    --premium: #b7791f;
    --premium-bg: #f5b83d;
    --premium-contrast: #1a1204;

    /* Surfaces & text (light) */
    --bg: #fafafb;
    --surface-1: #ffffff;
    --surface-2: #f3f3f6;
    --surface-3: #e9e9ee;
    --surface-raised: #ffffff;
    --border: #e4e4ea;
    --border-strong: #d2d2da;
    --text: #16161a;
    --text-muted: #5e5e6b;
    --text-subtle: #8b8b97;
    --header-bg: rgba(250, 250, 251, 0.85);
    --overlay: rgba(10, 10, 14, 0.55);
    --shadow-1: 0 1px 2px rgba(16, 16, 24, 0.06);
    --shadow-2: 0 10px 30px rgba(16, 16, 24, 0.12);
    --img-scrim: linear-gradient(180deg, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, 0.78) 100%);

    --success: #15803d;
    --danger: #dc2626;
    --warning: #b45309;
    --star: #f5a524;

    /* Type */
    --body-font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --display-font: 'Space Grotesk', 'Inter', system-ui, sans-serif;
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;

    /* Spacing (4px base) */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 1rem;
    --space-4: 1.5rem;
    --space-5: 3rem;

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-pill: 999px;

    /* Controls: 44px touch targets; tighter with a mouse (see §8) */
    --control-h: 44px;
    --control-h-sm: 44px;

    /* Motion */
    --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
    --dur-1: 0.12s;
    --dur-2: 0.2s;

    /* Legacy aliases still used by older templates */
    --primary-color: var(--accent);
    --cocktail-primary: var(--accent);
    --cocktail-primary-dark: var(--accent-hover);
    --neutral-50: var(--surface-2);
    --neutral-100: var(--surface-2);
    --neutral-200: var(--surface-3);
    --neutral-300: var(--border-strong);
    --neutral-500: var(--text-subtle);
    --neutral-600: var(--text-muted);
    --neutral-700: var(--text-muted);
    --neutral-800: var(--text);
    --neutral-900: var(--text);
    --shadow-sm: var(--shadow-1);
    --shadow-md: var(--shadow-1);
    --shadow-lg: var(--shadow-2);
}

[data-bs-theme="dark"] {
    color-scheme: dark;
    --accent-text: #a78bfa;
    --accent-text-rgb: 167, 139, 250;
    --accent-soft: rgba(var(--brand-primary-rgb), 0.18);
    --accent-border: rgba(var(--brand-primary-rgb), 0.5);
    --accent-ring: rgba(var(--brand-primary-rgb), 0.5);

    --premium: #f5b83d;

    --bg: #0b0b0f;
    --surface-1: #15151b;
    --surface-2: #1d1d25;
    --surface-3: #26262f;
    --surface-raised: #1b1b22;
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.14);
    --text: #ececef;
    --text-muted: #9d9daa;
    --text-subtle: #6e6e7c;
    --header-bg: rgba(11, 11, 15, 0.8);
    --overlay: rgba(0, 0, 0, 0.65);
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-2: 0 16px 40px rgba(0, 0, 0, 0.5);

    --success: #4ade80;
    --danger: #f87171;
    --warning: #fbbf24;
}

/* Mouse/trackpad: controls can be tighter than touch targets */
@media (hover: hover) and (pointer: fine) {
    :root {
        --control-h: 40px;
        --control-h-sm: 34px;
    }
}

/* 2. Bootstrap mapping ----------------------------------------------------- */
:root,
[data-bs-theme="light"],
[data-bs-theme="dark"] {
    --bs-body-bg: var(--bg);
    --bs-body-color: var(--text);
    --bs-body-font-family: var(--body-font);
    --bs-emphasis-color: var(--text);
    --bs-heading-color: var(--text);
    --bs-secondary-color: var(--text-muted);
    --bs-tertiary-color: var(--text-subtle);
    --bs-secondary-bg: var(--surface-2);
    --bs-tertiary-bg: var(--surface-2);
    --bs-border-color: var(--border);
    --bs-border-color-translucent: var(--border);
    --bs-link-color: var(--accent-text);
    --bs-link-color-rgb: var(--accent-text-rgb);
    --bs-link-hover-color: var(--accent-text);
    --bs-link-hover-color-rgb: var(--accent-text-rgb);
    --bs-primary: var(--accent);
    --bs-primary-rgb: var(--brand-primary-rgb);
    --bs-primary-text-emphasis: var(--accent-text);
    --bs-primary-bg-subtle: var(--accent-soft);
    --bs-primary-border-subtle: var(--accent-border);
    --bs-focus-ring-color: var(--accent-ring);
    --bs-border-radius: var(--radius-sm);
    --bs-border-radius-lg: var(--radius-md);
    --bs-border-radius-xl: var(--radius-lg);
    --bs-border-radius-pill: var(--radius-pill);
}

.text-primary { color: var(--accent-text) !important; }
.text-muted,
.text-body-secondary { color: var(--text-muted) !important; }
.border { border-color: var(--border) !important; }

/* Hard-coded light utilities in older templates stay readable in dark mode */
[data-bs-theme="dark"] .bg-light,
[data-bs-theme="dark"] .bg-white { background-color: var(--surface-2) !important; }
[data-bs-theme="dark"] .card.bg-light { --bs-card-bg: var(--surface-2); }
[data-bs-theme="dark"] .text-dark:not(.badge) { color: var(--text) !important; }

/* 3. Base ------------------------------------------------------------------ */
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: var(--body-font);
    font-size: 1rem;
    line-height: 1.6;
    background-color: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

main { flex: 1 0 auto; }

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.navbar-brand,
.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
    font-family: var(--display-font);
    letter-spacing: -0.015em;
    color: var(--text);
}

small, .small { font-size: 0.875rem; }

a { color: var(--accent-text); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent-text); }

::selection { background: rgba(var(--brand-primary-rgb), 0.35); }

:focus-visible {
    outline: 2px solid var(--accent-text);
    outline-offset: 2px;
}

hr { border-color: var(--border); opacity: 1; }

kbd {
    background: var(--surface-2);
    color: var(--text-muted);
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    font-family: var(--body-font);
    font-size: 0.75rem;
    padding: 0.05rem 0.4rem;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition: none !important;
        animation: none !important;
        scroll-behavior: auto !important;
    }
}

.skip-link {
    position: absolute;
    top: -48px;
    left: 8px;
    background: var(--accent);
    color: var(--accent-contrast);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    z-index: 2000;
}
.skip-link:focus { top: 8px; color: var(--accent-contrast); }

/* 4. Layout ---------------------------------------------------------------- */
.container { --bs-gutter-x: 2rem; }   /* 16px side gutters on phones */

.app-main {
    padding-top: 1.25rem;
    padding-bottom: 2rem;
}

@media (min-width: 992px) {
    .app-main { padding-top: 2rem; padding-bottom: 3rem; }
}

/* Room for the fixed tab bar wherever it is shown */
@media (max-width: 991.98px) {
    body { padding-bottom: calc(var(--bottom-tab-height) + env(safe-area-inset-bottom, 0px)); }
}

.page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}
.page-title {
    font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.25rem);
    font-weight: 700;
    margin: 0;
}
.page-subtitle { color: var(--text-muted); margin: 0.25rem 0 0; }

.section { margin-top: 2.5rem; }
.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.9rem;
}
.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}
.section-link {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
}
.section-link:hover { color: var(--text); }

/* 5. Header / nav ---------------------------------------------------------- */
.app-navbar {
    --bs-navbar-padding-y: 0;
    --bs-navbar-color: var(--text-muted);
    --bs-navbar-hover-color: var(--text);
    --bs-navbar-active-color: var(--text);
    --bs-navbar-brand-color: var(--text);
    --bs-navbar-brand-hover-color: var(--text);
    --bs-navbar-nav-link-padding-x: 0.75rem;
    min-height: var(--header-height);
    background: var(--header-bg);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--border);
    z-index: 1030;
}

/* Sticky on desktop; on phones it scrolls away (the tab bar is the nav). */
@media (min-width: 992px) {
    .app-navbar { position: sticky; top: 0; }
}

.app-navbar > .container { min-height: var(--header-height); }

.app-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
    padding: 0;
    margin-right: 1.5rem;
}
.app-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: var(--accent);
    color: var(--accent-contrast);
    font-size: 0.95rem;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08) inset, 0 6px 18px rgba(var(--brand-primary-rgb), 0.35);
}

.navbar-brand .business-logo {
    height: 2rem;
    width: auto;
    border-radius: 6px;
    vertical-align: middle;
}
.navbar-brand .business-name { vertical-align: middle; }

.app-navbar .nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: var(--radius-sm);
}
.app-navbar .nav-link:hover { background: var(--surface-2); }
.app-navbar .nav-link.active { color: var(--text); }

@media (min-width: 992px) {
    .app-navbar .navbar-nav { gap: 0.15rem; }
    .app-navbar .nav-link.active { background: var(--surface-2); }
}

.app-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-width: var(--control-h);
    height: var(--control-h);
    padding: 0 0.6rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1;
    transition: background-color var(--dur-1), color var(--dur-1), border-color var(--dur-1);
}
.app-icon-btn:hover,
.app-icon-btn[aria-expanded="true"] { background: var(--surface-2); color: var(--text); }
.app-icon-btn.navbar-toggler { font-size: 1rem; }
.app-icon-btn.navbar-toggler:focus { box-shadow: none; }
.app-icon-btn.navbar-toggler:focus-visible { box-shadow: 0 0 0 3px var(--accent-ring); }

.app-navbar-quick {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

.nav-actions-label { display: none; }

/* Search */
.nav-search {
    position: relative;
    display: flex;
    align-items: center;
    flex: 0 1 280px;
    min-width: 180px;
    margin: 0 0.75rem;
}
.nav-search-icon {
    position: absolute;
    left: 0.8rem;
    color: var(--text-subtle);
    font-size: 0.85rem;
    pointer-events: none;
}
.nav-search-input {
    width: 100%;
    height: var(--control-h);
    padding: 0 2.2rem 0 2.2rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    color: var(--text);
    font-size: 0.9rem;
    transition: border-color var(--dur-1), background-color var(--dur-1), box-shadow var(--dur-1);
}
.nav-search-input::placeholder { color: var(--text-subtle); }
.nav-search-input:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--surface-1);
    box-shadow: 0 0 0 3px var(--accent-ring);
}
.nav-search-input::-webkit-search-cancel-button { display: none; }
.nav-search-kbd {
    position: absolute;
    right: 0.6rem;
    pointer-events: none;
}
.nav-search-input:focus ~ .nav-search-kbd,
.nav-search-input:not(:placeholder-shown) ~ .nav-search-kbd { display: none; }

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.app-user-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    height: var(--control-h);
    padding: 0 0.6rem 0 0.3rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    background: transparent;
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 500;
}
.app-user-btn:hover,
.app-user-btn[aria-expanded="true"] { background: var(--surface-2); }
.app-user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--surface-3);
}
.app-user-avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: var(--text-muted);
}
.app-user-name {
    max-width: 10rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.app-user-caret { font-size: 0.65rem; color: var(--text-subtle); }

.premium-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.65rem;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(245, 184, 61, 0.45);
    color: var(--premium);
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

/* Collapsed (phone/tablet) menu */
@media (max-width: 991.98px) {
    .app-navbar .navbar-collapse {
        margin: 0 calc(var(--bs-gutter-x) * -0.5);
        padding: 0.5rem calc(var(--bs-gutter-x) * 0.5) 1rem;
        border-top: 1px solid var(--border);
    }
    .app-navbar .navbar-nav { padding: 0.25rem 0; }
    .app-navbar .nav-link {
        display: flex;
        align-items: center;
        min-height: 44px;
        padding: 0 0.75rem;
        font-size: 1rem;
        color: var(--text);
    }
    .app-navbar .navbar-collapse .dropdown-menu {
        position: static !important;
        transform: none !important;
        width: 100%;
        margin: 0.25rem 0 !important;
        box-shadow: none;
        background: var(--surface-1);
    }
    .nav-search { flex: 1 1 auto; max-width: none; margin: 0.5rem 0; }
    .nav-search-input { height: 44px; font-size: 16px; } /* 16px: no iOS zoom */
    .nav-search-kbd { display: none; }
    .nav-actions { flex-wrap: wrap; margin-top: 0.25rem; }
    .nav-actions > .dropdown:first-child { flex: 1 1 auto; }
    .nav-actions-label { display: inline; }
    .nav-actions .app-icon-btn { width: 100%; justify-content: flex-start; padding: 0 0.85rem; }
    .nav-actions .btn { flex: 1 1 auto; }
}

/* 6. Bottom tab bar (phones/tablets) --------------------------------------- */
.bottom-tab-bar {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(var(--bottom-tab-height) + env(safe-area-inset-bottom, 0px));
    padding: 0 env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
    background: var(--header-bg);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    backdrop-filter: saturate(180%) blur(14px);
    border-top: 1px solid var(--border);
    z-index: 1040;
}

@media (max-width: 991.98px) {
    .bottom-tab-bar { display: block; }
}

.bottom-tab-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    height: var(--bottom-tab-height);
}

.bottom-tab-item {
    flex: 1 1 0;
    min-width: 0;
}

.bottom-tab-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    width: 100%;
    height: 100%;
    min-height: 44px;
    color: var(--text-subtle);
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.1;
    -webkit-tap-highlight-color: transparent;
    transition: color var(--dur-1);
}
.bottom-tab-link > i,
.bottom-tab-primary-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 30px;           /* same box for every icon so labels line up */
}
.bottom-tab-link > i { font-size: 1.15rem; }
.bottom-tab-link span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.bottom-tab-link:hover,
.bottom-tab-link:focus-visible { color: var(--text); }
.bottom-tab-link.active { color: var(--text); }
.bottom-tab-link.active i { color: var(--accent-text); }

.bottom-tab-primary-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 30px;
    border-radius: var(--radius-pill);
    background: var(--accent);
    box-shadow: 0 6px 16px rgba(var(--brand-primary-rgb), 0.4);
}
.bottom-tab-item-primary .bottom-tab-link i,
.bottom-tab-item-primary .bottom-tab-link.active i { color: var(--accent-contrast); font-size: 1rem; }
.bottom-tab-item-primary .bottom-tab-link.active .bottom-tab-primary-icon {
    box-shadow: 0 0 0 3px var(--accent-ring), 0 6px 16px rgba(var(--brand-primary-rgb), 0.4);
}

/* 7. Footer ---------------------------------------------------------------- */
.app-footer {
    border-top: 1px solid var(--border);
    padding: 1.75rem 0;
    margin-top: 2rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}
.app-footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.5rem;
}
.app-footer-brand {
    font-family: var(--display-font);
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
}
.app-footer-brand:hover { color: var(--text); }
.app-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}
.app-footer-links a { color: var(--text-muted); text-decoration: none; }
.app-footer-links a:hover { color: var(--text); }
.app-footer-copy { margin: 0; width: 100%; color: var(--text-subtle); }

/* 8. Buttons --------------------------------------------------------------- */
.btn {
    --bs-btn-font-family: var(--body-font);
    --bs-btn-font-weight: 600;
    --bs-btn-font-size: 0.95rem;
    --bs-btn-line-height: 1.5;
    --bs-btn-padding-x: 1.05rem;
    --bs-btn-padding-y: calc((var(--control-h) - 2px - 1.5em) / 2);
    --bs-btn-border-radius: var(--radius-sm);
    --bs-btn-focus-box-shadow: 0 0 0 3px var(--accent-ring);
    min-height: var(--control-h);
    transition: background-color var(--dur-1), border-color var(--dur-1), color var(--dur-1), box-shadow var(--dur-1);
}
.btn-sm {
    --bs-btn-font-size: 0.875rem;
    --bs-btn-padding-x: 0.8rem;
    --bs-btn-padding-y: calc((var(--control-h-sm) - 2px - 1.5em) / 2);
    min-height: var(--control-h-sm);
}
.btn-lg {
    --bs-btn-font-size: 1.05rem;
    --bs-btn-padding-x: 1.4rem;
    --bs-btn-padding-y: calc((52px - 2px - 1.5em) / 2);
    --bs-btn-border-radius: var(--radius-md);
    min-height: 52px;
}

.btn-primary {
    --bs-btn-color: var(--accent-contrast);
    --bs-btn-bg: var(--accent);
    --bs-btn-border-color: var(--accent);
    --bs-btn-hover-color: var(--accent-contrast);
    --bs-btn-hover-bg: var(--accent-hover);
    --bs-btn-hover-border-color: var(--accent-hover);
    --bs-btn-active-color: var(--accent-contrast);
    --bs-btn-active-bg: var(--accent-hover);
    --bs-btn-active-border-color: var(--accent-hover);
    --bs-btn-disabled-color: var(--accent-contrast);
    --bs-btn-disabled-bg: var(--accent);
    --bs-btn-disabled-border-color: var(--accent);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset;
}

.btn-outline-primary {
    --bs-btn-color: var(--accent-text);
    --bs-btn-border-color: var(--accent-border);
    --bs-btn-hover-color: var(--accent-contrast);
    --bs-btn-hover-bg: var(--accent);
    --bs-btn-hover-border-color: var(--accent);
    --bs-btn-active-color: var(--accent-contrast);
    --bs-btn-active-bg: var(--accent-hover);
    --bs-btn-active-border-color: var(--accent-hover);
    --bs-btn-disabled-color: var(--accent-text);
    --bs-btn-disabled-border-color: var(--accent-border);
}

/* Neutral buttons share one look: surface + hairline border */
.btn-secondary,
.btn-outline-secondary,
.btn-light,
.btn-outline-light,
.btn-outline-dark,
.btn-ghost {
    --bs-btn-color: var(--text);
    --bs-btn-bg: var(--surface-2);
    --bs-btn-border-color: var(--border-strong);
    --bs-btn-hover-color: var(--text);
    --bs-btn-hover-bg: var(--surface-3);
    --bs-btn-hover-border-color: var(--border-strong);
    --bs-btn-active-color: var(--text);
    --bs-btn-active-bg: var(--surface-3);
    --bs-btn-active-border-color: var(--border-strong);
    --bs-btn-disabled-color: var(--text-subtle);
    --bs-btn-disabled-bg: var(--surface-2);
    --bs-btn-disabled-border-color: var(--border);
}
.btn-outline-secondary,
.btn-outline-light,
.btn-outline-dark,
.btn-ghost { --bs-btn-bg: transparent; }
.btn-ghost { --bs-btn-border-color: transparent; --bs-btn-hover-border-color: transparent; }

.btn-link {
    --bs-btn-color: var(--accent-text);
    --bs-btn-hover-color: var(--accent-text);
    --bs-btn-active-color: var(--accent-text);
}

.btn-warning,
.btn-premium {
    --bs-btn-color: var(--premium-contrast);
    --bs-btn-bg: var(--premium-bg);
    --bs-btn-border-color: var(--premium-bg);
    --bs-btn-hover-color: var(--premium-contrast);
    --bs-btn-hover-bg: #f0a91c;
    --bs-btn-hover-border-color: #f0a91c;
    --bs-btn-active-color: var(--premium-contrast);
    --bs-btn-active-bg: #e39b0e;
    --bs-btn-active-border-color: #e39b0e;
}
.btn-premium-outline {
    --bs-btn-color: var(--premium);
    --bs-btn-bg: transparent;
    --bs-btn-border-color: rgba(245, 184, 61, 0.5);
    --bs-btn-hover-color: var(--premium-contrast);
    --bs-btn-hover-bg: var(--premium-bg);
    --bs-btn-hover-border-color: var(--premium-bg);
    --bs-btn-active-color: var(--premium-contrast);
    --bs-btn-active-bg: var(--premium-bg);
    --bs-btn-active-border-color: var(--premium-bg);
}

.btn-pill { --bs-btn-border-radius: var(--radius-pill); }

.btn-close { --bs-btn-close-focus-shadow: 0 0 0 3px var(--accent-ring); }

.min-touch { min-height: 44px; min-width: 44px; }

/* 9. Cards & tiles --------------------------------------------------------- */
.card {
    --bs-card-bg: var(--surface-1);
    --bs-card-border-color: var(--border);
    --bs-card-border-radius: var(--radius-lg);
    --bs-card-inner-border-radius: calc(var(--radius-lg) - 1px);
    --bs-card-cap-bg: transparent;
    --bs-card-cap-color: var(--text);
    --bs-card-color: var(--text);
    box-shadow: var(--shadow-1);
}
.card-header { border-bottom-color: var(--border); }
.card-footer { border-top-color: var(--border); }
.shadow-sm { box-shadow: var(--shadow-1) !important; }

.surface {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

/* Drink tile — the one card used for cocktails everywhere (rails, grids) */
.drink-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem 0.75rem;
    list-style: none;
    margin: 0;
    padding: 0;
}
@media (min-width: 576px) { .drink-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem 1rem; } }
@media (min-width: 992px) { .drink-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem 1.25rem; } }
@media (min-width: 1400px) { .drink-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

.drink-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    color: var(--text);
    text-decoration: none;
    border-radius: var(--radius-md);
    -webkit-tap-highlight-color: transparent;
}
.drink-tile:hover { color: var(--text); }
.drink-tile:focus-visible { outline-offset: 4px; }

.drink-tile-media {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--surface-2);
    border: 1px solid var(--border);
}
.drink-tile-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s var(--ease), opacity var(--dur-2);
}
.drink-tile-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--text-subtle);
    font-size: 2rem;
}
@media (hover: hover) {
    .drink-tile:hover .drink-tile-media img { transform: scale(1.04); }
    .drink-tile:hover .drink-tile-title { color: var(--accent-text); }
}

.drink-tile-rating {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.15rem 0.45rem;
    border-radius: var(--radius-pill);
    background: rgba(11, 11, 15, 0.72);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
}
.drink-tile-rating i { color: var(--star); font-size: 0.7rem; }

.drink-tile-body { min-width: 0; padding: 0 0.1rem; }
.drink-tile-title {
    font-family: var(--body-font);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: -0.005em;
    line-height: 1.3;
    margin: 0;
    color: var(--text);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color var(--dur-1);
}
.drink-tile-meta {
    margin: 0.15rem 0 0;
    color: var(--text-muted);
    font-size: 0.8rem;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Horizontal rail (phones scroll sideways; desktop becomes a grid) */
.drink-rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 42%;
    gap: 0.75rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 calc(var(--bs-gutter-x) * 0.5);
    margin: 0 calc(var(--bs-gutter-x) * -0.5);
    padding: 0 calc(var(--bs-gutter-x) * 0.5) 0.25rem;
    list-style: none;
    scrollbar-width: none;
}
.drink-rail::-webkit-scrollbar { display: none; }
.drink-rail > li { scroll-snap-align: start; min-width: 0; }
@media (min-width: 576px) { .drink-rail { grid-auto-columns: 28%; } }
@media (min-width: 992px) {
    .drink-rail {
        grid-auto-flow: row;
        grid-template-columns: repeat(6, minmax(0, 1fr));
        grid-auto-columns: auto;
        overflow: visible;
        margin: 0;
        padding: 0;
        gap: 1.25rem;
    }
}

/* Plan cards (billing/_pricing_macros.html): the Yearly | Monthly toggle sets
   data-period on the picker and only that period's prices show. */
.plan-picker[data-period="yearly"] .price-monthly,
.plan-picker[data-period="monthly"] .price-yearly { display: none; }

/* 10. Chips & badges ------------------------------------------------------- */
.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 36px;
    padding: 0 0.9rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-pill);
    background: var(--surface-1);
    color: var(--text);
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background-color var(--dur-1), border-color var(--dur-1), color var(--dur-1);
}
.chip:hover { background: var(--surface-2); color: var(--text); }
.chip.active,
.chip[aria-pressed="true"],
.chip[aria-current="true"] {
    background: var(--text);
    border-color: var(--text);
    color: var(--bg);
}
.chip-count { color: var(--text-subtle); font-weight: 500; }
.chip.active .chip-count,
.chip[aria-current="true"] .chip-count { color: inherit; opacity: 0.7; }

@media (pointer: coarse) {
    .chip { min-height: 40px; }
}

.chip-row {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    scrollbar-width: none;
    margin: 0 calc(var(--bs-gutter-x) * -0.5);
    padding: 0.1rem calc(var(--bs-gutter-x) * 0.5);
}
.chip-row::-webkit-scrollbar { display: none; }
@media (min-width: 992px) {
    .chip-row { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }
}

.badge { font-weight: 600; border-radius: var(--radius-pill); }
.badge.bg-primary { background-color: var(--accent) !important; }

.badge-soft,
.soft-badge {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: var(--radius-pill);
    font-size: var(--text-xs);
    font-weight: 500;
    background-color: var(--surface-2);
    color: var(--text-muted);
    border: 1px solid var(--border);
}
.badge-soft { background-color: var(--accent-soft); color: var(--accent-text); border-color: var(--accent-border); }
.badge-soft-secondary { background-color: var(--surface-2); color: var(--text-muted); border-color: var(--border); }
.badge-soft-danger { background-color: rgba(220, 38, 38, 0.12); color: var(--danger); border-color: rgba(220, 38, 38, 0.25); }
.badge-soft-warning { background-color: rgba(245, 165, 36, 0.14); color: var(--warning); border-color: rgba(245, 165, 36, 0.3); }
.badge-soft-success { background-color: rgba(22, 163, 74, 0.12); color: var(--success); border-color: rgba(22, 163, 74, 0.25); }

.info-chip,
.garnish-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-pill);
    background-color: var(--surface-2);
    color: var(--text);
    border: 1px solid var(--border);
    font-size: 0.875rem;
    white-space: nowrap;
}
.info-chip .label,
.garnish-chip .label { color: var(--text-muted); font-weight: 500; }
.info-chip .value,
.garnish-chip .value { font-weight: 600; }

/* 11. Forms ---------------------------------------------------------------- */
.form-control,
.form-select {
    min-height: var(--control-h);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-strong);
    background-color: var(--surface-1);
    color: var(--text);
    font-size: 1rem;
}
.form-control { padding: 0.55rem 0.85rem; }
.form-control:focus,
.form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-ring);
    background-color: var(--surface-1);
    color: var(--text);
}
.form-control::placeholder { color: var(--text-subtle); opacity: 1; }
.form-control:disabled,
.form-select:disabled { background-color: var(--surface-2); }
.form-label { font-weight: 500; font-size: 0.925rem; }
.form-text { color: var(--text-muted); }
.form-check-input { border-color: var(--border-strong); background-color: var(--surface-1); }
.form-check-input:checked { background-color: var(--accent); border-color: var(--accent); }
.form-check-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.input-group-text { background: var(--surface-2); border-color: var(--border-strong); color: var(--text-muted); }

/* 12. Overlays: menus, modals, toasts -------------------------------------- */
.dropdown-menu {
    --bs-dropdown-bg: var(--surface-raised);
    --bs-dropdown-color: var(--text);
    --bs-dropdown-border-color: var(--border-strong);
    --bs-dropdown-border-radius: var(--radius-md);
    --bs-dropdown-inner-border-radius: calc(var(--radius-md) - 1px);
    --bs-dropdown-link-color: var(--text);
    --bs-dropdown-link-hover-color: var(--text);
    --bs-dropdown-link-hover-bg: var(--surface-2);
    --bs-dropdown-link-active-color: var(--text);
    --bs-dropdown-link-active-bg: var(--accent-soft);
    --bs-dropdown-header-color: var(--text-subtle);
    --bs-dropdown-divider-bg: var(--border);
    --bs-dropdown-item-border-radius: var(--radius-sm);
    --bs-dropdown-padding-x: 0.35rem;
    --bs-dropdown-padding-y: 0.35rem;
    --bs-dropdown-item-padding-y: 0.5rem;
    --bs-dropdown-font-size: 0.925rem;
    box-shadow: var(--shadow-2);
    min-width: 13rem;
}
.dropdown-item { border-radius: var(--radius-sm); }
.dropdown-item i { color: var(--text-muted); }
.dropdown-header { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.dropdown-item.unit-choice { display: flex; align-items: center; gap: 0.75rem; }
.dropdown-item.unit-choice .fa-check { color: var(--accent-text); }

.modal {
    --bs-modal-bg: var(--surface-raised);
    --bs-modal-color: var(--text);
    --bs-modal-border-color: var(--border-strong);
    --bs-modal-border-radius: var(--radius-xl);
    --bs-modal-inner-border-radius: calc(var(--radius-xl) - 1px);
    --bs-modal-header-border-color: var(--border);
    --bs-modal-footer-border-color: var(--border);
    --bs-modal-box-shadow: var(--shadow-2);
}
.modal-backdrop { --bs-backdrop-bg: #000; --bs-backdrop-opacity: 0.6; }
.modal-title { font-weight: 600; }

.toast {
    --bs-toast-bg: var(--surface-raised);
    --bs-toast-color: var(--text);
    --bs-toast-border-color: var(--border-strong);
    --bs-toast-border-radius: var(--radius-md);
    --bs-toast-box-shadow: var(--shadow-2);
}

.accordion {
    --bs-accordion-bg: transparent;
    --bs-accordion-color: var(--text);
    --bs-accordion-border-color: var(--border);
    --bs-accordion-border-radius: var(--radius-md);
    --bs-accordion-inner-border-radius: calc(var(--radius-md) - 1px);
    --bs-accordion-btn-color: var(--text);
    --bs-accordion-btn-bg: transparent;
    --bs-accordion-active-color: var(--text);
    --bs-accordion-active-bg: var(--surface-2);
    --bs-accordion-btn-focus-box-shadow: 0 0 0 3px var(--accent-ring);
}

/* Tables (incl. Bootstrap's fixed-light .table-light headers) */
.table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--text);
    --bs-table-border-color: var(--border);
    --bs-table-striped-bg: var(--surface-2);
    --bs-table-hover-bg: var(--surface-2);
}
.table-light {
    --bs-table-bg: var(--surface-2);
    --bs-table-color: var(--text);
    --bs-table-border-color: var(--border);
}

.nav-pills {
    --bs-nav-pills-border-radius: var(--radius-pill);
    --bs-nav-pills-link-active-bg: var(--text);
    --bs-nav-pills-link-active-color: var(--bg);
    --bs-nav-link-color: var(--text-muted);
    --bs-nav-link-hover-color: var(--text);
}
.nav-tabs {
    --bs-nav-tabs-border-color: var(--border);
    --bs-nav-tabs-link-active-bg: var(--surface-1);
    --bs-nav-tabs-link-active-color: var(--text);
    --bs-nav-tabs-link-active-border-color: var(--border) var(--border) var(--surface-1);
    --bs-nav-link-color: var(--text-muted);
    --bs-nav-link-hover-color: var(--text);
}

/* Toast stack for showAlert() */
.app-toasts {
    position: fixed;
    left: 50%;
    bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    width: min(420px, calc(100% - 2rem));
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 1090;
    pointer-events: none;
}
.app-toasts .alert {
    pointer-events: auto;
    margin: 0;
    padding: 0.7rem 2.75rem 0.7rem 1rem;
    background: var(--surface-raised);
    color: var(--text);
    border: 1px solid var(--border-strong);
    box-shadow: var(--shadow-2);
    font-size: 0.925rem;
}
.app-toasts .alert-success { border-left: 3px solid var(--success); }
.app-toasts .alert-danger { border-left: 3px solid var(--danger); }
.app-toasts .alert .btn-close { padding: 0.95rem; }
@media (max-width: 991.98px) {
    .app-toasts { bottom: calc(var(--bottom-tab-height) + 0.75rem + env(safe-area-inset-bottom, 0px)); }
}

/* 13. Pagination, alerts, empty states ------------------------------------- */
.pagination {
    --bs-pagination-color: var(--text);
    --bs-pagination-bg: var(--surface-1);
    --bs-pagination-border-color: var(--border);
    --bs-pagination-hover-color: var(--text);
    --bs-pagination-hover-bg: var(--surface-2);
    --bs-pagination-hover-border-color: var(--border-strong);
    --bs-pagination-focus-color: var(--text);
    --bs-pagination-focus-bg: var(--surface-2);
    --bs-pagination-focus-box-shadow: 0 0 0 3px var(--accent-ring);
    --bs-pagination-active-color: var(--bg);
    --bs-pagination-active-bg: var(--text);
    --bs-pagination-active-border-color: var(--text);
    --bs-pagination-disabled-color: var(--text-subtle);
    --bs-pagination-disabled-bg: transparent;
    --bs-pagination-disabled-border-color: var(--border);
    gap: 0.35rem;
    flex-wrap: wrap;
}
.pagination .page-link {
    border-radius: var(--radius-sm) !important;
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
}

.alert {
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.empty-state {
    text-align: center;
    padding: 3rem 1.25rem;
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-lg);
    background: var(--surface-1);
}
.empty-state-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--text-muted);
    margin-bottom: 1rem;
}
.empty-state-icon .icon-2rem { font-size: 1.5rem; }
.empty-state-title { font-size: 1.2rem; font-weight: 600; margin-bottom: 0.35rem; }
.empty-state-text { color: var(--text-muted); max-width: 32rem; margin: 0 auto 1.25rem; }
.empty-state-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; }

.section-panel {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

/* Skeleton loaders (used by the chat UIs) */
.skeleton {
    background: linear-gradient(110deg, var(--surface-2) 8%, var(--surface-3) 18%, var(--surface-2) 33%);
    background-size: 200% 100%;
    border-radius: var(--radius-sm);
    animation: shimmer 1.4s linear infinite;
    color: transparent !important;
    user-select: none;
    pointer-events: none;
}
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.spinner {
    border: 2px solid var(--surface-3);
    border-top: 2px solid var(--accent);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-right: 0.5rem;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Stars (display + input) */
.rating-display { white-space: nowrap; }
.rating-display .fa-star.text-warning { color: var(--star) !important; }
.rating-stars { display: inline-flex; gap: 0.15rem; }
.rating-star {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    color: var(--text-subtle);
    font-size: 1.3rem;
    cursor: pointer;
    transition: color var(--dur-1), transform var(--dur-1);
}
.rating-star.highlighted,
.rating-star.fas { color: var(--star); }
.rating-star:hover { transform: scale(1.08); }

/* 14. Legacy components (profile, about, categories) ----------------------- */
.hero-section {
    position: relative;
    background:
        radial-gradient(120% 140% at 100% 0%, rgba(var(--brand-primary-rgb), 0.45) 0%, rgba(var(--brand-primary-rgb), 0) 55%),
        var(--surface-1);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
}
.hero-section.text-white,
.hero-section .text-white { color: var(--text) !important; }
.hero-section.bg-primary { background-color: var(--surface-1) !important; }
.hero-visual {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background-color: var(--surface-2);
}
.hero-visual img,
.hero-visual .placeholder-image {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
}
.hero-cta-primary,
.hero-cta-secondary { border-radius: var(--radius-pill); }

.feature-icon { background-color: var(--accent-soft) !important; color: var(--accent-text) !important; }

.cocktail-card {
    transition: transform var(--dur-2) var(--ease), box-shadow var(--dur-2), border-color var(--dur-2);
    cursor: pointer;
}
@media (hover: hover) {
    .cocktail-card:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow-2) !important; }
}
.cocktail-image { border-radius: var(--radius-lg); }

.img-cover-150 { width: 100%; height: 150px; object-fit: cover; }
.img-cover-200 { width: 100%; height: 200px; object-fit: cover; }
.img-cover-300 { width: 100%; height: 300px; object-fit: cover; }
.h-150 { height: 150px; }
.h-200 { height: 200px; }
.h-300 { height: 300px; }
.aspect-1x1 { aspect-ratio: 1 / 1; width: 100%; object-fit: cover; }
.aspect-4x5 { aspect-ratio: 4 / 5; width: 100%; object-fit: cover; }

.placeholder-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--surface-2);
    color: var(--text-subtle);
}
.placeholder-image.aspect-1x1,
.placeholder-image.aspect-4x5 { height: auto; }

.ingredient-list,
.instructions-section,
.filter-section {
    background-color: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
}
.ingredient-item { padding: var(--space-2) 0; border-bottom: 1px solid var(--border); }
.ingredient-item:last-child { border-bottom: none; }

@media (max-width: 768px) {
    .hero-section { padding: 1.5rem 1.25rem !important; }
    .hero-section .display-4 { font-size: 2rem; }
}

/* 15. Utilities ------------------------------------------------------------ */
.icon-2rem { font-size: 2rem; }
.icon-3rem { font-size: 3rem; }
.icon-4rem { font-size: 4rem; }
.icon-5rem { font-size: 5rem; }
.icon-8rem { font-size: 8rem; }
.icon-12rem { font-size: 12rem; }
.op-50 { opacity: 0.5; }
.op-60 { opacity: 0.6; }
.op-70 { opacity: 0.7; }
.op-80 { opacity: 0.8; }
.text-accent { color: var(--accent-text) !important; }
.text-premium { color: var(--premium) !important; }

/* ─── Image lightbox (BA-MOBILE-IMG-001) — tap to expand ─── */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(4, 8, 10, 0.93);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    cursor: zoom-out;
    animation: lightbox-in 0.16s ease-out;
}
.lightbox-img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; box-shadow: 0 8px 40px rgba(0,0,0,0.5); }
.lightbox-close {
    position: absolute; top: 1rem; right: 1rem;
    width: 2.5rem; height: 2.5rem;
    display: flex; align-items: center; justify-content: center;
    background: rgba(20, 30, 34, 0.85); color: #e8e6e3;
    border: 1px solid rgba(255,255,255,0.15); border-radius: 50%;
    font-size: 1rem; cursor: pointer;
}
.lightbox-close:hover { background: rgba(40, 55, 60, 0.95); }
body.lightbox-open { overflow: hidden; }
@keyframes lightbox-in { from { opacity: 0; } to { opacity: 1; } }

/* Expand hint badge on tappable hero images */
img[data-lightbox] { cursor: zoom-in; }
.recipe-hero:has(img[data-lightbox])::after,
.creation-hero:has(img[data-lightbox])::after {
    content: "\f065";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    right: 0.65rem;
    bottom: 0.65rem;
    width: 2rem; height: 2rem;
    display: flex; align-items: center; justify-content: center;
    background: rgba(8, 12, 14, 0.62);
    color: #e8e6e3;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    pointer-events: none;
    z-index: 2;
}

/* EOF */

/* Beta gate: a tile that opens the invite wall for gated visitors (BA-LANDING-001) */
.drink-tile-lock {
    position: absolute;
    bottom: 0.5rem;
    left: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.15rem 0.45rem;
    border-radius: var(--radius-pill);
    background: rgba(11, 11, 15, 0.72);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    color: #fff;
    font-size: var(--text-xs);
    font-weight: 600;
}
.drink-tile-lock i { font-size: 0.65rem; }
