/* color-scheme hints for form controls / scrollbars */
html {
    color-scheme: light;
    /* Avoid default white showing behind body / flex gaps */
    background-color: #e8ecf6;
    min-height: 100%;
    scrollbar-gutter: stable;
}
html.dark {
    color-scheme: dark;
    background-color: #030308;
    min-height: 100%;
}

/* ——— Body canvas (shop pages only) ——— */
html:not(.dark) .shop-app-body {
    background-color: #e8ecf6;
    background-image:
        linear-gradient(90deg, rgba(255, 255, 255, 0.55) 0%, transparent 32%),
        radial-gradient(ellipse 120% 80% at 50% -30%, rgba(99, 102, 241, 0.12), transparent 50%),
        radial-gradient(ellipse 60% 50% at 100% 0%, rgba(139, 92, 246, 0.08), transparent 45%),
        linear-gradient(180deg, #f0f3fb 0%, #e8ecf6 50%, #e4e9f5 100%);
    background-attachment: fixed;
}

/*
 * Dark canvas: base color + !important so Tailwind CDN / preflight cannot leave a light body.
 * Gradients stack on top of the solid base.
 */
html.dark body.shop-app-body {
    background-color: #030308 !important;
    background-image:
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 0%, transparent 28%),
        radial-gradient(ellipse 125% 75% at 50% -28%, rgba(99, 102, 241, 0.28), transparent 52%),
        radial-gradient(ellipse 55% 48% at 100% 18%, rgba(167, 139, 250, 0.14), transparent 48%),
        radial-gradient(ellipse 48% 42% at 0% 85%, rgba(59, 130, 246, 0.1), transparent 42%),
        linear-gradient(180deg, #05050f 0%, #08081a 42%, #05050c 100%) !important;
    background-attachment: fixed;
}

/* Mist lives on body only (full viewport); shell columns stay transparent — no stripe outside max-width */
html:not(.dark) .shop-main-column,
html:not(.dark) aside.shop-sidenav-rail,
html.dark .shop-main-column,
html.dark aside.shop-sidenav-rail {
    background: transparent;
}

/* ——— Typography blocks ——— */
html:not(.dark) .shop-prose {
    color: rgba(51, 65, 85, 0.95);
}
html.dark .shop-prose {
    color: rgba(226, 232, 240, 0.92);
}

.shop-prose {
    font-size: 0.9375rem;
    line-height: 1.75;
    letter-spacing: 0.01em;
}
.shop-prose p {
    margin-bottom: 1rem;
}
.shop-prose p:last-child {
    margin-bottom: 0;
}

.shop-desc-html img {
    max-width: 100%;
    height: auto;
    border-radius: 0.375rem;
}

/* Quill saved HTML: size uses classes (quill.snow.css is not loaded on product page) */
.shop-desc-html .ql-size-small {
    font-size: 0.75em;
}
.shop-desc-html .ql-size-large {
    font-size: 1.5em;
}
.shop-desc-html .ql-size-huge {
    font-size: 2.5em;
}

html:not(.dark) .shop-section-title {
    color: rgba(67, 56, 202, 0.95);
    border-bottom-color: rgba(15, 23, 42, 0.1);
}
html.dark .shop-section-title {
    color: rgba(165, 180, 252, 0.98);
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.shop-section-title {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom-width: 1px;
    border-bottom-style: solid;
}

html:not(.dark) .shop-breadcrumb a {
    color: rgba(71, 85, 105, 0.95);
}
html.dark .shop-breadcrumb a {
    color: rgba(148, 163, 184, 0.95);
}
.shop-breadcrumb a:hover {
    color: #6366f1;
}
html.dark .shop-breadcrumb a:hover {
    color: #fff;
}

.shop-breadcrumb {
    font-size: 0.8125rem;
}

/* ——— Product / checkout shells (shared with product.php) ——— */
html:not(.dark) .shop-order-shell {
    border-radius: 1.25rem;
    border: 1px solid rgba(15, 23, 42, 0.1);
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}
html.dark .shop-order-shell {
    border-radius: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    box-shadow: none;
}

html:not(.dark) .shop-stat-pill {
    background: rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(15, 23, 42, 0.1);
    color: rgba(51, 65, 85, 0.95);
}
html.dark .shop-stat-pill {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(226, 232, 240, 0.92);
}

.shop-stat-pill {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.35rem 0.65rem;
    border-radius: 9999px;
}

.shop-var-pick {
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
html:not(.dark) .shop-var-pick:hover {
    border-color: rgba(99, 102, 241, 0.45) !important;
    background: rgba(99, 102, 241, 0.06) !important;
}
html.dark .shop-var-pick:hover {
    border-color: rgba(129, 140, 248, 0.45) !important;
    background: rgba(255, 255, 255, 0.06) !important;
}
html:not(.dark) .shop-var-pick.is-selected {
    border-color: rgba(79, 70, 229, 0.75) !important;
    background: rgba(99, 102, 241, 0.1) !important;
    box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.25);
}
html.dark .shop-var-pick.is-selected {
    border-color: rgba(129, 140, 248, 0.85) !important;
    background: rgba(99, 102, 241, 0.14) !important;
    box-shadow: 0 0 0 1px rgba(129, 140, 248, 0.35);
}
.shop-var-pick:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* ——— Catalog chips (index) ——— */
html:not(.dark) .shop-catalog-chip {
    background: rgba(15, 23, 42, 0.06);
    color: #475569;
    border: 1px solid rgba(15, 23, 42, 0.12);
}
html:not(.dark) .shop-catalog-chip:hover {
    background: rgba(15, 23, 42, 0.1);
    color: #0f172a;
}
html.dark .shop-catalog-chip {
    background: rgba(255, 255, 255, 0.06);
    color: #cbd5e1;
    border: 1px solid rgba(255, 255, 255, 0.12);
}
html.dark .shop-catalog-chip:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}
.shop-catalog-chip.shop-catalog-chip-active {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff;
    border-color: transparent;
}

/* Legacy glass (if used elsewhere) */
.shop-topnav-glass {
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

/* Screen-reader-only (works without Bootstrap on shop pages) */
.shop-sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.shop-seller-label-icon {
    color: #64748b;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
html.dark .shop-seller-label-icon {
    color: #94a3b8;
}

/* product.php — store icon + seller name share one vertical rhythm */
.shop-product-seller-head {
    align-items: center;
}
.shop-product-seller-head .shop-seller-label-icon i {
    display: block;
    line-height: 1;
}

/* Meta-style scalloped seal (inline next to seller name) */
.shop-verified-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.25rem;
    vertical-align: -0.2em;
    line-height: 0;
    flex-shrink: 0;
}
.shop-verified-badge .shop-meta-verified-svg {
    display: block;
    width: 16px;
    height: 16px;
}
.shop-verified-badge[data-verified-tier="2"],
.shop-verified-badge[data-verified-tier="3"] {
    filter: drop-shadow(0 0 2px rgba(8, 102, 255, 0.4));
}
html.dark .shop-verified-badge[data-verified-tier="2"],
html.dark .shop-verified-badge[data-verified-tier="3"] {
    filter: drop-shadow(0 0 3px rgba(77, 163, 255, 0.45));
}

/* Wrapper shows flyout on hover/focus (no native title delay) */
.shop-has-instant-tip {
    position: relative;
}
.shop-has-instant-tip .shop-verified-tip-pop {
    position: absolute;
    left: 0;
    right: auto;
    bottom: calc(100% + 6px);
    z-index: 400;
    display: none;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    max-width: min(34rem, calc(100vw - 2rem));
    min-width: min(20rem, calc(100vw - 2rem));
    padding: 0.5rem 0.85rem;
    border-radius: 0.5rem;
    pointer-events: none;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.28);
}
.shop-verified-tip-pop--align-end {
    left: auto;
    right: 0;
}
.shop-verified-tip-pop--below {
    top: calc(100% + 6px);
    bottom: auto;
}
html:not(.dark) .shop-has-instant-tip .shop-verified-tip-pop {
    background: rgba(15, 23, 42, 0.97);
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
html.dark .shop-has-instant-tip .shop-verified-tip-pop {
    background: rgba(30, 41, 59, 0.98);
    color: #f1f5f9;
    border: 1px solid rgba(255, 255, 255, 0.12);
}
.shop-has-instant-tip:hover .shop-verified-tip-pop,
.shop-has-instant-tip:focus-within .shop-verified-tip-pop,
.shop-has-instant-tip:focus-visible .shop-verified-tip-pop {
    display: flex;
}
.shop-verified-tip-pop__badge {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}
/* Orange applies to label text only; bubble bg stays slate (rules above). */
.shop-has-instant-tip .shop-verified-tip-pop .shop-verified-tip-pop__text {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    text-align: center;
    white-space: normal;
    color: #fb923c !important;
    background: transparent;
}
