/**
 * BrewFormul8 — bf8.css
 * Complete design system. Mobile-first.
 * Dark mode default, light mode via [data-theme="light"].
 * Cinzel + Cormorant Garamond + IBM Plex Mono + Source Sans 3
 */

/* ════════════════════════════════════════════════════════════════════════════
   CSS CUSTOM PROPERTIES — DESIGN TOKENS
════════════════════════════════════════════════════════════════════════════ */

:root {
    /* Brand colors */
    --amber:          #C8741A;
    --amber-light:    #E8A230;
    --amber-dark:     #8B4E0F;
    --hop-green:      #7AB84A;
    --green-ok:       #27AE60;
    --red:            #C0392B;
    --yellow:         #F39C12;

    /* Dark theme (default) */
    --bg-page:        #0E0B07;
    --bg-app:         #110D06;
    --bg-card:        #19110A;
    --bg-input:       rgba(255,255,255,0.06);
    --bg-modal:       #1C1409;
    --bg-nav:         #19110A;

    --text-primary:   #F2E8D5;
    --text-secondary: rgba(242,232,213,0.85);
    --text-muted:     rgba(242,232,213,0.55);
    --text-input:     #F2E8D5;

    --border:         rgba(200,116,26,0.18);
    --border-input:   rgba(200,116,26,0.35);
    --border-focus:   #C8741A;
    --rule:           rgba(200,116,26,0.2);

    --shadow:         0 8px 32px rgba(0,0,0,0.5);
    --shadow-sm:      0 2px 8px rgba(0,0,0,0.4);

    /* Typography */
    --font-display:   'Cinzel', serif;
    --font-body:      'Source Sans 3', sans-serif;
    --font-editorial: 'Cormorant Garamond', serif;
    --font-mono:      'IBM Plex Mono', monospace;

    /* Sizing */
    --topnav-h:       56px;
    --cardnav-h:      40px;
    --bottomnav-h:    62px;
    --radius:         6px;
    --radius-sm:      3px;
    --radius-lg:      12px;

    /* Transitions */
    --transition:     0.2s ease;
}

/* Light theme overrides */
[data-theme="light"] {
    --bg-page:        #EDE4D0;
    --bg-app:         #E8DCC6;
    --bg-card:        #F0E6D2;
    --bg-input:       rgba(0,0,0,0.04);
    --bg-modal:       #F0E6D2;
    --bg-nav:         #F0E6D2;

    --text-primary:   #3D2008;
    --text-secondary: rgba(61,32,8,0.85);
    --text-muted:     rgba(61,32,8,0.6);
    --text-input:     #3D2008;

    --border:         rgba(139,78,15,0.2);
    --border-input:   rgba(139,78,15,0.4);
    --border-focus:   #8B4E0F;
    --rule:           rgba(139,78,15,0.15);

    --shadow:         0 8px 32px rgba(0,0,0,0.12);
    --shadow-sm:      0 2px 8px rgba(0,0,0,0.08);
}


/* ════════════════════════════════════════════════════════════════════════════
   RESET & BASE
════════════════════════════════════════════════════════════════════════════ */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.55;
    color: var(--text-primary);
    background: var(--bg-page);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--amber);
    text-decoration: none;
}
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

button {
    cursor: pointer;
    font-family: var(--font-body);
    border: none;
    background: none;
    color: inherit;
}

input, select, textarea {
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--text-input);
}

select option { background: var(--bg-card); color: var(--text-primary); }


/* ════════════════════════════════════════════════════════════════════════════
   TOP NAV
════════════════════════════════════════════════════════════════════════════ */

.bf8-topnav {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--topnav-h);
    background: var(--bg-nav);
    border-bottom: 1px solid var(--border);
    z-index: 100;
    backdrop-filter: blur(8px);
}

.bf8-topnav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 14px;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

/* Logo */
.bf8-topnav__logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.bf8-logo-flask { flex-shrink: 0; }

.bf8-logo-wordmark {
    font-family: var(--font-display);
    font-size: 18px;
    letter-spacing: 0.06em;
    line-height: 1;
}

.bf8-logo-brew   { font-weight: 400; color: var(--text-primary); }
.bf8-logo-formul8 { font-weight: 900; color: var(--amber); }

/* Hamburger */
.bf8-topnav__hamburger,
.bf8-topnav__hamburger-placeholder {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: color var(--transition), background var(--transition);
}
.bf8-topnav__hamburger:hover { color: var(--amber); background: var(--bg-input); }

/* Right side */
.bf8-topnav__right {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Brew button */
.bf8-brew-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    transition: color var(--transition), background var(--transition);
}
.bf8-brew-btn:hover { color: var(--amber); background: var(--bg-input); }
.bf8-brew-btn__label {
    font-family: var(--font-display);
    font-size: 8px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

/* New Recipe circle button (shown on non-Formulator pages) */
.bf8-new-recipe-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--amber);
    color: #fff;
    font-size: 16px;
    line-height: 1;
    text-decoration: none;
    transition: background var(--transition), transform var(--transition);
}
.bf8-new-recipe-btn:hover {
    background: var(--amber-hover, #b5610f);
    transform: scale(1.08);
    text-decoration: none;
    color: #fff;
}

/* Theme toggle + gear */
.bf8-topnav__theme-toggle,
.bf8-topnav__gear {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: color var(--transition), background var(--transition);
    position: relative;
}
.bf8-topnav__theme-toggle:hover,
.bf8-topnav__gear:hover { color: var(--amber); background: var(--bg-input); }

/* Gear dropdown */
.bf8-gear-menu {
    display: none;
    position: absolute;
    top: calc(var(--topnav-h) - 4px);
    right: 10px;
    background: var(--bg-modal);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    min-width: 180px;
    z-index: 200;
    overflow: hidden;
}
.bf8-gear-menu.is-open { display: block; }
.bf8-gear-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    font-size: 14px;
    color: var(--text-primary);
    transition: background var(--transition);
    text-decoration: none;
}
.bf8-gear-menu a:hover { background: var(--bg-input); color: var(--amber); }
.bf8-gear-menu a i { width: 16px; opacity: 0.6; }
.bf8-gear-menu__divider { height: 1px; background: var(--border); margin: 4px 0; }

/* Sign up link (pre-login) */
.bf8-topnav__signup-link {
    font-size: 13px;
    color: var(--amber);
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: background var(--transition);
}
.bf8-topnav__signup-link:hover { background: var(--bg-input); text-decoration: none; }


/* ════════════════════════════════════════════════════════════════════════════
   SIDE NAV (hamburger menu)
════════════════════════════════════════════════════════════════════════════ */

.bf8-sidenav {
    position: fixed;
    top: 0; left: 0;
    width: 260px;
    height: 100vh;
    background: var(--bg-modal);
    border-right: 1px solid var(--border);
    z-index: 300;
    transform: translateX(-100%);
    transition: transform 0.28s ease;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}
.bf8-sidenav.is-open { transform: translateX(0); }

.bf8-sidenav__overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 299;
}
.bf8-sidenav__overlay.is-visible { display: block; }

.bf8-sidenav__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid var(--rule);
    min-height: var(--topnav-h);
}
.bf8-sidenav__user {
    font-size: 14px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.bf8-sidenav__close {
    color: var(--text-muted);
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
}
.bf8-sidenav__close:hover { color: var(--amber); }

.bf8-sidenav__links {
    list-style: none;
    padding: 8px 0;
    flex: 1;
}
.bf8-sidenav__links li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 20px;
    font-size: 15px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition), background var(--transition);
}
.bf8-sidenav__links li a:hover { color: var(--amber); background: var(--bg-input); }
.bf8-sidenav__links li a i { width: 18px; opacity: 0.55; }
.bf8-sidenav__divider {
    height: 1px;
    background: var(--rule);
    margin: 8px 0;
}

/* Tier badge */
.bf8-tier-badge {
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 20px;
    border: 1px solid currentColor;
}
.bf8-tier-badge--guest   { color: var(--text-muted); }
.bf8-tier-badge--member  { color: var(--amber); }
.bf8-tier-badge--premier { color: var(--hop-green); }


/* ════════════════════════════════════════════════════════════════════════════
   MAIN CONTENT AREA
════════════════════════════════════════════════════════════════════════════ */

.bf8-main {
    padding-top: calc(var(--topnav-h) + var(--cardnav-h));
    padding-bottom: var(--bottomnav-h, 0px);
    min-height: 100vh;
    background: var(--bg-app);
}


/* ════════════════════════════════════════════════════════════════════════════
   CARD NAV (Settings / Mash / Kettle / Ferment / Target)
════════════════════════════════════════════════════════════════════════════ */

.bf8-card-nav {
    position: fixed;
    top: var(--topnav-h);
    left: 0; right: 0;
    height: var(--cardnav-h);
    background: var(--bg-nav);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: stretch;
    z-index: 90;
    overflow-x: auto;
    scrollbar-width: none;
    max-width: 100%;
}
.bf8-card-nav::-webkit-scrollbar { display: none; }

.bf8-card-nav__link {
    flex: 1;
    min-width: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    cursor: pointer;
    transition: color var(--transition);
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    padding: 0 8px;
    user-select: none;
}
.bf8-card-nav__link:hover { color: var(--text-secondary); }
.bf8-card-nav__link.active {
    color: var(--amber);
    border-bottom-color: var(--amber);
    font-weight: 700;
}


/* ════════════════════════════════════════════════════════════════════════════
   CARDS — Swiper handles slide transitions and touch gestures
   .bf8-card styles the content area inside each swiper-slide
════════════════════════════════════════════════════════════════════════════ */

.bf8-swiper {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.bf8-card {
    background: var(--bg-card);
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    min-height: calc(100vh - var(--topnav-h) - var(--cardnav-h));
    padding: 20px 16px 80px;
    width: 100%;
    box-sizing: border-box;
}

@media (min-width: 640px) {
    .bf8-card { padding: 28px 28px 80px; }
}


/* ════════════════════════════════════════════════════════════════════════════
   FORM ELEMENTS — INPUTS, SELECTS, SPINNERS
════════════════════════════════════════════════════════════════════════════ */

/* Base input */
.bf8-input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-input);
    border-radius: var(--radius-sm);
    padding: 9px 12px;
    color: var(--text-input);
    font-size: 15px;
    transition: border-color var(--transition), box-shadow var(--transition);
    -webkit-appearance: none;
}
.bf8-input:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 2px rgba(200,116,26,0.15);
}
.bf8-input--error { border-color: var(--red) !important; }
.bf8-input--sm    { padding: 6px 10px; font-size: 14px; width: auto; }
.bf8-input--num   { width: 72px; text-align: center; }
.bf8-input--wide  { width: 180px; }

/* Select */
.bf8-select {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-input);
    border-radius: var(--radius-sm);
    padding: 9px 32px 9px 12px;
    color: var(--text-input);
    font-size: 15px;
    cursor: pointer;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23C8741A' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    transition: border-color var(--transition);
}
.bf8-select:focus {
    outline: none;
    border-color: var(--border-focus);
}

/* Number spinner group */
.bf8-spinner {
    display: inline-flex;
    align-items: center;
    gap: 0;
    border: 1px solid var(--border-input);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-input);
}
.bf8-spinner input {
    width: 60px;
    text-align: center;
    background: transparent;
    border: none;
    padding: 7px 6px;
    color: var(--text-input);
    font-size: 15px;
}
.bf8-spinner input:focus { outline: none; }
.bf8-spinner__btn {
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--border-input);
}
.bf8-spinner__up,
.bf8-spinner__down {
    width: 24px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 9px;
    cursor: pointer;
    transition: color var(--transition), background var(--transition);
}
.bf8-spinner__up   { border-bottom: 1px solid var(--border-input); }
.bf8-spinner__up:hover,
.bf8-spinner__down:hover { color: var(--amber); background: var(--bg-input); }

/* Field group (label + input stacked) */
.bf8-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}
.bf8-field__label {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.bf8-field__label i { margin-right: 4px; opacity: 0.7; }

/* Inline field row */
.bf8-field-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: flex-start;
    margin-bottom: 16px;
}

/* Textarea */
.bf8-textarea {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-input);
    border-radius: var(--radius-sm);
    padding: 9px 12px;
    color: var(--text-input);
    font-size: 14px;
    resize: vertical;
    min-height: 64px;
}
.bf8-textarea:focus {
    outline: none;
    border-color: var(--border-focus);
}

/* Section divider within a card */
.bf8-card-section {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--rule);
}
.bf8-card-section:last-child { border-bottom: none; }

.bf8-card-section__heading {
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--amber);
    margin-bottom: 14px;
}

/* Description text under ingredient dropdowns */
.bf8-ingredient-desc {
    font-family: var(--font-editorial);
    font-style: italic;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
    line-height: 1.4;
    min-height: 20px;
}


/* ════════════════════════════════════════════════════════════════════════════
   INGREDIENT ROWS (Grain / Hop)
════════════════════════════════════════════════════════════════════════════ */

.bf8-ingredient-row {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 10px;
    transition: border-color var(--transition);
}
.bf8-ingredient-row:hover { border-color: var(--border-input); }
.bf8-ingredient-row.bf8-hidden { display: none; }

.bf8-ingredient-row__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.bf8-ingredient-row__label {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--amber);
}

/* Add ingredient button */
.bf8-add-row-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px dashed var(--border-input);
    border-radius: var(--radius);
    color: var(--text-muted);
    font-size: 13px;
    transition: color var(--transition), border-color var(--transition);
    width: 100%;
    justify-content: center;
    margin-top: 8px;
}
.bf8-add-row-btn:hover { color: var(--amber); border-color: var(--amber); }


/* ════════════════════════════════════════════════════════════════════════════
   BUTTONS
════════════════════════════════════════════════════════════════════════════ */

.bf8-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    border: 1px solid transparent;
    text-decoration: none;
}

.bf8-btn--primary {
    background: var(--bg-input);
    border-color: var(--border-input);
    color: var(--text-primary);
}
.bf8-btn--primary:hover { border-color: var(--amber); color: var(--amber); }

.bf8-btn--amber {
    background: var(--amber);
    color: #0E0B07;
    border-color: var(--amber);
}
.bf8-btn--amber:hover { background: var(--amber-light); border-color: var(--amber-light); }

.bf8-btn--outline {
    background: transparent;
    border-color: var(--border-input);
    color: var(--text-secondary);
}
.bf8-btn--outline:hover { border-color: var(--amber); color: var(--amber); }

.bf8-btn--fb {
    background: #1877F2;
    color: #fff;
    border-color: #1877F2;
}
.bf8-btn--fb:hover { background: #0e5fc3; }

.bf8-btn--copy {
    background: var(--bg-input);
    border-color: var(--border-input);
    color: var(--text-secondary);
}
.bf8-btn--copy:hover { border-color: var(--amber); color: var(--amber); }

.bf8-btn--email {
    background: var(--bg-input);
    border-color: var(--border-input);
    color: var(--text-secondary);
}
.bf8-btn--email:hover { border-color: var(--amber); color: var(--amber); }

.bf8-btn--sm { padding: 6px 12px; font-size: 11px; }
.bf8-btn--full { width: 100%; justify-content: center; }
.bf8-btn[disabled] { opacity: 0.4; cursor: not-allowed; }

/* Link-style button */
.bf8-btn-link {
    color: var(--amber);
    font-size: 13px;
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: underline;
}


/* ════════════════════════════════════════════════════════════════════════════
   MODALS
════════════════════════════════════════════════════════════════════════════ */

.bf8-modal-wrap {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    z-index: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    backdrop-filter: blur(3px);
}

.bf8-modal-box {
    background: var(--bg-modal);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.bf8-modal-box--brew { max-width: 360px; }
.bf8-modal-box--bjcp { max-width: 560px; }

/* ── Commercial Examples Modal ───────────────────────────────────────────── */
.bf8-comm-examples { padding: 20px; font-size: 13px; line-height: 1.6; }
.bf8-comm-examples__cat {
    font-size: 10px; font-weight: 700; letter-spacing: .08em;
    text-transform: uppercase; color: var(--text-muted); margin-bottom: 10px;
}
.bf8-comm-examples__label {
    font-family: var(--font-display); font-size: 11px; font-weight: 700;
    letter-spacing: .06em; text-transform: uppercase;
    color: var(--amber); margin-bottom: 10px;
}
.bf8-comm-examples__badges {
    display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px;
}
.bf8-comm-badge {
    background: rgba(200,116,26,0.12); border: 1px solid rgba(200,116,26,0.35);
    color: var(--amber); border-radius: 20px;
    padding: 4px 12px; font-size: 12px; font-weight: 500;
    text-decoration: none; transition: background .15s, border-color .15s;
}
.bf8-comm-badge:hover {
    background: rgba(200,116,26,0.28); border-color: var(--amber);
}
.bf8-comm-examples__empty {
    color: var(--text-muted); font-style: italic; margin-bottom: 18px;
}
.bf8-comm-examples__stats {
    display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px;
}
.bf8-comm-examples__stats span {
    flex: 1 1 calc(50% - 4px);
    min-width: 100px;
    background: var(--bg-card); border: 1px solid var(--border-input);
    border-radius: 6px; padding: 8px; text-align: center;
    font-size: 11px; line-height: 1.4;
}
.bf8-comm-examples__stats strong { display: block; color: var(--text-primary); margin-bottom: 4px; }
/* Remove inner borders on range boxes — outer stat card provides the border */
.bf8-comm-examples__stats .bf8-range-box {
    border: none;
    background: none;
    padding: 2px 4px;
}
@media (min-width: 480px) {
    .bf8-comm-examples__stats span { flex: 1 1 auto; }
}
.bf8-comm-examples__search { margin-bottom: 18px; overflow: hidden; }
.bf8-comm-examples__search .bf8-btn { white-space: normal; text-align: center; word-break: break-word; }
.bf8-comm-examples__details {
    border-top: 1px solid var(--border-input); padding-top: 14px;
}
.bf8-comm-examples__details summary {
    cursor: pointer; font-size: 12px; font-weight: 600;
    color: var(--text-muted); user-select: none;
    list-style: none; display: flex; align-items: center; gap: 6px;
}
.bf8-comm-examples__details summary::before {
    content: '▶'; font-size: 9px; transition: transform .2s;
}
.bf8-comm-examples__details[open] summary::before { transform: rotate(90deg); }
.bf8-comm-examples__notes {
    margin-top: 12px; font-size: 12px; color: var(--text-secondary); line-height: 1.6;
}
/* Legacy single-use SRM bar (kept for compatibility) */
.bf8-srm-bar {
    height: 10px; border-radius: 5px; margin-top: 6px; margin-bottom: 6px;
    border: 1px solid rgba(0,0,0,0.15);
}

/* Shared pill SRM bar — used in both modal and Styles browser */
.bf8-srm-pill {
    margin-bottom: 14px;
}
.bf8-srm-pill__grad {
    height: 10px;
    border-radius: 5px;
    border: 1px solid rgba(255,255,255,0.08);
}
.bf8-srm-pill__labels {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 3px;
    font-family: 'IBM Plex Mono', monospace;
}
.bf8-range-boxes {
    display: flex; gap: 4px; margin-top: 6px; justify-content: center;
}
.bf8-range-box {
    flex: 1; border: 1px solid var(--border-input); border-radius: 4px;
    padding: 4px 4px 3px; font-size: 10px; text-align: center;
    color: var(--text-secondary); background: var(--bg-input);
    display: flex; flex-direction: column; align-items: center; gap: 1px;
}
.bf8-range-box em {
    font-style: normal; font-size: 8px; letter-spacing: .04em;
    text-transform: uppercase; color: var(--text-muted);
}

.bf8-modal-box__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid var(--rule);
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--amber);
    position: sticky;
    top: 0;
    background: var(--bg-modal);
    z-index: 1;
}
.bf8-modal-box__header button {
    color: var(--text-muted);
    width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-sm);
    transition: color var(--transition), background var(--transition);
}
.bf8-modal-box__header button:hover { color: var(--amber); background: var(--bg-input); }

.bf8-modal-box__body {
    padding: 18px;
    flex: 1;
}

/* Save / success / warning feedback modals */
.bf8-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    /* transition and visibility controlled by bf8DismissNotification() in bf8app.js */
}

.bf8-modal {
    border-radius: var(--radius-lg);
    padding: 8px;
    width: 260px;
    box-shadow: var(--shadow);
}
.bf8-modal--success { background: #00B75B; }
.bf8-modal--warning { background: #C8741A; }
.bf8-modal--error   { background: #C0392B; }

.bf8-modal__inner {
    border: 2px solid rgba(255,255,255,0.5);
    border-radius: 10px;
    padding: 40px 20px;
    text-align: center;
    color: #fff;
    font-size: 15px;
    line-height: 1.5;
}


/* ════════════════════════════════════════════════════════════════════════════
   BREW MODAL LAYOUT
════════════════════════════════════════════════════════════════════════════ */

.bf8-brew-modal__layout {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 16px;
}

.bf8-brew-modal__flask-wrap {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.bf8-brew-modal__name {
    font-family: var(--font-editorial);
    font-style: italic;
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
    max-width: 100px;
    word-break: break-word;
}

.bf8-brew-modal__stats {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bf8-brew-modal__stat {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 14px;
    padding: 4px 0;
    border-bottom: 1px solid var(--rule);
}
.bf8-brew-modal__stat:last-of-type { border-bottom: none; }
.bf8-brew-modal__stat span { color: var(--text-muted); font-size: 12px; }
.bf8-brew-modal__stat strong { color: var(--text-primary); font-size: 16px; }

.bf8-brew-modal__bvscore {
    font-size: 13px;
    font-family: var(--font-mono);
    margin-top: 4px;
}

.bf8-brew-modal__cost {
    font-size: 20px;
    font-weight: 700;
    color: var(--amber);
    margin-top: 8px;
}
.bf8-brew-modal__cost small { font-size: 11px; color: var(--text-muted); font-weight: 400; }

.bf8-brew-modal__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 16px;
}

.bf8-brew-modal__share {
    border-top: 1px solid var(--rule);
    padding-top: 14px;
    margin-top: 4px;
}

.bf8-brew-modal__share-label {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.bf8-brew-modal__share-btns {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

/* Share toggle */
.bf8-brew-modal__share-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
}
.bf8-brew-modal__share-toggle input { display: none; }
.bf8-toggle-slider {
    width: 40px; height: 22px;
    background: var(--bg-input);
    border: 1px solid var(--border-input);
    border-radius: 11px;
    position: relative;
    transition: background var(--transition);
}
.bf8-toggle-slider::after {
    content: '';
    position: absolute;
    top: 3px; left: 3px;
    width: 14px; height: 14px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: transform var(--transition), background var(--transition);
}
.bf8-brew-modal__share-toggle input:checked + .bf8-toggle-slider {
    background: var(--amber);
    border-color: var(--amber);
}
.bf8-brew-modal__share-toggle input:checked + .bf8-toggle-slider::after {
    transform: translateX(18px);
    background: #fff;
}


/* ════════════════════════════════════════════════════════════════════════════
   TARGET CARD — GAUGES
════════════════════════════════════════════════════════════════════════════ */

.bf8-gauge-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.bf8-gauge-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    padding: 12px;
    text-align: center;
    cursor: pointer;
    transition: border-color var(--transition), background var(--transition);
    /* Explicit min-height so Raphael can measure on init */
    min-height: 130px;
}
.bf8-gauge-card:hover {
    border-color: var(--border-input);
    background: var(--bg-input);
}

.bf8-gauge-card__label {
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 6px;
}

/* Main balance gauge (full width) */
.bf8-gauge-card--main {
    grid-column: 1 / -1;
    padding: 16px;
    min-height: 220px;
}

/* Ensure gauge SVGs fill their containers */
.bf8-gauge-card > div > svg,
.bf8-gauge-card > div canvas {
    width: 100% !important;
}

.bf8-bjcp-description {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    padding: 14px;
    font-family: var(--font-editorial);
    font-size: 14px;
    font-style: italic;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-top: 12px;
}


/* ════════════════════════════════════════════════════════════════════════════
   SIGN IN PAGE
════════════════════════════════════════════════════════════════════════════ */

.bf8-signin-page {
    max-width: 440px;
    margin: 0 auto;
    padding: 24px 16px 60px;
}

.bf8-signin-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

.bf8-signin-card__title {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--amber);
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* OAuth buttons */
.bf8-oauth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 11px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    transition: opacity var(--transition);
    border: 1px solid var(--border-input);
}
.bf8-oauth-btn:hover { opacity: 0.85; text-decoration: none; }
.bf8-oauth-btn--google { background: #fff; color: #444; }
.bf8-oauth-btn--facebook { background: #1877F2; color: #fff; border-color: #1877F2; }

.bf8-signin-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
    color: var(--text-muted);
    font-size: 12px;
}
.bf8-signin-divider::before,
.bf8-signin-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--rule);
}


/* ════════════════════════════════════════════════════════════════════════════
   FOOTER
════════════════════════════════════════════════════════════════════════════ */

.bf8-footer {
    background: var(--bg-nav);
    border-top: 1px solid var(--border);
    padding: 14px 16px;
    text-align: center;
}

.bf8-footer__links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.bf8-footer__links a { color: var(--text-muted); }
.bf8-footer__links a:hover { color: var(--amber); text-decoration: none; }
.bf8-footer__links span { opacity: 0.3; }


/* ════════════════════════════════════════════════════════════════════════════
   TOAST NOTIFICATION
════════════════════════════════════════════════════════════════════════════ */

.bf8-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(16px);
    background: var(--bg-modal);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 10px 20px;
    font-size: 13px;
    color: var(--text-primary);
    box-shadow: var(--shadow);
    z-index: 600;
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
    white-space: nowrap;
    pointer-events: none;
}
.bf8-toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}


/* ════════════════════════════════════════════════════════════════════════════
   UTILITY CLASSES
════════════════════════════════════════════════════════════════════════════ */

.bf8-hidden  { display: none !important; }
.bf8-sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); }

.bf8-text-amber   { color: var(--amber); }
.bf8-text-muted   { color: var(--text-muted); }
.bf8-text-center  { text-align: center; }
.bf8-text-mono    { font-family: var(--font-mono); }
.bf8-text-display { font-family: var(--font-display); }

.bf8-mt-sm  { margin-top: 8px; }
.bf8-mt-md  { margin-top: 16px; }
.bf8-mt-lg  { margin-top: 24px; }
.bf8-mb-sm  { margin-bottom: 8px; }
.bf8-mb-md  { margin-bottom: 16px; }
.bf8-mb-lg  { margin-bottom: 24px; }

.bf8-flex        { display: flex; }
.bf8-flex-center { display: flex; align-items: center; justify-content: center; }
.bf8-gap-sm      { gap: 8px; }
.bf8-gap-md      { gap: 16px; }

/* Default settings link */
.bf8-defaults-link {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
    cursor: pointer;
    transition: color var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
}
.bf8-defaults-link:hover { color: var(--amber); }


/* ════════════════════════════════════════════════════════════════════════════
   LEGACY COMPATIBILITY — classes from original that still appear in includes
════════════════════════════════════════════════════════════════════════════ */

/* These map old class names to new design system values */
.saveButton, .formulateButton, .buyButton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    background: var(--amber);
    color: #0E0B07;
    border: none;
    transition: background var(--transition);
}
.saveButton:hover, .formulateButton:hover, .buyButton:hover {
    background: var(--amber-light);
}

.backButton, .printButton {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    cursor: pointer;
    background: var(--bg-input);
    border: 1px solid var(--border-input);
    color: var(--text-secondary);
    transition: border-color var(--transition), color var(--transition);
}
.backButton:hover, .printButton:hover { border-color: var(--amber); color: var(--amber); }

.hopBox {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 12px;
}

.popupMessage {
    background: var(--bg-modal);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 20px;
    text-align: center;
    max-width: 280px;
    box-shadow: var(--shadow);
}

.greyOverLayShown {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
}

.settingsInput {
    background: var(--bg-input);
    border: 1px solid var(--border-input);
    border-radius: var(--radius-sm);
    padding: 7px 10px;
    color: var(--text-input);
    font-size: 15px;
    text-align: center;
    width: 70px;
}
.settingsInput:focus {
    outline: none;
    border-color: var(--border-focus);
}

.linkText1 { color: var(--amber); text-decoration: underline; }
.carbon-text { color: var(--text-secondary); }

.fTableCell {
    padding: 8px 12px;
    border-bottom: 1px solid var(--rule);
    font-size: 13px;
    color: var(--text-secondary);
}

/* Active menu items in SignInMenu */
.activeMenu   { background: rgba(200,116,26,0.15); }
.inactiveMenu { background: transparent; }
.inactiveMenu:hover { background: var(--bg-input); }

/* MyAccountDiv / MyPrefDiv text boxes */
.textBox50, .textBox60, .textBox70, .textBox80,
.textBox120, .textBox150, .textBox170 {
    background: var(--bg-input);
    border: 1px solid var(--border-input);
    border-radius: var(--radius-sm);
    padding: 7px 10px;
    color: var(--text-input);
    font-size: 14px;
    text-align: center;
}
.textBox50  { width: 50px; }
.textBox60  { width: 60px; }
.textBox70  { width: 70px; }
.textBox80  { width: 80px; }
.textBox120 { width: 120px; }
.textBox150 { width: 150px; }
.textBox170 { width: 170px; }

.textBox50:focus, .textBox60:focus, .textBox70:focus,
.textBox80:focus, .textBox120:focus, .textBox150:focus,
.textBox170:focus {
    outline: none;
    border-color: var(--border-focus);
}

.boxBorder {
    border: 1px solid var(--border-input);
    border-radius: var(--radius-sm);
}

.fColorRed   { color: var(--red); }
.fColorBlue  { color: var(--amber-light); }
.fSize12     { font-size: 12px; }
.txtSz12     { font-size: 12px; }
.txtSz14     { font-size: 14px; }
.txtSz16     { font-size: 16px; }
.txtSz18     { font-size: 18px; }
.txtSz20     { font-size: 20px; }
.prefRowHt   { height: 60px; padding-top: 8px; vertical-align: middle; }


/* ════════════════════════════════════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════════════════════════════════════ */

@media (min-width: 640px) {
    .bf8-gauge-grid { grid-template-columns: repeat(3, 1fr); }
    .bf8-brew-modal__actions { grid-template-columns: repeat(4, 1fr); }
    .bf8-logo-wordmark { font-size: 20px; }
}

@media (max-width: 380px) {
    .bf8-card-nav__link { font-size: 9px; padding: 0 5px; }
    .bf8-logo-wordmark  { font-size: 16px; }
}

/* ════════════════════════════════════════════════════════════════════════════
   RECIPE CARDS — used by MyRecipes.php and SharedRecipes.php
   Defined here (not inline) so guests see correct layout on SharedRecipes
════════════════════════════════════════════════════════════════════════════ */

.bf8-myrecipes {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-height: 200px;
}

/* Toolbar */
.bf8-myrecipes__toolbar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 0 14px;
    border-bottom: 1px solid var(--rule);
    margin-bottom: 14px;
    position: sticky;
    top: 0;
    background: var(--bg-card);
    z-index: 2;
}
.bf8-myrecipes__search-wrap { position: relative; }
.bf8-myrecipes__search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 12px;
    pointer-events: none;
}
.bf8-myrecipes__search {
    width: 100%;
    padding: 8px 12px 8px 30px;
    background: var(--bg-input);
    border: 1px solid var(--border-input);
    border-radius: var(--radius-sm);
    color: var(--text-input);
    font-size: 14px;
    box-sizing: border-box;
}
.bf8-myrecipes__search:focus { outline: none; border-color: var(--border-focus); }
.bf8-myrecipes__controls { display: flex; gap: 12px; flex-wrap: wrap; }
.bf8-myrecipes__control-group {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 130px;
}
.bf8-myrecipes__control-label {
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    white-space: nowrap;
}
.bf8-select--sm { padding: 6px 28px 6px 8px; font-size: 12px; flex: 1; }
.bf8-myrecipes__count {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    text-align: right;
}

/* Style group heading */
.bf8-recipe-group { margin-bottom: 20px; }
.bf8-recipe-group__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--amber);
    padding: 6px 0;
    border-bottom: 1px solid var(--rule);
    margin-bottom: 8px;
}
.bf8-recipe-group__top {
    font-family: var(--font-mono);
    font-size: 9px;
    color: var(--text-muted);
    text-decoration: none;
    letter-spacing: 0.08em;
}
.bf8-recipe-group__top:hover { color: var(--amber); }

/* Recipe card */
.bf8-recipe-card {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--rule);
    align-items: flex-start;
}
.bf8-recipe-card:last-child { border-bottom: none; }

/* Beer glass column */
.bf8-recipe-card__glass {
    flex: 0 0 44px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.bf8-recipe-glass {
    width: 38px;
    height: 56px;
}
.bf8-recipe-card__shared {
    font-family: var(--font-mono);
    font-size: 8px;
    letter-spacing: 0.08em;
    color: var(--amber);
    text-align: center;
    line-height: 1.2;
}

/* Info column */
.bf8-recipe-card__info { flex: 1; min-width: 0; }
.bf8-recipe-card__name {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bf8-recipe-card__brewer { font-size: 11px; color: var(--text-muted); margin-bottom: 2px; }
.bf8-recipe-card__dates {
    font-family: var(--font-mono);
    font-size: 9px;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

/* Stats grid */
.bf8-recipe-card__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}
.bf8-recipe-card__stats strong { color: var(--text-muted); font-weight: 600; }

/* Action buttons */
.bf8-recipe-card__actions { display: flex; flex-wrap: wrap; gap: 6px; }

/* Danger button variant */
.bf8-btn--danger {
    background: transparent;
    border: 1px solid var(--red);
    color: var(--red);
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    font-size: 11px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-mono);
    letter-spacing: 0.05em;
    transition: background var(--transition), color var(--transition);
}
.bf8-btn--danger:hover { background: var(--red); color: #fff; }

/* Cost / batch column */
.bf8-recipe-card__cost {
    flex: 0 0 80px;
    text-align: right;
    font-size: 11px;
    color: var(--text-muted);
    padding-top: 2px;
}
.bf8-recipe-card__batch {
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

/* Empty / guest CTA state */
.bf8-myrecipes__empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-family: var(--font-editorial);
    font-style: italic;
}
.bf8-myrecipes__empty .fa { margin-bottom: 12px; opacity: 0.4; display: block; }
.bf8-myrecipes__empty p { margin: 4px 0; }
.bf8-myrecipes-error { padding: 20px; color: var(--red); text-align: center; }

/* Modal width override (when used in a modal) */
.bf8-modal-box--recipes { max-width: 680px; width: 95vw; }
@media (max-width: 480px) {
    .bf8-modal-box--recipes { width: 100vw; max-width: 100vw; border-radius: 0; }
}
@media (max-width: 400px) {
    .bf8-recipe-card__cost { display: none; }
}

@media print {
    .bf8-topnav,
    .bf8-card-nav,
    .bf8-sidenav,
    .bf8-footer,
    .bf8-brew-btn { display: none !important; }
    .bf8-main { padding-top: 0 !important; }
    body { background: #fff; color: #000; }
}

/* ── Google OAuth button ─────────────────────────────────────────────────── */
.bf8-btn--google {
    background: #fff;
    color: #3c4043;
    border: 1px solid #dadce0;
    font-family: var(--font-ui);
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}
.bf8-btn--google:hover {
    background: #f8f9fa;
    border-color: #c6c6c6;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    text-decoration: none;
    color: #3c4043;
}


/* ── Swiper pagination styled as card nav tabs ───────────────────────────── */
.swiper-container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    touch-action: pan-y; /* allows vertical scroll, lets Swiper handle horizontal swipe */
}

.swiper-pagination {
    position: fixed !important;
    top: var(--topnav-h) !important;
    left: 0 !important;
    right: 0 !important;
    bottom: auto !important;
    height: var(--cardnav-h);
    background: var(--bg-nav);
    border-bottom: 1px solid var(--border);
    display: flex !important;
    align-items: stretch;
    z-index: 90;
    width: 100% !important;
    transform: none !important;
}

.swiper-pagination-bullet {
    flex: 1;
    width: auto !important;
    height: auto !important;
    border-radius: 0 !important;
    background: transparent !important;
    opacity: 1 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    padding: 0 8px;
    transition: color var(--transition);
}

.swiper-pagination-bullet:hover {
    color: var(--text-secondary);
}

.swiper-pagination-bullet-active {
    color: var(--amber) !important;
    border-bottom-color: var(--amber);
    font-weight: 700;
    background: transparent !important;
    opacity: 1 !important;
}

/* ── JustGage text overrides — dark mode ────────────────────────────────── */
/* JustGage renders text in black by default — override for dark theme */
[data-theme="dark"] #gauge text,
[data-theme="dark"] #og_gauge text,
[data-theme="dark"] #fg_gauge text,
[data-theme="dark"] #abv_gauge text,
[data-theme="dark"] #ibu_gauge text,
[data-theme="dark"] #atten_gauge text,
[data-theme="dark"] #srm_gauge text,
[data-theme="dark"] #ftemp_gauge text,
[data-theme="dark"] #cal_gauge text,
[data-theme="dark"] #gauge2 text,
[data-theme="dark"] #og_gauge2 text,
[data-theme="dark"] #fg_gauge2 text,
[data-theme="dark"] #abv_gauge2 text,
[data-theme="dark"] #ibu_gauge2 text,
[data-theme="dark"] #atten_gauge2 text,
[data-theme="dark"] #srm_gauge2 text,
[data-theme="dark"] #ftemp_gauge2 text,
[data-theme="dark"] #cal_gauge2 text {
    fill: #F2E8D5 !important;
}

/* ── Brew modal button rows ──────────────────────────────────────────────── */
.bf8-brew-modal__actions--row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}
.bf8-brew-modal__actions--row .bf8-btn {
    flex: 1;
    justify-content: center;
    font-size: 13px;
    padding: 8px 6px;
}

/* Guest CTA */
.bf8-brew-modal__guest-cta {
    border-top: 1px solid var(--border);
    padding-top: 14px;
    margin-top: 6px;
}
.bf8-brew-modal__guest-signin {
    display: block;
    text-align: center;
    font-size: 12px;
    margin-top: 10px;
    color: var(--text-muted);
    text-decoration: none;
}
.bf8-brew-modal__guest-signin:hover { color: var(--amber); text-decoration: none; }

/* Share panel */
.bf8-brew-modal__share-panel {
    border-top: 1px solid var(--border);
    padding-top: 12px;
    margin-top: 4px;
}
.bf8-brew-modal__share-row {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}
.bf8-brew-modal__share-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}
.bf8-brew-modal__share-toggle input[type="checkbox"] { display: none; }
.bf8-brew-modal__share-label {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-secondary);
}
.bf8-brew-modal__share-btns {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.bf8-brew-modal__share-btns .bf8-btn {
    flex: 1;
    min-width: 80px;
    justify-content: center;
    font-size: 12px;
    padding: 7px 6px;
}

/* ════════════════════════════════════════════════════════════════════════════
   SENSORY DNA SPIDER CHART
════════════════════════════════════════════════════════════════════════════ */

.bf8-sensory-section {
    border-top: 1px solid var(--rule);
    padding-top: 16px;
    margin-top: 8px;
}

.bf8-sensory-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.bf8-sensory-title {
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: var(--amber);
    text-transform: uppercase;
}

.bf8-sensory-score-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}

.bf8-sensory-score-label {
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    text-transform: uppercase;
}

.bf8-sensory-score {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    min-width: 48px;
    text-align: right;
}

.bf8-sensory-hint {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 10px;
}

.bf8-sensory-chart-wrap {
    position: relative;
    cursor: pointer;
    border-radius: var(--radius);
    padding: 8px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    transition: border-color var(--transition);
    display: none; /* shown by JS when style selected */
}

.bf8-sensory-chart-wrap:hover {
    border-color: var(--amber);
}

.bf8-sensory-legend {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 6px;
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

.bf8-sensory-legend__recipe .fa { color: #C8741A; }
.bf8-sensory-legend__style  .fa { color: rgba(142,228,175,0.7); }

.bf8-sensory-no-style {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    text-align: center;
    padding: 24px 16px;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
}

/* ── Sensory modal ───────────────────────────────────────────────────────── */
.bf8-modal-box--sensory { max-width: 460px; }

.bf8-sensory-modal-score-wrap {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.bf8-sensory-modal-score-num {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
}

.bf8-sensory-modal-score-lbl {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    text-transform: uppercase;
}

.bf8-sensory-axes-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.bf8-sensory-axis-row {
    display: grid;
    grid-template-columns: 80px 1fr 32px auto;
    gap: 8px;
    align-items: center;
}

.bf8-sensory-axis-label {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.bf8-sensory-axis-bar-wrap {
    position: relative;
    height: 8px;
    background: var(--bg-input);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.bf8-sensory-axis-bar {
    position: absolute;
    left: 0; top: 0; height: 100%;
    background: var(--amber);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.bf8-sensory-axis-target {
    position: absolute;
    top: 0; height: 100%;
    background: rgba(142,228,175,0.3);
    border-left: 1px solid rgba(142,228,175,0.6);
    border-right: 1px solid rgba(142,228,175,0.6);
}

.bf8-sensory-axis-val {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-secondary);
    text-align: right;
}

.bf8-sensory-axis-status {
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.06em;
    white-space: nowrap;
}

.bf8-sensory-tip {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    padding: 8px 10px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--amber);
    margin-bottom: 8px;
}

.bf8-sensory-tip--ok {
    border-left-color: var(--green-ok);
    color: var(--green-ok);
}

.bf8-sensory-tip--note {
    color: var(--text-muted);
    font-style: italic;
}

/* ── Recipe View / Print page ────────────────────────────────────────────── */
.bf8-rv-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
}
.bf8-rv-header__title {
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--amber);
}
.bf8-rv-content {
    max-width: 860px;
    margin: 0 auto;
    padding: 24px 20px;
    background: #fff;
    color: #222;
}

/* ── Recipe Sheet — bf8-rs — CSS-class layout for generated recipe HTML ─── */
.bf8-rs {
    font-size: 14px;
    line-height: 1.5;
    color: #222;
}
.bf8-rs__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 12px;
    margin-bottom: 14px;
    border-bottom: 2px solid #c8741a;
}
.bf8-rs__header-info { flex: 1; }
.bf8-rs__bname {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 3px;
    color: #1a1a1a;
}
.bf8-rs__meta {
    font-size: 13px;
    color: #555;
    line-height: 1.45;
}
.bf8-rs__header-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding-left: 16px;
    flex-shrink: 0;
}
.bf8-rs__glass {
    width: 56px;
    height: 80px;
    display: block;
}
.bf8-rs__batch-info {
    text-align: center;
    font-size: 12px;
    color: #444;
    line-height: 1.5;
}
.bf8-rs__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.bf8-rs__stat {
    flex: 1;
    min-width: 70px;
    text-align: center;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 8px 6px;
    background: #fafafa;
}
.bf8-rs__stat-val {
    font-size: 17px;
    font-weight: 700;
    color: #c8741a;
    line-height: 1.2;
}
.bf8-rs__stat-lbl {
    font-size: 10px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-top: 2px;
}
.bf8-rs__section {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 14px;
}
.bf8-rs__section-title {
    background: #f2f2f2;
    font-weight: 700;
    font-size: 11px;
    text-align: center;
    padding: 6px 10px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #555;
    border-bottom: 1px solid #e0e0e0;
}
.bf8-rs__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
.bf8-rs__table th {
    background: #f8f8f8;
    padding: 5px 10px;
    text-align: left;
    border-bottom: 1px solid #e8e8e8;
    font-size: 11px;
    font-weight: 600;
    color: #666;
}
.bf8-rs__table td {
    padding: 5px 10px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: top;
}
.bf8-rs__table tr:last-child td { border-bottom: none; }
.bf8-rs__tc { text-align: center !important; }
.bf8-rs__note {
    font-size: 11px;
    color: #777;
    padding: 2px 10px 5px !important;
    background: #fafafa;
}
.bf8-rs__total-lbl {
    text-align: right;
    font-size: 11px;
    color: #777;
    font-style: italic;
}
.bf8-rs__hop-type { font-size: 11px; color: #888; }
.bf8-rs__water-row {
    display: flex;
    border-top: 1px solid #ececec;
    background: #fafafa;
}
.bf8-rs__water-cell {
    flex: 1;
    text-align: center;
    padding: 8px 4px;
    font-size: 12px;
    border-right: 1px solid #ececec;
}
.bf8-rs__water-cell:last-child { border-right: none; }
.bf8-rs__water-lbl {
    font-size: 10px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 3px;
}
.bf8-rs__notes-body {
    padding: 10px 14px;
    font-size: 13px;
    color: #444;
    line-height: 1.6;
}
.bf8-rs__style-section .bf8-rs__section-title {
    background: #fdf6ec;
    color: #8b4e0f;
    border-color: #f0dfc0;
}
.bf8-rs__style-body {
    padding: 12px 16px;
    font-size: 12px;
    color: #444;
    line-height: 1.65;
}
.bf8-rs__style-body div { margin-bottom: 8px; }
.bf8-rs__style-body div:last-child { margin-bottom: 0; }
.bf8-rv-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    max-width: 860px;
    margin: 0 auto;
}
.bf8-rv-noaccess {
    text-align: center;
    padding: 80px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.bf8-rv-cta {
    background: var(--bg-card);
    border-top: 2px solid var(--amber);
    padding: 32px 16px;
    text-align: center;
    margin-top: 0;
}
.bf8-rv-cta__inner {
    max-width: 500px;
    margin: 0 auto;
}
.bf8-rv-cta__headline {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    color: var(--amber);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: .08em;
}
.bf8-rv-cta p {
    color: var(--text-muted);
    margin: 0 0 16px;
    font-size: 13px;
    line-height: 1.5;
}
@media print {
    .no-print { display: none !important; }
    .bf8-rv-content { padding: 0; max-width: 100%; }
    #RecipeViewContainer { background: #fff; }
    /* Force SVG fills to print */
    .bf8-rs__glass { display: block !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .bf8-rs__stats { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .bf8-rs__section-title { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ── Ingredient Browser ─────────────────────────────────────────────────────── */
.bf8-ing-section { padding: 0 0 60px; }

/* Toolbar */
.bf8-ing-toolbar {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
    margin: 0 0 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.bf8-ing-toolbar__top {
    display: flex;
    align-items: center;
    gap: 8px;
}
.bf8-ing-sort-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.bf8-ing-sort-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    white-space: nowrap;
}
.bf8-ing-sort-btn {
    font-size: 12px;
    padding: 3px 10px;
    border: 1px solid var(--border-input);
    border-radius: 20px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all .15s;
}
.bf8-ing-sort-btn:hover { border-color: var(--amber); color: var(--amber); }
.bf8-ing-sort-btn.active { border-color: var(--amber); background: var(--amber); color: #000; font-weight: 600; }
.bf8-ing-sort-dir {
    width: 28px; height: 28px;
    border: 1px solid var(--border-input);
    border-radius: 50%;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px;
    transition: all .15s;
}
.bf8-ing-sort-dir:hover { border-color: var(--amber); color: var(--amber); }
.bf8-ing-group-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.bf8-ing-group-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
    cursor: pointer;
    user-select: none;
}
.bf8-ing-group-toggle input { accent-color: var(--amber); }
.bf8-select {
    background: var(--surface3);
    border: 1px solid var(--border-input);
    border-radius: 6px;
    color: var(--text);
    padding: 3px 8px;
}
.bf8-select--sm { font-size: 12px; }

/* Category header */
.bf8-ing-cat-header {
    font-size: 13px;
    font-weight: 700;
    color: var(--amber);
    text-transform: uppercase;
    letter-spacing: .08em;
    padding: 10px 4px 4px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 8px;
    margin-top: 4px;
}

/* Cards */
.bf8-ing-card {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 10px;
    overflow: hidden;
    transition: border-color .15s;
}
.bf8-ing-card:hover { border-color: var(--border-input); }
.bf8-ing-card__header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px 8px;
}
.bf8-ing-card__title { flex: 1; min-width: 0; }
.bf8-ing-card__name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bf8-ing-card__sku {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}
.bf8-ing-card__cat-badge {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--amber);
    border: 1px solid var(--amber);
    border-radius: 20px;
    padding: 2px 7px;
    white-space: nowrap;
    flex-shrink: 0;
}
.bf8-ing-card__stats {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 12px;
    color: var(--text-muted);
    padding: 0 12px 8px;
}
.bf8-ing-card__stats span { display: flex; align-items: center; gap: 5px; }
.bf8-ing-card__desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
    padding: 0 12px 8px;
    border-top: 1px solid var(--border);
    padding-top: 8px;
}
.bf8-ing-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-top: 1px solid var(--border);
    gap: 8px;
}
.bf8-ing-card__price {
    font-size: 18px;
    font-weight: 700;
    color: var(--amber);
}
.bf8-ing-card__price small {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 400;
}

/* Cart controls */
.bf8-ing-cart { display: flex; align-items: center; gap: 8px; }
.bf8-ing-qty {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-input);
    border-radius: 6px;
    overflow: hidden;
}
.bf8-ing-qty__btn {
    width: 28px; height: 28px;
    background: var(--surface3);
    border: none;
    color: var(--text);
    font-size: 14px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .12s;
}
.bf8-ing-qty__btn:hover { background: var(--border-input); }
.bf8-ing-qty__input {
    width: 36px;
    text-align: center;
    background: transparent;
    border: none;
    border-left: 1px solid var(--border-input);
    border-right: 1px solid var(--border-input);
    color: var(--text);
    font-size: 13px;
    -moz-appearance: textfield;
}
.bf8-ing-qty__input::-webkit-inner-spin-button,
.bf8-ing-qty__input::-webkit-outer-spin-button { -webkit-appearance: none; appearance: none; margin: 0; }

/* Color swatches */
.bf8-ing-swatch {
    width: 14px; height: 14px;
    border-radius: 3px;
    border: 1px solid rgba(0,0,0,.25);
    flex-shrink: 0;
    display: inline-block;
}
.bf8-ing-swatch--lg {
    width: 36px; height: 36px;
    border-radius: 6px;
    flex-shrink: 0;
}
.bf8-ing-swatch--inline {
    width: 10px; height: 10px;
    border-radius: 2px;
    vertical-align: middle;
}

/* Yeast / Hop tag pills */
.bf8-ing-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    background: var(--surface3);
    border: 1px solid var(--border-input);
    border-radius: 20px;
    padding: 1px 7px;
    color: var(--text-muted);
    margin: 2px 2px 0 0;
}
.bf8-ing-tag--accent { border-color: var(--amber); color: var(--amber); }

/* ════════════════════════════════════════════════════════════════════════════
   BEER STYLES BROWSER — StylesDiv.php
════════════════════════════════════════════════════════════════════════════ */

#StylesContainer {
    padding: 0 0 40px;
}
.bf8-styles-section {
    max-width: 860px;
    margin: 0 auto;
    padding: 16px 16px 40px;
}

/* ── Style card ─────────────────────────────────────────────────────────── */
.bf8-style-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 10px;
    margin-bottom: 14px;
    overflow: hidden;
}

.bf8-style-card__header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px 10px;
}

.bf8-style-card__num {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 18px;
    font-weight: 700;
    color: var(--amber);
    background: var(--surface3);
    border: 1px solid var(--amber-dark);
    border-radius: 6px;
    padding: 4px 10px;
    flex-shrink: 0;
    min-width: 48px;
    text-align: center;
}

.bf8-style-card__title {
    flex: 1;
    min-width: 0;
}
.bf8-style-card__name {
    font-family: 'Cinzel', serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}
.bf8-style-card__cat {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ── SRM gradient bar (uses shared .bf8-srm-pill from global CSS) ─────────── */
.bf8-style-card .bf8-srm-pill {
    margin: 0 14px 10px;
}

/* ── Stat boxes row ──────────────────────────────────────────────────────── */
.bf8-style-card__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 14px 10px;
}
.bf8-style-stat {
    flex: 1 1 calc(50% - 4px);
    background: var(--surface2, rgba(255,255,255,0.04));
    border: 1px solid var(--border-input);
    border-radius: 6px;
    padding: 6px 8px;
    min-width: 100px;
    text-align: center;
}
@media (min-width: 480px) {
    .bf8-style-stat { flex: 1 1 auto; }
}
.bf8-style-stat__label {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 3px;
}
.bf8-style-stat__range {
    display: flex;
    justify-content: space-between;
    gap: 4px;
}
.bf8-style-stat__lo,
.bf8-style-stat__hi {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'IBM Plex Mono', monospace;
    line-height: 1.1;
}
.bf8-style-stat__lo small,
.bf8-style-stat__hi small {
    font-size: 9px;
    font-weight: 400;
    color: var(--text-muted);
    font-family: 'Source Sans 3', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.bf8-style-stat__unit {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ── Commercial examples ─────────────────────────────────────────────────── */
.bf8-style-card__comms {
    padding: 0 14px 10px;
    line-height: 1.8;
}
.bf8-style-card__comms-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}
.bf8-comm-badge {
    display: inline-block;
    font-size: 11px;
    background: var(--surface3);
    border: 1px solid var(--border-input);
    border-radius: 20px;
    padding: 2px 9px;
    color: var(--amber-light);
    margin: 2px 3px 2px 0;
    text-decoration: none;
    transition: border-color 0.15s, color 0.15s;
}
.bf8-comm-badge:hover {
    border-color: var(--amber);
    color: var(--amber);
}

/* ── Tags row ────────────────────────────────────────────────────────────── */
.bf8-style-card__tags {
    padding: 0 14px 10px;
    line-height: 1.8;
}

/* ── Expandable details ──────────────────────────────────────────────────── */
.bf8-style-card__details {
    border-top: 1px solid var(--border-input);
}
.bf8-style-detail {
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.bf8-style-detail:last-child {
    border-bottom: none;
}
.bf8-style-detail summary {
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 6px;
    user-select: none;
}
.bf8-style-detail summary::-webkit-details-marker { display: none; }
.bf8-style-detail summary::before {
    content: '\f078';
    font-family: FontAwesome;
    font-size: 9px;
    color: var(--amber);
    transition: transform 0.2s;
    flex-shrink: 0;
}
.bf8-style-detail[open] summary::before {
    transform: rotate(180deg);
}
.bf8-style-detail summary:hover { color: var(--text-primary); }
.bf8-style-detail p {
    margin: 0;
    padding: 0 14px 12px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Light theme adjustments */
[data-theme="light"] .bf8-style-card {
    background: var(--bg-card);
    border-color: var(--border-card);
}
[data-theme="light"] .bf8-comm-badge {
    background: rgba(0,0,0,0.04);
}

/* ════════════════════════════════════════════════════════════════════════════
   BOTTOM NAV BAR
════════════════════════════════════════════════════════════════════════════ */

.bf8-bottom-nav {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: var(--bottomnav-h);
    background: var(--bg-nav);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 900;
    /* Safe area for notched phones */
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.bf8-bottom-nav__btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    flex: 1;
    height: 100%;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    text-decoration: none;
    transition: color var(--transition);
}
.bf8-bottom-nav__btn:hover,
.bf8-bottom-nav__btn:active {
    color: var(--amber);
    text-decoration: none;
}
.bf8-bottom-nav__btn span {
    font-family: var(--font-ui);
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1;
}

/* Center button — Brew / New Recipe — prominent amber treatment */
.bf8-bottom-nav__center {
    color: var(--amber);
    font-size: 22px;
    position: relative;
}
.bf8-bottom-nav__center::before {
    content: '';
    position: absolute;
    top: 6px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(200, 116, 26, 0.12);
    border: 1px solid rgba(200, 116, 26, 0.25);
    transition: background var(--transition);
}
.bf8-bottom-nav__center:hover::before,
.bf8-bottom-nav__center:active::before {
    background: rgba(200, 116, 26, 0.22);
}
/* Keep SVG/icon above the circle */
.bf8-bottom-nav__center svg,
.bf8-bottom-nav__center .fa,
.bf8-bottom-nav__center span {
    position: relative;
    z-index: 1;
}

/* Remove brew/new-recipe buttons from topnav right (they live in bottom nav now) */
.bf8-brew-btn,
.bf8-new-recipe-btn {
    display: none;
}

/* Light theme */
[data-theme="light"] .bf8-bottom-nav {
    background: var(--bg-nav);
    border-top-color: var(--border);
}

/* ════════════════════════════════════════════════════════════════════════════
   STORE — StoreDiv.php
════════════════════════════════════════════════════════════════════════════ */

.bf8-store-section {
    padding: 0 0 40px;
}

/* Empty / coming soon state */
.bf8-store-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--text-muted);
    text-align: center;
    gap: 12px;
}
.bf8-store-empty p {
    font-family: var(--font-display);
    font-size: 16px;
    color: var(--text-secondary);
    margin: 0;
}
.bf8-store-empty small {
    font-size: 12px;
    color: var(--text-muted);
}

/* Product card */
.bf8-store-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 10px;
    margin-bottom: 14px;
    overflow: hidden;
}

/* Image block — white bg for product photos */
.bf8-store-card__img-wrap {
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 20px;
    min-height: 160px;
}
.bf8-store-card__img {
    max-width: 220px;
    max-height: 180px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

/* Card body */
.bf8-store-card__body {
    padding: 16px;
}
.bf8-store-card__name {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    line-height: 1.3;
}
.bf8-store-card__sku {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 10px;
}
.bf8-store-card__desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-bottom: 14px;
    border-top: 1px solid var(--border-input);
    padding-top: 10px;
}

/* Pricing */
.bf8-store-card__pricing {
    margin-bottom: 14px;
}
.bf8-store-card__price {
    font-size: 24px;
    font-weight: 700;
    color: var(--amber);
    line-height: 1.1;
}
.bf8-store-card__price small {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-muted);
}
.bf8-store-card__price2 {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.bf8-store-card__member-badge {
    display: inline-block;
    font-size: 9px;
    font-weight: 700;
    background: rgba(200,116,26,0.15);
    border: 1px solid var(--amber-dark);
    color: var(--amber);
    border-radius: 20px;
    padding: 1px 7px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Footer: qty + add to cart */
.bf8-store-card__footer {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.bf8-store-card__footer .bf8-btn {
    flex: 1;
    justify-content: center;
}

/* Light theme */
[data-theme="light"] .bf8-store-card__img-wrap {
    background: #f5f5f5;
}

/* ════════════════════════════════════════════════════════════════════════════
   CART ICON (header)
════════════════════════════════════════════════════════════════════════════ */

.bf8-topnav__cart {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 17px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: color var(--transition), background var(--transition);
}
.bf8-topnav__cart:hover { color: var(--amber); background: var(--bg-input); }

.bf8-cart-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: var(--amber);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    font-family: var(--font-ui);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    pointer-events: none;
}

/* ════════════════════════════════════════════════════════════════════════════
   CART DRAWER
════════════════════════════════════════════════════════════════════════════ */

/* Overlay — full-screen dim behind panel */
.bf8-cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
.bf8-cart-wrap--open .bf8-cart-overlay {
    opacity: 1;
    pointer-events: all;
}

/* Slide-in panel */
.bf8-cart-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 380px;
    max-width: 96vw;
    background: var(--bg-modal);
    border-left: 1px solid var(--border-card);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    /* Account for bottom nav */
    padding-bottom: var(--bottomnav-h, 0px);
}
.bf8-cart-wrap--open .bf8-cart-panel {
    transform: translateX(0);
}

/* Panel header */
.bf8-cart-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border-input);
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    flex-shrink: 0;
}
.bf8-cart-panel__header em {
    font-style: normal;
    font-size: 12px;
    color: var(--text-muted);
    margin-left: 6px;
    font-family: var(--font-ui);
    font-weight: 400;
}
.bf8-cart-panel__close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 16px;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: var(--radius);
    transition: color var(--transition);
}
.bf8-cart-panel__close:hover { color: var(--text-primary); }

/* Scrollable body */
.bf8-cart-panel__body {
    flex: 1;
    overflow-y: auto;
    padding: 12px 18px;
    -webkit-overflow-scrolling: touch;
}

/* Cart item row */
.bf8-cart-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-input);
}
.bf8-cart-item:last-child { border-bottom: none; }

.bf8-cart-item__info { flex: 1; min-width: 0; }
.bf8-cart-item__name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 2px;
}
.bf8-cart-item__meta {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 2px;
}
.bf8-cart-item__unit-price {
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.bf8-cart-item__controls {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
}
.bf8-cart-item__line {
    font-size: 14px;
    font-weight: 700;
    color: var(--amber);
    font-family: var(--font-mono);
}
.bf8-cart-item__remove {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 3px;
    transition: color var(--transition);
}
.bf8-cart-item__remove:hover { color: var(--red, #C0392B); }

/* Smaller qty spinner for cart */
.bf8-ing-qty--sm .bf8-ing-qty__btn  { width: 26px; height: 26px; font-size: 14px; }
.bf8-ing-qty--sm .bf8-ing-qty__input { width: 34px; height: 26px; font-size: 12px; }

/* Empty state */
.bf8-cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 20px;
    color: var(--text-muted);
    text-align: center;
    gap: 14px;
}
.bf8-cart-empty p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

/* Footer: totals + checkout */
.bf8-cart-panel__footer {
    padding: 16px 18px;
    border-top: 1px solid var(--border-input);
    flex-shrink: 0;
    background: var(--bg-modal);
}
.bf8-cart-totals { margin-bottom: 14px; }
.bf8-cart-totals__row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-secondary);
    padding: 3px 0;
}
.bf8-cart-totals__total {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    border-top: 1px solid var(--border-input);
    padding-top: 8px;
    margin-top: 4px;
}

/* Light theme */
[data-theme="light"] .bf8-cart-panel {
    background: var(--bg-modal);
    border-left-color: var(--border-card);
}

/* ════════════════════════════════════════════════════════════════════════════
   CHECKOUT PAGE
════════════════════════════════════════════════════════════════════════════ */

.bf8-page-container {
    max-width: 680px;
    margin: 0 auto;
    padding: 24px 16px 100px; /* bottom padding clears the fixed bottom nav */
}

/* Step indicator */
.bf8-checkout__steps {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    font-size: 13px;
    color: var(--text-muted);
}
.bf8-checkout__step {
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid var(--border-card);
    color: var(--text-muted);
}
.bf8-checkout__step--active {
    border-color: var(--amber);
    color: var(--amber);
    font-weight: 600;
}
.bf8-checkout__step-sep {
    color: var(--text-muted);
    font-size: 16px;
}

/* Headings */
.bf8-checkout__heading {
    font-family: 'Cinzel', serif;
    font-size: 18px;
    color: var(--text-primary);
    margin: 0 0 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-card);
}
.bf8-checkout__subheading {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--amber-light);
    margin: 0 0 10px;
}

/* Form rows */
.bf8-checkout__row {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
}
.bf8-checkout__field {
    display: flex;
    flex-direction: column;
    flex: 1;
}
.bf8-checkout__field--full {
    flex: 1 1 100%;
}
.bf8-checkout__field--sm {
    flex: 0 0 80px;
}
.bf8-checkout__field label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 5px;
}
.bf8-checkout__field input,
.bf8-checkout__field select,
.bf8-checkout__field textarea {
    background: var(--bg-input);
    border: 1px solid var(--border-input);
    border-radius: 4px;
    color: var(--text-primary);
    font-family: 'Source Sans 3', sans-serif;
    font-size: 15px;
    padding: 9px 12px;
    transition: border-color 0.15s;
}
.bf8-checkout__field input:focus,
.bf8-checkout__field select:focus,
.bf8-checkout__field textarea:focus {
    outline: none;
    border-color: var(--amber);
}
.bf8-checkout__field input::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}
.req { color: var(--amber); }

/* Error message */
.bf8-checkout__error {
    background: rgba(192, 57, 43, 0.12);
    border: 1px solid var(--red);
    border-radius: 4px;
    color: #e07060;
    font-size: 13px;
    padding: 10px 14px;
    margin: 12px 0 0;
}

/* Review panel */
.bf8-checkout__review-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}
.bf8-checkout__addr-summary {
    background: var(--bg-input);
    border: 1px solid var(--border-card);
    border-radius: 6px;
    padding: 14px 16px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
}
.bf8-checkout__addr-summary p { margin: 0; }

/* Order summary */
.bf8-checkout__summary {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}
.bf8-checkout__items-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 12px;
}
.bf8-checkout__items-table td {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-card);
    font-size: 14px;
    color: var(--text-primary);
    vertical-align: top;
}
.bf8-checkout__item-name { width: 60%; }
.bf8-checkout__item-qty  { width: 20%; color: var(--text-muted); font-size: 13px; text-align: right; }
.bf8-checkout__item-price { width: 20%; text-align: right; font-weight: 600; }

.bf8-checkout__totals {
    margin-top: 8px;
}
.bf8-checkout__total-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-muted);
    padding: 4px 0;
}
.bf8-checkout__total-row--grand {
    font-size: 16px;
    font-weight: 700;
    color: var(--amber);
    border-top: 1px solid var(--border-card);
    padding-top: 8px;
    margin-top: 4px;
}

/* PayPal section */
.bf8-checkout__pay-section {
    margin-top: 8px;
}
.bf8-checkout__pay-note {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0 0 14px;
    line-height: 1.5;
}
#paypal-button-container {
    max-width: 400px;
}

/* Full-width button helper */
.bf8-btn--full { width: 100%; justify-content: center; margin-top: 12px; }

/* ════════════════════════════════════════════════════════════════════════════
   ORDER CONFIRMATION PAGE
════════════════════════════════════════════════════════════════════════════ */

.bf8-confirm {
    text-align: center;
    padding-top: 8px;
}
.bf8-confirm__icon { margin-bottom: 12px; }
.bf8-confirm__title {
    font-family: 'Cinzel', serif;
    font-size: 24px;
    color: var(--amber);
    margin: 0 0 8px;
}
.bf8-confirm__sub {
    color: var(--text-secondary);
    font-size: 15px;
    margin: 0 0 20px;
}
.bf8-confirm__number {
    display: inline-block;
    background: var(--bg-input);
    border: 1px solid var(--amber);
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 15px;
    color: var(--text-primary);
    margin-bottom: 28px;
}
.bf8-confirm__section {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    text-align: left;
}
.bf8-confirm__section-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--amber-light);
    margin: 0 0 12px;
}
.bf8-confirm__table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 8px;
}
.bf8-confirm__table th {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 6px 0;
    border-bottom: 1px solid var(--amber);
    text-align: left;
}
.bf8-confirm__table th:last-child,
.bf8-confirm__table td:last-child { text-align: right; }
.bf8-confirm__table td {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-card);
    font-size: 14px;
    color: var(--text-primary);
}
.bf8-confirm__totals { margin-top: 8px; }
.bf8-confirm__total-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-muted);
    padding: 4px 0;
}
.bf8-confirm__total-row--grand {
    font-size: 16px;
    font-weight: 700;
    color: var(--amber);
    border-top: 1px solid var(--border-card);
    padding-top: 8px;
    margin-top: 4px;
}
.bf8-confirm__addr {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0;
}
.bf8-confirm__note {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0 0 24px;
}
.bf8-confirm__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}
.bf8-confirm__notfound {
    text-align: center;
    padding: 40px 0;
    color: var(--text-secondary);
}
.bf8-confirm__notfound h2 {
    color: var(--amber);
    font-family: 'Cinzel', serif;
    margin: 0 0 12px;
}

/* ════════════════════════════════════════════════════════════════════════════
   SUPPLIER TRACKING ENTRY PAGE
════════════════════════════════════════════════════════════════════════════ */

.bf8-tracking__header { margin-bottom: 24px; }
.bf8-tracking__title {
    font-family: 'Cinzel', serif;
    font-size: 20px;
    color: var(--amber);
    margin: 0 0 6px;
}
.bf8-tracking__sub {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}
.bf8-tracking__section {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}
.bf8-tracking__section-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--amber-light);
    margin: 0 0 10px;
}
.bf8-tracking__table {
    width: 100%;
    border-collapse: collapse;
}
.bf8-tracking__table th {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 6px 0;
    border-bottom: 1px solid var(--amber);
    text-align: left;
}
.bf8-tracking__table td {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-card);
    font-size: 14px;
    color: var(--text-primary);
}
.bf8-tracking__addr {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin: 0;
}
.bf8-tracking__form { margin-top: 8px; }
.bf8-tracking__field {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
}
.bf8-tracking__field label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 5px;
}
.bf8-tracking__field input,
.bf8-tracking__field select,
.bf8-tracking__field textarea {
    background: var(--bg-input);
    border: 1px solid var(--border-input);
    border-radius: 4px;
    color: var(--text-primary);
    font-family: 'Source Sans 3', sans-serif;
    font-size: 15px;
    padding: 9px 12px;
    transition: border-color 0.15s;
}
.bf8-tracking__field input:focus,
.bf8-tracking__field select:focus,
.bf8-tracking__field textarea:focus {
    outline: none;
    border-color: var(--amber);
}
.bf8-tracking__error-state,
.bf8-tracking__success {
    text-align: center;
    padding: 40px 0;
    color: var(--text-secondary);
}
.bf8-tracking__error-state h2,
.bf8-tracking__success h2 {
    color: var(--amber);
    font-family: 'Cinzel', serif;
    margin: 0 0 12px;
}

/* Responsive: stack form fields on very small screens */
@media (max-width: 420px) {
    .bf8-checkout__row { flex-direction: column; gap: 0; }
    .bf8-checkout__field--sm { flex: 1 1 100%; }
}

/* Field hint (inline validation feedback) */
.bf8-checkout__field-hint {
    font-size: 11px;
    margin-top: 3px;
    min-height: 14px;
}

/* Shipping note under totals */
.bf8-checkout__shipping-note {
    font-size: 12px;
    color: var(--text-muted);
    margin: 6px 0 0;
    line-height: 1.4;
}

/* ════════════════════════════════════════════════════════════════════════════
   ORDER RECEIPT (screen + print)
════════════════════════════════════════════════════════════════════════════ */

.bf8-confirm__actions-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.bf8-receipt {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 8px;
    overflow: hidden;
    max-width: 780px;
    margin: 0 auto;
}

.bf8-receipt__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px 24px;
    border-bottom: 2px solid var(--amber);
    background: var(--bg-app);
    flex-wrap: wrap;
    gap: 12px;
}
.bf8-receipt__brand {
    display: block;
    font-family: 'Cinzel', serif;
    font-size: 20px;
    color: var(--amber);
    letter-spacing: 0.04em;
}
.bf8-receipt__tagline {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.bf8-receipt__meta {
    text-align: right;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.8;
}
.bf8-receipt__meta strong {
    color: var(--text-muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-right: 4px;
}

.bf8-receipt__confirm-msg {
    display: flex;
    align-items: center;
    padding: 14px 24px;
    background: rgba(200, 116, 26, 0.08);
    border-bottom: 1px solid var(--border-card);
    font-size: 14px;
    color: var(--text-secondary);
}

.bf8-receipt__body {
    display: flex;
    gap: 0;
    padding: 0;
}
.bf8-receipt__col {
    flex: 1;
    padding: 20px 24px;
    border-right: 1px solid var(--border-card);
}
.bf8-receipt__col:last-child { border-right: none; }

.bf8-receipt__col-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--amber-light);
    margin: 0 0 10px;
}
.bf8-receipt__addr,
.bf8-receipt__contact {
    font-style: normal;
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin: 0;
}

.bf8-receipt__table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 12px;
}
.bf8-receipt__table th {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    padding: 5px 0;
    border-bottom: 1px solid var(--amber);
    text-align: left;
}
.bf8-receipt__table th:last-child,
.bf8-receipt__table td:last-child { text-align: right; }
.bf8-receipt__table td {
    padding: 7px 0;
    border-bottom: 1px solid var(--border-card);
    font-size: 13px;
    color: var(--text-primary);
}

.bf8-receipt__totals { border-top: 1px solid var(--border-card); padding-top: 8px; }
.bf8-receipt__total-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-muted);
    padding: 3px 0;
}
.bf8-receipt__total-row--grand {
    font-size: 15px;
    font-weight: 700;
    color: var(--amber);
    border-top: 1px solid var(--border-card);
    padding-top: 6px;
    margin-top: 4px;
}

.bf8-receipt__footer {
    padding: 14px 24px;
    border-top: 1px solid var(--border-card);
    background: var(--bg-app);
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.5;
}
.bf8-receipt__footer p { margin: 0; }

.bf8-confirm__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

/* ════════════════════════════════════════════════════════════════════════════
   PRINT STYLES
════════════════════════════════════════════════════════════════════════════ */

@media print {
    /* Hide everything except the receipt */
    .no-print,
    .bf8-topnav,
    .bf8-sidenav,
    .bf8-sidenav__overlay,
    .bf8-bottom-nav,
    .bf8-cart-wrap,
    .bf8-main > *:not(#OrderConfirmContainer),
    #OrderConfirmContainer > *:not(.bf8-receipt) {
        display: none !important;
    }

    body, html {
        background: #fff !important;
        color: #111 !important;
        font-family: Arial, sans-serif;
        font-size: 12pt;
        margin: 0;
        padding: 0;
    }

    .bf8-receipt {
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        background: #fff !important;
        max-width: 100% !important;
        margin: 0 !important;
    }
    .bf8-receipt__header {
        background: #fff !important;
        border-bottom: 2pt solid #C8741A !important;
        padding: 12pt 0 !important;
    }
    .bf8-receipt__brand  { color: #C8741A !important; font-size: 18pt !important; }
    .bf8-receipt__tagline { color: #666 !important; }
    .bf8-receipt__meta   { color: #333 !important; }
    .bf8-receipt__meta strong { color: #666 !important; }

    .bf8-receipt__confirm-msg { display: none !important; }

    .bf8-receipt__body { border-top: 1pt solid #ddd; }
    .bf8-receipt__col {
        padding: 12pt 0 !important;
        border-right: 1pt solid #ddd !important;
    }
    .bf8-receipt__col:last-child { border-right: none !important; padding-left: 16pt !important; }
    .bf8-receipt__col-title { color: #C8741A !important; }
    .bf8-receipt__addr,
    .bf8-receipt__contact { color: #333 !important; }

    .bf8-receipt__table th { color: #666 !important; border-bottom: 1pt solid #C8741A !important; }
    .bf8-receipt__table td { color: #111 !important; border-bottom: 1pt solid #eee !important; }
    .bf8-receipt__total-row { color: #555 !important; }
    .bf8-receipt__total-row--grand { color: #C8741A !important; border-top: 1pt solid #ddd !important; }

    .bf8-receipt__footer {
        background: #f8f8f8 !important;
        color: #555 !important;
        border-top: 1pt solid #ddd !important;
        padding: 8pt 0 !important;
    }

    @page {
        margin: 0.75in;
        size: letter portrait;
    }
}
