/**
 * Fallbacks when backdrop-filter is missing (older in-app WebViews).
 * Chrome / modern mobile browsers keep blur from main.css.
 */

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .topbar-wrap {
        background: rgba(255, 255, 255, 0.96) !important;
    }

    :is(
        .hero-main,
        .hero-panel,
        .feature-card,
        .product-card,
        .quote-card,
        .cta-panel,
        .footer-shell,
        .mag-card,
        .card,
        .shop-card,
        .mini-card,
        .lp-glass-panel,
        .reviews-social-card,
        .main-content
    ) {
        background: rgba(255, 255, 255, 0.94) !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    :is(
        .hero-fullbleed-copy .hero-stats .mini-card,
        .lp-hero-stat,
        .mag-gallery-caption
    ) {
        background: rgba(255, 255, 255, 0.88) !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    :is(
        .mag-status-bar,
        .lp-nav-fab
    ) {
        background: rgba(10, 31, 68, 0.92) !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    :is(
        .ni-mag-card,
        .ni-recipe-card
    ) {
        background: rgba(255, 255, 255, 0.96) !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
}

/* LINE WebView only: ช่องขวาสุดของขวัญ ↔ โปรไฟล์/แฮมเบอร์เกอร์ คลิปที่ขอบเมนูล่าง */
.glass-preview-menu--line-clip {
    overflow: hidden;
}

.glass-preview-swap {
    display: grid;
    align-self: stretch;
    min-width: 0;
    min-height: 36px;
    overflow: hidden;
}

.glass-preview-swap__panel {
    grid-area: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    pointer-events: none;
    transition: transform 0.32s ease;
}

.glass-preview-swap__panel--gift {
    transform: translateY(0);
}

.glass-preview-swap__panel--alt {
    transform: translateY(-100%);
}

.glass-preview-swap.is-alt .glass-preview-swap__panel--gift {
    transform: translateY(-100%);
}

.glass-preview-swap.is-alt .glass-preview-swap__panel--alt {
    transform: translateY(0);
}

.glass-preview-swap:not(.is-alt) .glass-preview-swap__panel--gift,
.glass-preview-swap.is-alt .glass-preview-swap__panel--alt {
    pointer-events: auto;
}

.glass-preview-swap__panel--gift .glass-preview-item {
    width: 100%;
}

.glass-preview-swap__avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    background: #e8efe9;
}

.glass-preview-swap__avatar--fallback {
    display: grid;
    place-items: center;
    font-size: 0.85rem;
    font-weight: 650;
    color: #2f5d3a;
}

.glass-preview-swap__burger {
    position: relative;
    display: block;
    width: 40px;
    height: 40px;
    color: #0b2f60;
}

.glass-preview-swap__burger span,
.glass-preview-swap__burger::before,
.glass-preview-swap__burger::after {
    content: "";
    position: absolute;
    left: 50%;
    display: block;
    width: 18px;
    height: 1.5px;
    background: currentColor;
    border-radius: 999px;
    transform: translateX(-50%);
}

.glass-preview-swap__burger span {
    top: 50%;
    transform: translate(-50%, -50%);
}

.glass-preview-swap__burger::before {
    top: calc(50% - 5.5px);
}

.glass-preview-swap__burger::after {
    top: calc(50% + 5.5px);
}

.glass-preview-swap__hit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 36px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.line-sheet {
    position: fixed;
    inset: 0;
    z-index: 2147483646;
    pointer-events: none;
    visibility: hidden;
}

.line-sheet.is-open {
    pointer-events: auto;
    visibility: visible;
}

.line-sheet__scrim {
    position: absolute;
    inset: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: rgba(8, 22, 47, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    cursor: pointer;
    transition: opacity 0.32s ease;
}

.line-sheet.is-open .line-sheet__scrim {
    opacity: 1;
}

.line-sheet__panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 76px;
    background: #fff;
    transform: translateY(110%);
    transition: transform 0.32s ease;
}

.line-sheet.is-open .line-sheet__panel {
    transform: translateY(0);
}

.line-sheet__presence {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
    padding: 10px 16px;
    font-family: "Noto Sans Thai", "Sarabun", sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
    text-decoration: none;
}

.line-sheet__presence-icon {
    display: inline-flex;
    line-height: 0;
    flex-shrink: 0;
}

.line-sheet__presence--online,
.line-sheet__presence--online:visited {
    background: #06c755;
    color: #fff;
}

.line-sheet__presence--offline,
.line-sheet__presence--offline:visited {
    background: #eef1f6;
    color: rgba(10, 31, 68, 0.62);
}

.line-sheet__member {
    padding: 16px 16px 14px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.line-sheet__member-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.line-sheet__member-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    flex-shrink: 0;
    background: #e8efe9;
}

.line-sheet__member-avatar--fallback {
    display: grid;
    place-items: center;
    font-size: 1.05rem;
    font-weight: 700;
    color: #2f5d3a;
}

.line-sheet__member-name {
    min-width: 0;
    font-family: "Noto Sans Thai", "Sarabun", sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.3;
    color: #0a1f44;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.line-sheet__member-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.line-sheet__member-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 4px;
    text-align: center;
    text-decoration: none;
    color: #0a1f44;
}

.line-sheet__member-stat strong {
    font-size: 1.12rem;
    font-weight: 800;
    line-height: 1.2;
    font-family: "Noto Sans Thai", "Sarabun", sans-serif;
}

.line-sheet__member-stat span {
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.2;
    color: rgba(10, 31, 68, 0.55);
    font-family: "Noto Sans Thai", "Sarabun", sans-serif;
}

.line-sheet__member-account {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 0.55rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.16);
    background: transparent;
    color: #0a1f44;
    text-align: center;
    text-decoration: none;
    font-family: "Noto Sans Thai", "Sarabun", sans-serif;
    font-size: 0.86rem;
    font-weight: 600;
}

.line-sheet__nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 14px 16px 16px;
}

.line-sheet__nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 96px;
    padding: 14px 8px;
    border-radius: 16px;
    text-align: center;
    text-decoration: none;
    line-height: 1.25;
    font-family: "Noto Sans Thai", "Sarabun", sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    color: #0a1f44;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 12px 28px rgba(8, 22, 47, 0.05);
}

.line-sheet__nav .nav-tile-icon {
    display: block;
    width: 24px;
    height: 24px;
    color: rgba(10, 31, 68, 0.28);
    opacity: 0.72;
    line-height: 0;
}

.line-sheet__nav .nav-tile-icon svg {
    display: block;
    width: 24px;
    height: 24px;
}

.line-sheet__nav .nav-tile-label {
    display: block;
    color: #0a1f44;
    font-weight: 700;
}
