/**
 * ==============================================================================
 * SADRA VISUALS — ARTBOOK PHOTOGRAPHY GALLERY DESIGN SYSTEM
 * LAYER 6.4: TWO-STAGE EXHIBITION LIGHTBOX
 * ==============================================================================
 * Stylesheet for:
 * 1. Stage 1: Pure distraction-free artwork view (obsidian black canvas)
 * 2. Stage 2: Frosted HUD overlay (auto-reveals on tap/movement, auto-hides)
 * 3. Filmstrip navigation carousel & adjacent frame preloader indicators
 * 4. Floating heart appreciation micro-animation
 * 5. Fullscreen canvas & mobile-first touch ergonomics (44px tap targets)
 */

/* ------------------------------------------------------------------------------
 * 1. Lightbox Root Backdrop & Container
 * ------------------------------------------------------------------------------ */
body.lightbox-open {
    overflow: hidden !important;
    touch-action: none;
}

.lightbox-backdrop {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    z-index: var(--z-lightbox, 10000);
    background-color: rgba(5, 7, 12, 0.98);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none !important;
    transition: opacity var(--duration-smooth, 0.28s) var(--ease-artbook, cubic-bezier(0.16, 1, 0.3, 1)),
                visibility var(--duration-smooth, 0.28s) var(--ease-artbook, cubic-bezier(0.16, 1, 0.3, 1));
    user-select: none;
    -webkit-user-select: none;
    overflow: hidden;
}

.lightbox-backdrop.is-open {
    display: flex;
    opacity: 1;
    visibility: visible;
    pointer-events: auto !important;
}

/* Hard quarantine: Closed backdrop and all children NEVER block or trap clicks */
.lightbox-backdrop:not(.is-open),
.lightbox-backdrop:not(.is-open) * {
    display: none !important;
    pointer-events: none !important;
    visibility: hidden !important;
}

/* ------------------------------------------------------------------------------
 * 2. Stage 1: Pure Artwork Canvas & Central Figure
 * ------------------------------------------------------------------------------ */
.lightbox-stage {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    overflow: hidden;
    cursor: default;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

/* When HUD is hidden for Stage 1 pure view, cursor dims */
.lightbox-backdrop.hud-hidden .lightbox-stage {
    cursor: none;
}

.lightbox-figure {
    position: relative;
    max-width: 100%;
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-origin: center center;
    will-change: transform;
    touch-action: none;
}

.lightbox-figure.is-zoomed {
    cursor: grab;
}

.lightbox-figure.is-zoomed:active {
    cursor: grabbing;
}

.lightbox-img-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 95vw;
    max-height: 90vh;
    max-height: 90dvh;
    transition: max-height var(--duration-smooth) var(--ease-artbook),
                transform var(--duration-fast) var(--ease-artbook);
}

/* Expand artwork to fill near-full canvas when HUD hides */
.lightbox-backdrop.hud-hidden .lightbox-img-wrap {
    max-height: 97vh;
    max-height: 97dvh;
}

.lightbox-img {
    max-width: 95vw;
    max-height: 86vh;
    max-height: 86dvh;
    object-fit: contain;
    border-radius: var(--radius-sm);
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.85);
    opacity: 0;
    transition: opacity var(--duration-smooth) var(--ease-artbook),
                transform var(--duration-fast) var(--ease-artbook);
    pointer-events: auto;
}

.lightbox-backdrop.hud-hidden .lightbox-img {
    max-height: 96vh;
    max-height: 96dvh;
}

.lightbox-img.is-loaded {
    opacity: 1;
}

/* Transparent Media Shield protecting full-res master artwork */
.lightbox-shield {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 3;
    pointer-events: auto;
    cursor: pointer;
}

/* Video inside Lightbox */
.lightbox-video {
    max-width: 95vw;
    max-height: 86vh;
    max-height: 86dvh;
    object-fit: contain;
    border-radius: var(--radius-sm);
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.85);
}

/* ------------------------------------------------------------------------------
 * 3. Stage 2: Frosted HUD Overlay (Top & Bottom Bars)
 * ------------------------------------------------------------------------------ */
.lightbox-hud {
    transition: opacity var(--duration-smooth) var(--ease-artbook),
                transform var(--duration-smooth) var(--ease-artbook),
                visibility var(--duration-smooth);
}

.lightbox-backdrop.hud-hidden .lightbox-hud {
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden;
}

.lightbox-backdrop.hud-visible .lightbox-hud {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

/* Top Navigation & Actions Bar */
.lightbox-top-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 20;
    height: calc(var(--header-height, 64px) + var(--safe-top, 0px));
    padding: var(--safe-top, 0px) var(--space-6, 24px) 0 var(--space-6, 24px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(180deg, rgba(5, 7, 12, 0.94) 0%, rgba(5, 7, 12, 0.55) 65%, transparent 100%);
    backdrop-filter: var(--glass-blur, blur(20px));
    -webkit-backdrop-filter: var(--glass-blur, blur(20px));
}

.lightbox-info-group {
    display: flex;
    align-items: center;
    gap: var(--space-3, 14px);
    min-width: 0;
}

.lightbox-counter {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-gold, #d4af37);
    letter-spacing: 0.08em;
    background: rgba(212, 175, 55, 0.12);
    border: 1px solid rgba(212, 175, 55, 0.28);
    padding: 3px 10px;
    border-radius: var(--radius-full, 9999px);
    white-space: nowrap;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.1);
}

.lightbox-title {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary, #f8fafc);
    letter-spacing: -0.01em;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: min(340px, 42vw);
}

.lightbox-genre-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary, #cbd5e1);
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.12));
    border-radius: var(--radius-full, 9999px);
    white-space: nowrap;
}

/* Top Action Buttons Tray */
.lightbox-actions-tray {
    display: flex;
    align-items: center;
    gap: var(--space-2, 10px);
}

.lightbox-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(18, 22, 34, 0.65);
    backdrop-filter: var(--glass-blur, blur(20px));
    -webkit-backdrop-filter: var(--glass-blur, blur(20px));
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50%;
    color: var(--text-primary, #f8fafc);
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    transition: transform var(--duration-fast, 150ms) var(--ease-artbook),
                background-color var(--duration-fast, 150ms),
                border-color var(--duration-fast, 150ms),
                color var(--duration-fast, 150ms),
                box-shadow var(--duration-fast, 150ms);
}

.lightbox-btn:hover {
    transform: translateY(-2px) scale(1.06);
    background: rgba(28, 35, 54, 0.9);
    border-color: var(--accent-gold, #d4af37);
    color: var(--accent-gold, #d4af37);
    box-shadow: 0 0 18px rgba(212, 175, 55, 0.28);
}

.lightbox-btn:focus-visible {
    outline: 2px solid var(--accent-gold, #d4af37);
    outline-offset: 2px;
}

.lightbox-btn.has-liked {
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.5);
    background: rgba(239, 68, 68, 0.16);
    box-shadow: 0 0 16px rgba(239, 68, 68, 0.3);
}

.lightbox-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    pointer-events: none;
}

/* Close button distinct accent */
.lightbox-btn-close:hover {
    border-color: rgba(239, 68, 68, 0.6);
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    box-shadow: 0 0 18px rgba(239, 68, 68, 0.35);
}

/* ------------------------------------------------------------------------------
 * 4. Nav Arrows (Desktop Edge Triggers & Touch Compliant)
 * ------------------------------------------------------------------------------ */
.lightbox-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 25;
    width: 52px;
    height: 52px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 50%;
    background: rgba(14, 18, 29, 0.75);
    backdrop-filter: var(--glass-blur, blur(20px));
    -webkit-backdrop-filter: var(--glass-blur, blur(20px));
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-primary, #f8fafc);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
    transition: transform var(--duration-fast, 150ms) var(--ease-artbook),
                background-color var(--duration-fast, 150ms),
                border-color var(--duration-fast, 150ms),
                color var(--duration-fast, 150ms),
                box-shadow var(--duration-fast, 150ms);
}

.lightbox-nav-btn:hover {
    transform: translateY(-50%) scale(1.1);
    background: rgba(22, 28, 44, 0.92);
    border-color: var(--accent-gold, #d4af37);
    color: var(--accent-gold, #d4af37);
    box-shadow: 0 0 24px rgba(212, 175, 55, 0.35);
}

.lightbox-nav-btn:active {
    transform: translateY(-50%) scale(0.96);
}

.lightbox-nav-prev {
    left: clamp(20px, 3vw, 48px);
}

.lightbox-nav-next {
    right: clamp(20px, 3vw, 48px);
}

.lightbox-nav-btn svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
    pointer-events: none;
}

/* ------------------------------------------------------------------------------
 * 5. Bottom Metadata Bar & Filmstrip Carousel
 * ------------------------------------------------------------------------------ */
.lightbox-bottom-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 20;
    padding: 14px var(--space-6, 24px) calc(16px + var(--safe-bottom, 0px)) var(--space-6, 24px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    background: linear-gradient(0deg, rgba(5, 7, 12, 0.94) 0%, rgba(5, 7, 12, 0.6) 65%, transparent 100%);
    backdrop-filter: var(--glass-blur, blur(20px));
    -webkit-backdrop-filter: var(--glass-blur, blur(20px));
    pointer-events: none;
}

.lightbox-bottom-bar > * {
    pointer-events: auto;
}

.lightbox-caption-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    font-size: 13.5px;
    color: var(--text-secondary, #cbd5e1);
    max-width: min(840px, 92vw);
    margin: 0 auto;
    text-align: center;
    flex-wrap: wrap;
}

.lightbox-caption-text {
    font-family: var(--font-sans);
    font-size: 13.5px;
    line-height: 1.45;
    color: var(--text-secondary, #cbd5e1);
    letter-spacing: 0.01em;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 600px;
}

.lightbox-date-loc {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.06em;
    color: var(--text-dim, #94a3b8);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.1));
    padding: 2px 10px;
    border-radius: var(--radius-full, 9999px);
    white-space: nowrap;
}

/* Filmstrip Navigation Rail: Horizontally centered along viewport bottom */
.lightbox-filmstrip {
    display: flex;
    align-items: center;
    justify-content: safe center;
    gap: 8px;
    max-width: min(880px, 94vw);
    margin: 0 auto;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 6px 12px;
    border-radius: var(--radius-full, 9999px);
    background: rgba(14, 18, 29, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.09);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.lightbox-filmstrip::-webkit-scrollbar {
    display: none;
}

.lightbox-filmstrip-thumb {
    flex-shrink: 0;
    width: 54px;
    height: 38px;
    min-width: 44px;
    min-height: 36px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.12);
    opacity: 0.55;
    background: #101420;
    transition: transform var(--duration-fast, 150ms),
                opacity var(--duration-fast, 150ms),
                border-color var(--duration-fast, 150ms),
                box-shadow var(--duration-fast, 150ms);
}

.lightbox-filmstrip-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.lightbox-filmstrip-thumb:hover {
    opacity: 0.88;
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px) scale(1.04);
}

.lightbox-filmstrip-thumb.is-active {
    opacity: 1;
    border-color: var(--accent-gold, #d4af37);
    transform: translateY(-2px) scale(1.1);
    box-shadow: 0 0 14px var(--accent-gold-glow, rgba(212, 175, 55, 0.35));
}

/* ------------------------------------------------------------------------------
 * 6. Floating Heart Appreciation Animation
 * ------------------------------------------------------------------------------ */
.lightbox-heart-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    z-index: 20;
    width: 80px;
    height: 80px;
    color: #ef4444;
    pointer-events: none;
    opacity: 0;
}

.lightbox-heart-pulse.animate-pulse {
    animation: heartPop 0.75s cubic-bezier(0.17, 0.89, 0.32, 1.28) forwards;
}

.lightbox-heart-pulse svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
    filter: drop-shadow(0 0 16px rgba(239, 68, 68, 0.6));
}

@keyframes heartPop {
    0% {
        transform: translate(-50%, -50%) scale(0.2);
        opacity: 0;
    }
    40% {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 1;
    }
    70% {
        transform: translate(-50%, -50%) scale(1.0);
        opacity: 0.9;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.2) translateY(-20px);
        opacity: 0;
    }
}

/* ------------------------------------------------------------------------------
 * 7. Mobile-First Responsive Breakpoints (< 768px, < 480px, < 380px)
 * ------------------------------------------------------------------------------ */
@media (max-width: 768px) {
    .lightbox-top-bar {
        padding: var(--safe-top, 0px) var(--space-3, 14px) 0 var(--space-3, 14px);
    }

    .lightbox-info-group {
        gap: 10px;
    }

    .lightbox-title {
        max-width: 180px;
        font-size: 14px;
    }

    .lightbox-genre-badge {
        display: none; /* Save horizontal header estate on mobile */
    }

    .lightbox-nav-btn {
        display: none; /* Mobile relies on intuitive swipe gestures */
    }

    .lightbox-bottom-bar {
        padding: 10px var(--space-3, 14px) calc(12px + var(--safe-bottom, 0px)) var(--space-3, 14px);
        gap: 10px;
    }

    .lightbox-caption-text {
        max-width: 280px;
        font-size: 12.5px;
    }

    .lightbox-filmstrip {
        max-width: 100%;
        padding: 5px 8px;
    }

    .lightbox-filmstrip-thumb {
        width: 48px;
        height: 34px;
    }
}

@media (max-width: 480px) {
    .lightbox-top-bar {
        height: calc(56px + var(--safe-top, 0px));
        padding: var(--safe-top, 0px) 10px 0 10px;
    }

    .lightbox-info-group {
        gap: 8px;
    }

    .lightbox-counter {
        font-size: 11px;
        padding: 2px 8px;
    }

    .lightbox-title {
        max-width: 130px;
        font-size: 13px;
    }

    .lightbox-actions-tray {
        gap: 6px;
    }

    .lightbox-btn {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
    }

    .lightbox-btn svg {
        width: 16px;
        height: 16px;
    }

    .lightbox-bottom-bar {
        padding: 8px 10px calc(10px + var(--safe-bottom, 0px)) 10px;
        gap: 8px;
    }

    .lightbox-caption-text {
        max-width: 90vw;
        font-size: 12px;
    }

    .lightbox-date-loc {
        display: none;
    }
}

/* ------------------------------------------------------------------------------
 * 9. Unified Glassmorphic Share Drawer & Copy Short Link Sheet
 * ------------------------------------------------------------------------------ */
.share-drawer-backdrop {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: rgba(5, 7, 12, 0.65);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 10650;
    opacity: 0;
    visibility: hidden;
    pointer-events: none !important;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.share-drawer-backdrop.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto !important;
}

.share-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(440px, 94vw);
    background: rgba(10, 13, 18, 0.95);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: -14px 0 45px rgba(0, 0, 0, 0.65);
    z-index: 10700;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    color: #f1f5f9;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    visibility: hidden;
    pointer-events: none !important;
}

.share-drawer.is-open {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto !important;
}

.share-drawer-backdrop:not(.is-open),
.share-drawer-backdrop:not(.is-open) *,
.share-drawer:not(.is-open),
.share-drawer:not(.is-open) * {
    pointer-events: none !important;
}

.share-drag-handle {
    display: none;
    width: 40px;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.22);
    margin: 10px auto 4px;
    flex-shrink: 0;
}

.share-drawer-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 24px 20px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    position: sticky;
    top: 0;
    background: rgba(10, 13, 18, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 2;
}

.share-drawer-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #06b6d4;
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.25);
    border-radius: 4px;
    padding: 2px 7px;
    margin-bottom: 6px;
}

.share-drawer-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.3;
    margin: 0 0 4px;
    word-break: break-word;
}

.share-drawer-sub {
    font-size: 0.8rem;
    color: #94a3b8;
    margin: 0;
}

.share-drawer-close {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: #94a3b8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    touch-action: manipulation;
    flex-shrink: 0;
    margin-left: 12px;
}

.share-drawer-close:hover,
.share-drawer-close:focus-visible {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.2);
    outline: none;
}

.share-drawer-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.share-card {
    background: rgba(18, 22, 32, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;
    padding: 16px;
    box-sizing: border-box;
    max-width: 100%;
}

.share-card-qr {
    background: linear-gradient(135deg, rgba(18, 22, 32, 0.9) 0%, rgba(13, 17, 24, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.09);
    text-align: center;
}

.share-qr-preview-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 6px 0 2px;
}

.share-qr-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.15);
    box-sizing: border-box;
    width: 168px;
    height: 168px;
    max-width: 100%;
}

.share-qr-svg {
    display: block;
    width: 148px;
    height: 148px;
    max-width: 100%;
    height: auto;
    shape-rendering: crispEdges;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.share-qr-hint {
    font-size: 0.74rem;
    color: #94a3b8;
    margin: 0;
    letter-spacing: 0.02em;
    text-align: center;
}

.share-card-primary {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.09) 0%, rgba(18, 22, 32, 0.85) 100%);
    border: 1px solid rgba(6, 182, 212, 0.3);
    box-shadow: 0 4px 20px -6px rgba(6, 182, 212, 0.18);
}

.share-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.share-card-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #cbd5e1;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.share-chip-cyan {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #38bdf8;
    background: rgba(6, 182, 212, 0.16);
    border: 1px solid rgba(6, 182, 212, 0.35);
    border-radius: 4px;
    padding: 1px 6px;
}

.share-input-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.share-link-code {
    display: block;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 10px 12px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.82rem;
    color: #38bdf8;
    overflow-wrap: anywhere;
    word-break: break-all;
    user-select: all;
    cursor: text;
    max-width: 100%;
    box-sizing: border-box;
}

.share-link-muted {
    color: #94a3b8;
    font-size: 0.78rem;
}

.btn-share-copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    touch-action: manipulation;
    box-sizing: border-box;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: #f1f5f9;
}

.btn-copy-short-link {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.85) 0%, rgba(2, 132, 199, 0.85) 100%);
    border: 1px solid rgba(56, 189, 248, 0.5);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(6, 182, 212, 0.25);
}

.btn-copy-short-link:hover,
.btn-copy-short-link:focus-visible {
    background: linear-gradient(135deg, #06b6d4 0%, #0284c7 100%);
    box-shadow: 0 6px 18px rgba(6, 182, 212, 0.4);
    transform: translateY(-1px);
    outline: none;
}

.btn-copy-short-link:active,
.btn-share-copy:active {
    transform: translateY(0);
}

.btn-share-copy:hover:not(.btn-copy-short-link),
.btn-share-copy:focus-visible:not(.btn-copy-short-link) {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.22);
    outline: none;
}

.btn-share-copy.is-copied {
    background: rgba(16, 185, 129, 0.15) !important;
    border-color: rgba(16, 185, 129, 0.4) !important;
    color: #10b981 !important;
}

.share-channels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
    gap: 8px;
}

.share-channel-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 52px;
    padding: 8px 6px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: #cbd5e1;
    font-size: 0.74rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
    touch-action: manipulation;
    box-sizing: border-box;
}

.share-channel-btn:hover,
.share-channel-btn:focus-visible {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    transform: translateY(-1px);
    outline: none;
}

@media (max-width: 768px) {
    .share-drawer {
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-height: 82vh;
        max-height: 82dvh;
        border-radius: 20px 20px 0 0;
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.12);
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.75);
        transform: translateY(100%);
    }

    .share-drag-handle {
        display: block;
    }

    .share-drawer-header {
        padding: 12px 18px 12px;
    }

    .share-drawer-body {
        padding: 16px 18px calc(24px + var(--safe-bottom, 0px));
        gap: 14px;
    }
}

