/* Global utilities layered on top of MudBlazor + the Voltage theme. */

/* Muted body text — the grey "secondary text" palette colour.
   Use this instead of Color="Color.Secondary", which is the magenta brand colour. */
.text-muted {
    color: var(--mud-palette-text-secondary) !important;
}

/* Smooth in-page scrolling for the storefront header anchors (How it works / Reviews on Home).
   scroll-behavior is on <html> only, so inner scroll containers (e.g. the order chat) keep their
   default behaviour. :target offsets the linked section below the 64px sticky top bar. */
html {
    scroll-behavior: smooth;
}

:target {
    scroll-margin-top: 84px;
}

/* FocusOnNavigate (Routes.razor) focuses the page's <h1> after each navigation so screen readers announce it —
   that focus is programmatic, so don't paint a ring around the heading. */
h1:focus {
    outline: none;
}

/* --- Colour picker (admin dialogs) --- */
.color-field__label { font-size: .75rem; color: var(--mud-palette-text-secondary); margin-bottom: 6px; }
.color-field__swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.color-swatch { width: 28px; height: 28px; border-radius: 8px; border: 2px solid rgba(255,255,255,.15); cursor: pointer; padding: 0; transition: transform .1s ease, border-color .1s ease; }
.color-swatch:hover { transform: scale(1.12); }
.color-swatch.sel { border-color: #fff; box-shadow: 0 0 0 2px var(--mud-palette-primary); }
.color-field__custom { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.color-field__native { width: 44px; height: 40px; border: none; background: none; cursor: pointer; padding: 0; }

/* --- Hub tabs --- */
.pts-tabpanel { padding-top: 20px; }

/* AB Points wheel of fortune */
.wheel-stage { position: relative; width: min(460px, 100%); margin: 4px auto 4px; }
.wheel-svg { width: 100%; height: auto; display: block; filter: drop-shadow(0 12px 30px rgba(0,0,0,.5)); }
.wheel-rotor { transform-box: view-box; transform-origin: 160px 160px; }
.wheel-label { font: 700 12px/1 Arial, sans-serif; fill: #fff; letter-spacing: .3px; paint-order: stroke; stroke: rgba(0,0,0,.28); stroke-width: .6px; }
.wheel-label.gold { fill: #3a1d00; stroke: rgba(255,255,255,.35); }
.ab-wheel-hub { font: 800 16px Arial, sans-serif; fill: #fff; }

.wheel-sector { transition: filter .2s ease; }
.wheel-sector.won { filter: brightness(1.35) drop-shadow(0 0 6px rgba(255,255,255,.85)); }

.wheel-light { fill: #7a2233; animation: light-chase 1.6s linear infinite; animation-delay: calc(var(--i, 0) * -0.066s); }
@keyframes light-chase { 0%, 100% { fill: #7a2233; } 9% { fill: #ffd98a; } }
.wheel-stage.spinning .wheel-light { animation-duration: .55s; }
.wheel-stage.win-flash .wheel-light { animation: light-flash .28s linear 5; }
@keyframes light-flash { 0%, 100% { fill: #7a2233; } 50% { fill: #ffe6a8; } }

.ab-wheel-pointer {
    position: absolute; top: -4px; left: 50%; transform: translateX(-50%); transform-origin: 50% 4px; z-index: 2; width: 0; height: 0;
    border-left: 14px solid transparent; border-right: 14px solid transparent; border-top: 26px solid var(--mud-palette-primary);
    filter: drop-shadow(0 2px 3px rgba(0,0,0,.5));
}
.ab-wheel-pointer.flap { animation: pointer-flap .13s ease; }
@keyframes pointer-flap { 0% { transform: translateX(-50%) rotate(0); } 45% { transform: translateX(-50%) rotate(-18deg); } 100% { transform: translateX(-50%) rotate(0); } }

.ab-confetti { position: fixed; inset: 0; pointer-events: none; z-index: 1500; overflow: hidden; }
.ab-confetti i { position: absolute; top: -18px; border-radius: 2px; opacity: .95; animation-name: ab-conf-fall; animation-timing-function: cubic-bezier(.3,.2,.6,1); animation-fill-mode: forwards; }
@keyframes ab-conf-fall { to { transform: translateY(110vh) rotate(680deg); opacity: .85; } }

.pts-overlay { position: fixed; inset: 0; z-index: 1300; background: radial-gradient(ellipse at center, rgba(0,0,0,.42), rgba(0,0,0,.72)); backdrop-filter: blur(3px); animation: pts-fade .25s ease; }
.pts-confirm { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 1400; width: min(360px, 88vw); padding: 22px 24px; border-radius: 16px; background: var(--mud-palette-surface); border: 1px solid var(--mud-palette-lines-default); box-shadow: 0 24px 60px rgba(0,0,0,.55); }
@keyframes pts-fade { from { opacity: 0; } to { opacity: 1; } }

.pts-result {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 1400;
    display: flex; flex-direction: column; align-items: center; text-align: center; width: min(340px, 86vw);
    padding: 26px 28px 22px; border-radius: 18px; overflow: hidden;
    background: var(--mud-palette-surface); border: 1px solid var(--mud-palette-lines-default);
    box-shadow: 0 24px 60px rgba(0,0,0,.55);
    animation: pts-pop .45s cubic-bezier(.2,1.3,.4,1);
}
.pts-result > * { position: relative; z-index: 1; }
@keyframes pts-pop {
    0% { transform: translate(-50%, -50%) scale(.82); opacity: 0; }
    60% { transform: translate(-50%, -50%) scale(1.03); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.pts-result.win { border-color: #F5C13B; box-shadow: 0 24px 60px rgba(0,0,0,.55), 0 0 46px rgba(245,193,59,.28); }
.pts-result.jackpot {
    border-color: #FFD24A;
    background: linear-gradient(180deg, rgba(245,166,35,.18), rgba(245,166,35,0)), var(--mud-palette-surface);
    animation: pts-pop .45s cubic-bezier(.2,1.3,.4,1), pts-jackpot-glow 1.8s ease-in-out .5s infinite;
}
.pts-result.jackpot::before {
    content: ""; position: absolute; inset: -60%; z-index: 0; pointer-events: none;
    background: repeating-conic-gradient(from 0deg, rgba(255,214,74,.30) 0deg 5deg, transparent 5deg 22deg);
    -webkit-mask: radial-gradient(circle, transparent 16%, #000 42%, transparent 72%);
    mask: radial-gradient(circle, transparent 16%, #000 42%, transparent 72%);
    animation: pts-ray-spin 9s linear infinite;
}
@keyframes pts-ray-spin { to { transform: rotate(360deg); } }
@keyframes pts-jackpot-glow {
    0%, 100% { box-shadow: 0 24px 60px rgba(0,0,0,.55), 0 0 40px rgba(255,210,74,.30); }
    50% { box-shadow: 0 24px 60px rgba(0,0,0,.55), 0 0 68px rgba(255,210,74,.6); }
}

.pts-eyebrow { font-size: .8rem; font-weight: 800; letter-spacing: 3px; color: var(--mud-palette-text-secondary); margin-bottom: 6px; }
.pts-eyebrow.gold { color: #F5C13B; }
.pts-amount {
    font-size: 3.3rem; font-weight: 900; line-height: 1;
    background: linear-gradient(180deg, #FFE9A8, #F5A623); -webkit-background-clip: text; background-clip: text; color: transparent;
    filter: drop-shadow(0 3px 8px rgba(245,166,35,.45));
}
.pts-amount__unit { font-size: .85rem; font-weight: 800; letter-spacing: 2px; color: var(--mud-palette-text-secondary); margin-top: 2px; }
.pts-prizelabel { font-size: 1.7rem; font-weight: 900; color: var(--mud-palette-primary); margin-top: 4px; }
.pts-losetext { font-size: 1.15rem; font-weight: 700; margin-top: 4px; }
.pts-ricon { animation: pts-icon-pop .5s cubic-bezier(.2,1.5,.4,1); }
@keyframes pts-icon-pop { 0% { transform: scale(0); } 65% { transform: scale(1.25); } 100% { transform: scale(1); } }
.pts-actions { display: flex; gap: 8px; margin-top: 18px; }

/* ---- Admin pages: the bordered card surface ---- */
.order-card {
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 12px;
    background: var(--mud-palette-surface);
}

/* Admin categories list — icon badge */
.cat-card__badge { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: rgba(var(--ab-accent-rgb), 0.14); color: var(--mud-palette-primary); }

/* Let tall dialogs (e.g. the product form) use the page's vertical space before scrolling. */
.mud-dialog { max-height: 92vh; }
.mud-dialog-content { max-height: none; }
/* Dialog width comes from the DialogOptions (MaxWidth + FullWidth) only. Don't give dialog content a min-width:
   anything wider than the dialog's own content area gets cut off at the right edge. */

/* Unread-messages count pill — pinned to the account avatar (desktop) or the menu buttons (mobile).
   Filled by the 5s poll in App.razor. */
.unread-pill {
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: var(--mud-palette-error);
    color: #fff;
    font-size: .6rem;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    pointer-events: none;
    box-sizing: border-box;
}
.acct-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 12px 5px 6px;
    border-radius: 8px;
    color: inherit;
    text-decoration: none;
    font-size: .875rem;
    line-height: 1;
}
.acct-chip:hover { background: rgba(255, 255, 255, 0.08); }
.acct-avatar { position: relative; display: inline-flex; }
.acct-avatar .unread-pill { position: absolute; top: -6px; right: -6px; }
.app-nav-burger { position: relative; }
.app-nav-burger .unread-pill { position: absolute; top: 3px; right: 3px; }

/* full-size image viewer (click a chat thumbnail) */
.chat-lightbox { position: fixed; inset: 0; z-index: 3000; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(0, 0, 0, .85); cursor: zoom-out; }
.chat-lightbox__img { max-width: 94vw; max-height: 94vh; border-radius: 8px; box-shadow: 0 12px 48px rgba(0, 0, 0, .55); }

/* Chat attachments */
.chat-attach {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    border-radius: 50%;
    color: var(--mud-palette-action-default);
}
.chat-attach:hover { background: rgba(255, 255, 255, 0.06); }

/* Accent as RGB, for translucent tints of the brand red (matches --flame in css/site.css). */
:root { --ab-accent-rgb: 229, 50, 45; --ab-on-accent: #fff; }

/* App shell off-canvas nav drawer — pure CSS slide-in (no Blazor interactivity, static-safe).
   Hidden checkbox toggled by the hamburger <label>; :checked slides the drawer + shows the backdrop. */
.app-nav-toggle { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.app-nav-burger { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-right: 4px; border-radius: 50%; cursor: pointer; color: inherit; flex: 0 0 auto; }
/* App bar on phones: keep the brand and "Sign out" on one line each (they broke into two). */
.app-brand, .app-signout { white-space: nowrap; }
@media (max-width: 600px) { .mud-typography.app-brand { font-size: 1.15rem; } }
.app-nav-burger:hover { background: rgba(255, 255, 255, 0.08); }
.app-nav-drawer {
    /* Below MudBlazor's dialog layer (1400) so a modal's scrim covers the sidebar instead of the
       sidebar clipping the (viewport-centered) dialog; still above the app bar (1300) + content. */
    position: fixed; top: var(--mud-appbar-height, 64px); left: 0; bottom: 0; width: 260px; z-index: 1350;
    background: var(--mud-palette-surface);
    border-right: 1px solid var(--mud-palette-lines-default);
    transform: translateX(-100%); transition: transform .25s ease;
    overflow-y: auto; padding: 8px 4px;
}
.app-nav-backdrop {
    position: fixed; top: var(--mud-appbar-height, 64px); left: 0; right: 0; bottom: 0; z-index: 1349;
    background: rgba(0, 0, 0, 0.5); opacity: 0; visibility: hidden; transition: opacity .25s ease;
}
.app-nav-toggle:checked ~ .app-nav-drawer { transform: translateX(0); }
.app-nav-toggle:checked ~ .app-nav-backdrop { opacity: 1; visibility: visible; }

/* Desktop: pin the drawer open like a normal sidebar — content makes room, no hamburger/backdrop. */
@media (min-width: 960px) {
    .app-nav-burger { display: none; }
    .app-nav-drawer { transform: translateX(0); }
    .app-nav-backdrop { display: none; }
    .app-main { margin-left: 260px; }
}

/* Countdown chip once the scheduled start has passed */
.sess-timer.late { background: rgba(240,169,46,.14); border-color: rgba(240,169,46,.4); color: #f0a92e; }

/* Is the student in the room? */
.sess-presence { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px; border-radius: 999px; font-size: .78rem; font-weight: 600; white-space: nowrap; background: var(--mud-palette-background-gray); border: 1px solid var(--mud-palette-lines-default); color: var(--mud-palette-text-secondary); }
.sess-presence .presence-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mud-palette-text-disabled); }
.sess-presence.on { background: rgba(70,194,101,.14); border-color: rgba(70,194,101,.4); color: #46c265; }
.sess-presence.on .presence-dot { background: #46c265; box-shadow: 0 0 0 3px rgba(70,194,101,.22); }

/* ---------- Session room: voice panel ---------- */
.voice-panel { border-radius: 14px; background: var(--mud-palette-surface); border: 1px solid var(--mud-palette-lines-default); padding: 16px; }
.voice-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.voice-count { font-size: .78rem; color: var(--mud-palette-text-secondary); }
.voice-user { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-radius: 10px; }
.voice-avatar { width: 34px; height: 34px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .85rem; color: #fff; background: linear-gradient(135deg, #0e7c66, #16a085); }
.voice-avatar.speaking { animation: voice-pulse 1.2s ease-in-out infinite; }
@keyframes voice-pulse { 0%, 100% { box-shadow: 0 0 0 3px rgba(70,194,101,.75); } 50% { box-shadow: 0 0 0 6px rgba(70,194,101,.28); } }
.voice-name { flex: 1; min-width: 0; font-weight: 600; font-size: .9rem; }
.voice-badge { color: var(--mud-palette-error); flex: none; }
.voice-vol { display: flex; align-items: center; gap: 10px; padding: 0 10px 10px 12px; color: var(--mud-palette-text-secondary); font-size: .75rem; }
.voice-vol .mud-slider { min-width: 0; }

/* Your own controls live in their own bar (Discord's bottom panel), separate from participant status. */
.voice-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,.05); border: 1px solid var(--mud-palette-lines-default); }
.voice-bar__me { display: flex; align-items: center; gap: 10px; min-width: 0; }
.voice-bar__name { font-weight: 700; font-size: .88rem; }
.voice-bar__status { display: flex; align-items: center; gap: 5px; font-size: .72rem; color: #46c265; }
.voice-bar__status .presence-dot { width: 7px; height: 7px; border-radius: 50%; background: #46c265; }
.voice-bar__ctrls { display: flex; align-items: center; gap: 0; flex: none; }
.voice-avatar.sm { width: 30px; height: 30px; font-size: .78rem; }
.voice-you { font-size: .72rem; color: var(--mud-palette-text-secondary); font-weight: 600; }
.sess-timer { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-variant-numeric: tabular-nums; padding: 5px 11px; border-radius: 999px; background: rgba(255,255,255,.06); border: 1px solid var(--mud-palette-lines-default); white-space: nowrap; }

.voice-none { text-align: center; padding: 22px 8px 18px; }
.voice-none__title { font-weight: 700; margin-top: 8px; }
.voice-none__sub { font-size: .83rem; color: var(--mud-palette-text-secondary); margin-top: 2px; }
.voice-waiting { text-align: center; font-size: .83rem; color: var(--mud-palette-text-secondary); padding: 6px 0 12px; }
.voice-joinrow { display: flex; align-items: stretch; gap: 8px; }
.voice-settings { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--mud-palette-lines-default); }
.voice-meter { height: 8px; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; }
.voice-meter span { display: block; height: 100%; background: linear-gradient(90deg, #16a085, #46c265); transition: width .25s ease; }

/* Admin earnings — summary stat strip */
.earn-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.earn-stat { padding: 18px 20px; border: 1px solid var(--mud-palette-lines-default); border-radius: 14px; background: var(--mud-palette-surface); }
.earn-stat--hot { border-color: rgba(var(--ab-accent-rgb), .5); }
.earn-stat__val { font-size: 1.8rem; font-weight: 800; line-height: 1.1; margin: 2px 0; }
.earn-stat--hot .earn-stat__val { color: var(--mud-palette-primary); }
@media (max-width: 700px) { .earn-summary { grid-template-columns: 1fr; } }

/* Assign dialog — grouped order header + compact booster picker */
.assign-body { display: flex; flex-direction: column; }
.assign-section { margin-top: 16px; }

.assign-head { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 24px; padding: 12px 16px; border: 1px solid var(--mud-palette-lines-default); border-radius: 10px; background: var(--mud-palette-background); }
@media (max-width: 560px) { .assign-head { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.assign-field { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.assign-field__label { font-size: .64rem; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--mud-palette-text-secondary); }
.assign-field__value { font-size: .9rem; font-weight: 600; }

.assign-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (max-width: 640px) { .assign-grid { grid-template-columns: 1fr; } }

.assign-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 10px; border: 1px solid var(--mud-palette-lines-default); border-radius: 8px; background: var(--mud-palette-surface); }
.assign-row--suggested { border-color: var(--mud-palette-success); }

/* Become-a-booster application form */
.apply-field { margin-bottom: 16px; }
.apply-field label { display: block; margin-bottom: 6px; font-size: .9rem; font-weight: 600; color: var(--mud-palette-text-secondary); }

.assign-booster { min-width: 0; }
.assign-booster__name { font-size: .9rem; font-weight: 600; }
.assign-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; font-size: .76rem; color: var(--mud-palette-text-secondary); margin-top: 1px; }
.assign-tags { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.assign-tag { display: inline-block; font-size: .66rem; font-weight: 600; line-height: 1.55; padding: 0 7px; border-radius: 999px; border: 1px solid var(--mud-palette-lines-default); color: var(--mud-palette-text-secondary); background: var(--mud-palette-background); }

/* Admin reports — KPI grid + chart legend */
.rep-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 900px) { .rep-kpis { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .rep-kpis { grid-template-columns: 1fr; } }
.rep-legend { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--mud-palette-text-secondary); }
.rep-legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

/* Compact numeric fields (commission %, hold days): value sits right, next to its unit adornment */
.num-tight input { text-align: right; }
/* A fixed-width field in a flex row: Mud puts Style on an inner element, so stop the outer box from stretching. */
.mud-input-control.calc-field { flex: none; }

/* Admin dialogs: an English field and its optional Romanian twin, side by side (stacked on phones). */
.lang-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 600px) { .lang-pair { grid-template-columns: minmax(0, 1fr); } }

/* ═══════════════════════════════════════════════════════════════════════════
   Quill rich-text editor (admin product description) + storefront rendering
   The editor loads quill.snow.css on demand; the storefront does NOT, so the
   .prod-description rules below reproduce the Quill classes it needs.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Editor dark theme (blends with the MudBlazor dialog surface) ── */
.rte-wrapper .ql-toolbar.ql-snow {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--mud-palette-lines-default);
    border-radius: 8px 8px 0 0;
}
.rte-wrapper .ql-container.ql-snow {
    border-color: var(--mud-palette-lines-default);
    border-radius: 0 0 8px 8px;
    background: rgba(255, 255, 255, 0.02);
}
.rte-wrapper .ql-editor { color: var(--mud-palette-text-primary); font-size: 0.95rem; line-height: 1.65; }
.rte-wrapper .ql-editor.ql-blank::before { color: var(--mud-palette-text-disabled); font-style: italic; }
.rte-wrapper .ql-toolbar .ql-stroke { stroke: var(--mud-palette-text-secondary); }
.rte-wrapper .ql-toolbar .ql-fill { fill: var(--mud-palette-text-secondary); }
.rte-wrapper .ql-toolbar .ql-picker-label { color: var(--mud-palette-text-secondary); }
.rte-wrapper .ql-toolbar button:hover .ql-stroke,
.rte-wrapper .ql-toolbar button.ql-active .ql-stroke { stroke: var(--mud-palette-primary); }
.rte-wrapper .ql-toolbar button:hover .ql-fill,
.rte-wrapper .ql-toolbar button.ql-active .ql-fill { fill: var(--mud-palette-primary); }
.rte-wrapper .ql-toolbar button:hover,
.rte-wrapper .ql-toolbar button.ql-active { color: var(--mud-palette-primary); }
.rte-wrapper .ql-picker-options {
    background: var(--mud-palette-surface);
    border-color: var(--mud-palette-lines-default);
    border-radius: 6px;
}
.rte-wrapper .ql-picker-item { color: var(--mud-palette-text-primary); }
.rte-wrapper .ql-picker-item:hover { color: var(--mud-palette-primary); }
.rte-wrapper .ql-snow .ql-tooltip {
    background: var(--mud-palette-surface);
    border-color: var(--mud-palette-lines-default);
    color: var(--mud-palette-text-primary);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 10;
}
.rte-wrapper .ql-snow .ql-tooltip input[type="text"] {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--mud-palette-lines-default);
    color: var(--mud-palette-text-primary);
    border-radius: 4px;
}
.rte-wrapper .ql-snow .ql-tooltip a.ql-action,
.rte-wrapper .ql-snow .ql-tooltip a.ql-remove { color: var(--mud-palette-primary); }
.rte-wrapper .ql-editor img { max-width: 100%; height: auto; }
.rte-wrapper .ql-editor img.quill-image-selected { outline: 2px solid var(--mud-palette-primary); outline-offset: 1px; }
.rte-wrapper .ql-editor .ql-video { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: 8px; }

/* ── Toolbar tooltips (data-tooltip is set by the interop) ── */
.ql-toolbar button, .ql-toolbar .ql-picker-label { position: relative; }
.ql-toolbar button[data-tooltip]::after,
.ql-toolbar .ql-picker-label[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(30, 30, 30, 0.95);
    color: #eee;
    font-size: 11px;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
    z-index: 100;
}
.ql-toolbar button[data-tooltip]:hover::after,
.ql-toolbar .ql-picker-label[data-tooltip]:hover::after { opacity: 1; }

/* ── Floating image-resize toolbar (appended to <body>, above the dialog) ── */
.quill-image-resize-toolbar {
    position: fixed;
    display: none;
    transform: translateX(-50%);
    gap: 2px;
    padding: 4px;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
    z-index: 3000;
}
.quill-image-resize-toolbar button {
    border: 0;
    background: transparent;
    color: var(--mud-palette-text-primary);
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 5px;
    cursor: pointer;
}
.quill-image-resize-toolbar button:hover { background: rgba(255, 255, 255, 0.08); }
.quill-image-resize-toolbar button.active { background: var(--mud-palette-primary); color: #fff; }

/* ── Storefront product description (Quill-native HTML via MarkupString) ── */
.prod-description { line-height: 1.7; color: var(--mud-palette-text-primary); }
.prod-description > *:first-child { margin-top: 0; }
.prod-description p { margin: 0 0 0.8em; }
.prod-description img { max-width: 100%; height: auto; border-radius: 6px; }
.prod-description a { color: var(--mud-palette-primary); text-decoration: underline; }
.prod-description h1, .prod-description h2, .prod-description h3 { font-weight: 700; line-height: 1.25; margin: 1.2em 0 0.5em; }
.prod-description blockquote {
    border-left: 4px solid var(--mud-palette-primary);
    margin: 0.6em 0;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 0 6px 6px 0;
    font-style: italic;
}
.prod-description .ql-video { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: 8px; margin: 0.6em 0; }

/* Quill alignment / size / indent classes (editor loads these from quill.snow.css; storefront needs them here) */
.prod-description .ql-align-center { text-align: center; }
.prod-description .ql-align-right { text-align: right; }
.prod-description .ql-align-justify { text-align: justify; }
.prod-description .ql-size-small { font-size: 0.75em; }
.prod-description .ql-size-large { font-size: 1.5em; }
.prod-description .ql-size-huge { font-size: 2.5em; }
.prod-description .ql-indent-1 { padding-left: 3em; }
.prod-description .ql-indent-2 { padding-left: 6em; }
.prod-description .ql-indent-3 { padding-left: 9em; }
.prod-description .ql-indent-4 { padding-left: 12em; }
.prod-description .ql-indent-5 { padding-left: 15em; }
.prod-description .ql-indent-6 { padding-left: 18em; }
.prod-description .ql-indent-7 { padding-left: 21em; }
.prod-description .ql-indent-8 { padding-left: 24em; }

/* Quill 2 saves BOTH list types as <ol> with data-list on each <li>; reproduce the markers with CSS
   counters (flat lists render exactly; nested-ordered numbering is approximate — fine for product copy). */
.prod-description ol {
    padding-left: 1.5em;
    margin: 0.4em 0;
    list-style: none;
    counter-reset: list-0;
}
.prod-description ol > li { position: relative; }
.prod-description ol > li::before {
    display: inline-block;
    width: 1.2em;
    margin-left: -1.5em;
    margin-right: 0.3em;
    text-align: right;
    white-space: nowrap;
}
.prod-description li[data-list="bullet"]::before { content: "\2022"; }
.prod-description li[data-list="ordered"] { counter-increment: list-0; }
.prod-description li[data-list="ordered"]::before { content: counter(list-0, decimal) "."; }
.prod-description ul { padding-left: 1.5em; margin: 0.4em 0; list-style-type: disc; }
.prod-description li { margin: 0.15em 0; }

/* Checkout guide viewer. Fits the screen; tap to see it at full size and pan (a wide image scrolls from its left edge).
   The page behind it stops scrolling while it's open. */
html.acct-noscroll { overflow: hidden; }
.acct-lightbox { position: fixed; inset: 0; z-index: 2000; display: flex; flex-direction: column; background: rgba(6, 8, 12, .92); outline: none; animation: acct-fade .16s ease-out; }
@keyframes acct-fade { from { opacity: 0; } to { opacity: 1; } }
.acct-lightbox__bar { display: flex; align-items: center; gap: 6px; padding: max(10px, env(safe-area-inset-top)) 12px 10px 18px; color: #fff; }
.acct-lightbox__title { flex: 1; min-width: 0; overflow: hidden; font-size: .95rem; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; }
.acct-lightbox__btn { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border: none; border-radius: 50%; background: rgba(255, 255, 255, .1); color: #fff; cursor: pointer; }
.acct-lightbox__btn:hover { background: rgba(255, 255, 255, .2); }
.acct-lightbox__stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 16px 12px; overflow: auto; overscroll-behavior: contain; }
.acct-lightbox__stage img { max-width: 100%; max-height: calc(100vh - 120px); max-height: calc(100dvh - 120px); border-radius: 10px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); cursor: zoom-in; animation: acct-pop .2s ease-out; }
@keyframes acct-pop { from { opacity: .6; transform: scale(.97); } to { opacity: 1; transform: none; } }
.acct-lightbox__stage.is-zoomed { display: block; }
.acct-lightbox__stage.is-zoomed img { display: block; width: 1536px; max-width: none; max-height: none; margin: 0 auto; cursor: zoom-out; animation: none; }
@media (max-width: 700px) { .acct-lightbox__stage.is-zoomed img { width: 1100px; } }
.acct-lightbox__hint { padding: 0 16px max(14px, env(safe-area-inset-bottom)); font-size: .78rem; text-align: center; color: rgba(255, 255, 255, .65); }

/* ---------- Booster's view of the customer's login ---------- */
.login-value { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .92rem; overflow-wrap: anywhere; }
.login-codes { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.login-code { display: inline-flex; align-items: center; gap: 7px; padding: 5px 9px; border-radius: 8px; border: 1px solid var(--mud-palette-lines-default); background: rgba(255,255,255,.03); color: inherit; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .85rem; cursor: pointer; transition: border-color .12s ease; }
.login-code:hover { border-color: rgba(var(--ab-accent-rgb), .5); }

/* ---------- Support chat widget (dummy) ---------- */
.sc-root { position: fixed; right: 20px; bottom: 20px; z-index: 1400; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.sc-launcher { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 58px; height: 58px; border: none; border-radius: 50%; background: var(--mud-palette-primary); color: var(--ab-on-accent); cursor: pointer; box-shadow: 0 10px 28px rgba(var(--ab-accent-rgb), .45), 0 2px 8px rgba(0, 0, 0, .35); transition: transform .18s ease, box-shadow .18s ease; }
.sc-launcher:hover { transform: scale(1.06); }
.sc-launcher .mud-icon-root { transition: transform .25s ease; }
.sc-launcher.is-open .mud-icon-root { transform: rotate(90deg); }
.sc-launcher__dot { position: absolute; top: 3px; right: 3px; width: 13px; height: 13px; border-radius: 50%; background: #2bd66a; border: 2px solid var(--mud-palette-background); }

.sc-teaser { position: relative; display: flex; align-items: center; animation: sc-rise .25s ease-out; }
.sc-teaser__body { display: flex; align-items: center; gap: 10px; padding: 10px 16px 10px 10px; border: 1px solid var(--mud-palette-lines-default); border-radius: 16px 16px 4px 16px; background: var(--mud-palette-surface); color: var(--mud-palette-text-primary); font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.sc-teaser__close { position: absolute; top: -8px; left: -8px; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border: 1px solid var(--mud-palette-lines-default); border-radius: 50%; background: var(--mud-palette-background); color: var(--mud-palette-text-secondary); cursor: pointer; }

.sc-window { display: flex; flex-direction: column; width: 380px; height: min(620px, calc(100vh - 120px)); overflow: hidden; border: 1px solid var(--mud-palette-lines-default); border-radius: 20px; background: var(--mud-palette-background); box-shadow: 0 24px 60px rgba(0, 0, 0, .5); transform-origin: bottom right; animation: sc-open .22s cubic-bezier(.2, .9, .3, 1.1); }
@keyframes sc-open { from { opacity: 0; transform: translateY(12px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes sc-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.sc-head { flex: none; display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 14px; border-bottom: 1px solid var(--mud-palette-lines-default); background: var(--mud-palette-surface); color: var(--mud-palette-text-primary); }
.sc-head__who { display: flex; flex-direction: column; min-width: 0; }
.sc-head__name { overflow: hidden; font-size: .92rem; font-weight: 800; white-space: nowrap; text-overflow: ellipsis; }
.sc-icon-btn { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: none; border-radius: 10px; background: transparent; color: inherit; cursor: pointer; }
.sc-icon-btn:hover { background: rgba(127, 127, 127, .16); }

.sc-status { display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; color: var(--mud-palette-text-secondary); }
.sc-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #2bd66a; box-shadow: 0 0 0 3px rgba(43, 214, 106, .18); }

.sc-body { flex: 1; min-height: 0; display: flex; flex-direction: column-reverse; padding: 14px; overflow-y: auto; overscroll-behavior: contain; }

/* Pushed to the top while short; once it overflows, column-reverse keeps the newest message in view. */
.sc-thread { display: flex; flex-direction: column; gap: 10px; margin-bottom: auto; }
.sc-system { align-self: center; max-width: 85%; padding: 4px 10px; border-radius: 999px; background: rgba(127, 127, 127, .12); color: var(--mud-palette-text-secondary); font-size: .74rem; text-align: center; }
.sc-msg { display: flex; max-width: 86%; animation: sc-rise .18s ease-out; }
.sc-msg--me { flex-direction: column; align-items: flex-end; align-self: flex-end; }
.sc-msg--them { flex-direction: column; align-items: flex-start; align-self: flex-start; }
.sc-author { margin: 0 0 3px 4px; font-size: .7rem; font-weight: 700; color: var(--mud-palette-text-secondary); }
.sc-bubble { padding: 9px 13px; border: 1px solid var(--mud-palette-lines-default); border-radius: 16px 16px 16px 4px; background: var(--mud-palette-surface); font-size: .9rem; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.sc-msg--me .sc-bubble { border: none; border-radius: 16px 16px 4px 16px; background: var(--mud-palette-primary); color: var(--ab-on-accent); }
.sc-time { margin: 3px 4px 0; font-size: .66rem; color: var(--mud-palette-text-disabled); }
.sc-typing { display: inline-flex; gap: 4px; padding: 12px 14px; }
.sc-typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--mud-palette-text-secondary); animation: sc-blink 1.2s infinite ease-in-out; }
.sc-typing span:nth-child(2) { animation-delay: .15s; }
.sc-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes sc-blink { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.sc-pills { display: flex; flex-wrap: wrap; gap: 6px; animation: sc-rise .2s ease-out; }
.sc-pill { padding: 7px 12px; border: 1px solid rgba(var(--ab-accent-rgb), .45); border-radius: 999px; background: rgba(var(--ab-accent-rgb), .08); color: var(--mud-palette-text-primary); font: inherit; font-size: .82rem; font-weight: 600; text-align: left; cursor: pointer; transition: background .15s ease, border-color .15s ease; }
.sc-pill:hover { border-color: var(--mud-palette-primary); background: rgba(var(--ab-accent-rgb), .18); }
.sc-pill--ghost { border-style: dashed; background: transparent; color: var(--mud-palette-text-secondary); }
.sc-email { padding: 12px; border: 1px dashed rgba(var(--ab-accent-rgb), .45); border-radius: 14px; background: rgba(var(--ab-accent-rgb), .06); font-size: .84rem; }
.sc-email__title { margin-bottom: 8px; font-weight: 700; }
.sc-email__row { display: flex; gap: 6px; }

.sc-composer { flex: none; display: flex; align-items: center; gap: 6px; padding: 10px; border-top: 1px solid var(--mud-palette-lines-default); background: var(--mud-palette-surface); }
.sc-input { flex: 1; min-width: 0; padding: 10px 14px; border: 1px solid var(--mud-palette-lines-inputs); border-radius: 999px; background: var(--mud-palette-background); color: var(--mud-palette-text-primary); font: inherit; font-size: 16px; outline: none; }
.sc-input:focus { border-color: var(--mud-palette-primary); }
.sc-send { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: none; border-radius: 50%; background: var(--mud-palette-primary); color: var(--ab-on-accent); cursor: pointer; }
.sc-send:disabled { opacity: .4; cursor: default; }

@media (max-width: 600px) {
    .sc-root { right: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); }
    .sc-window { position: fixed; inset: 0; width: auto; height: auto; border: none; border-radius: 0; padding-bottom: env(safe-area-inset-bottom); }
    .sc-root:has(.sc-window) .sc-launcher { display: none; }
    .sc-launcher { width: 54px; height: 54px; }
}
