/* gl-modal-unified.css v20260603
 * BUTIKO PRABANGA — aksominė dėžutė, ne popierinė.
 * Bendras visų modalų stilius.
 */

/* ── Video fonas (subtilus gyvybės pojūtis) ── */
#bgVideo.gl-modal-video-bg {
    opacity: 0.28;
    filter: brightness(0.32) saturate(0.5);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

/* ── Bendras overlay ── */
.gl-modal-unified {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background:
        radial-gradient(ellipse at 50% 30%, rgba(249, 115, 22, 0.05), transparent 65%),
        radial-gradient(ellipse at 85% 15%, rgba(249, 115, 22, 0.03), transparent 50%),
        rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(12px) saturate(0.9);
    -webkit-backdrop-filter: blur(12px) saturate(0.9);
    animation: glFadeIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes glFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.gl-modal-unified.is-open,
.gl-modal-unified.open {
    display: flex;
}

/* ── Dėžutė — aksominis pojūtis ── */
.gl-modal-unified__box {
    position: relative;
    z-index: 1;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(249, 115, 22, 0.04), transparent 50%),
        linear-gradient(180deg, rgba(20, 28, 45, 0.97), rgba(15, 23, 42, 0.98));
    border-radius: 20px;
    border: 1px solid rgba(249, 115, 22, 0.22);
    box-shadow:
        0 0 0 1px rgba(249, 115, 22, 0.06),
        0 8px 32px rgba(0, 0, 0, 0.5),
        0 24px 64px rgba(0, 0, 0, 0.35),
        0 0 100px rgba(249, 115, 22, 0.04);
    width: 100%;
    max-width: 500px;
    max-height: 92vh;
    max-height: 92dvh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: glBoxSlideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes glBoxSlideUp {
    from { opacity: 0; transform: translateY(16px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Glass varijantas — sodresnis ── */
.gl-modal-unified__box--glass {
    background:
        radial-gradient(ellipse at 50% 0%, rgba(249, 115, 22, 0.07), transparent 55%),
        radial-gradient(ellipse at 80% 100%, rgba(249, 115, 22, 0.02), transparent 40%),
        linear-gradient(180deg, rgba(20, 30, 48, 0.78), rgba(12, 20, 35, 0.86));
    backdrop-filter: blur(28px) saturate(1.15);
    -webkit-backdrop-filter: blur(28px) saturate(1.15);
    border: 1px solid rgba(249, 115, 22, 0.2);
    box-shadow:
        0 0 0 1px rgba(249, 115, 22, 0.04),
        0 12px 40px rgba(0, 0, 0, 0.55),
        0 28px 72px rgba(0, 0, 0, 0.3),
        0 0 140px rgba(249, 115, 22, 0.03),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.gl-modal-unified__box--glass::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255,255,255,0.025) 0%, transparent 30%, transparent 70%, rgba(0,0,0,0.08) 100%);
    pointer-events: none;
    z-index: 0;
}

.gl-modal-unified__box--glass > * { position: relative; z-index: 1; }

/* ── Header ── */
.gl-modal-unified__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px 14px;
    border-bottom: 1px solid rgba(249, 115, 22, 0.1);
    flex: 0 0 auto;
}

.gl-modal-unified__title {
    margin: 0;
    font-family: 'Zilla Slab', 'Arvo', Georgia, serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #f97316;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.gl-modal-unified__close {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(248, 113, 113, 0.15);
    background: rgba(248, 113, 113, 0.06);
    color: #f87171;
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    opacity: 0.7;
}
.gl-modal-unified__close:hover {
    background: rgba(248, 113, 113, 0.18);
    border-color: rgba(248, 113, 113, 0.3);
    opacity: 1;
    transform: scale(1.08);
}

/* ── Body (scrollable) ── */
.gl-modal-unified__body {
    flex: 1 1 auto;
    padding: 18px 22px 22px;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(249, 115, 22, 0.18) transparent;
}
.gl-modal-unified__body::-webkit-scrollbar { width: 5px; }
.gl-modal-unified__body::-webkit-scrollbar-track { background: transparent; }
.gl-modal-unified__body::-webkit-scrollbar-thumb {
    background: rgba(249, 115, 22, 0.18);
    border-radius: 999px;
}
.gl-modal-unified__body::-webkit-scrollbar-thumb:hover {
    background: rgba(249, 115, 22, 0.3);
}

/* ── Desktop: platesnis ── */
@media (min-width: 960px) { .gl-modal-unified__box { max-width: 620px; } }
@media (min-width: 1300px) { .gl-modal-unified__box { max-width: 700px; } }

/* ── Mobilūs ── */
@media (max-width: 520px) {
    .gl-modal-unified { padding: 6px; align-items: stretch; }
    .gl-modal-unified__box {
        border-radius: 18px 18px 0 0;
        max-height: 100vh; max-height: 100dvh;
        animation: none;
    }
    .gl-modal-unified__header { padding: 14px 18px 10px; }
    .gl-modal-unified__body { padding: 14px 18px 18px; }
}

/* ── Seni įrenginiai — jokių efektų ── */
@media (prefers-reduced-motion: reduce) {
    .gl-modal-unified, .gl-modal-unified__box, .gl-modal-unified__box--glass, .gl-modal-unified__close {
        transition: none !important; animation: none !important;
    }
    .gl-modal-unified, .gl-modal-unified__box--glass {
        backdrop-filter: none; -webkit-backdrop-filter: none;
        background: rgba(10, 18, 32, 0.95) !important;
    }
}
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .gl-modal-unified { background: rgba(0, 0, 0, 0.86); }
    .gl-modal-unified__box--glass { background: rgba(14, 23, 40, 0.94); }
}

/* ── Analog boutique laikrodis (v20260603) ── */
.gl-wl-analog-clock-wrap {
    display: flex;
    justify-content: center;
    margin: 0 auto 4px;
}
.gl-wl-analog-clock {
    display: block;
    width: 100px;
    height: 100px;
    filter: drop-shadow(0 0 14px rgba(249, 115, 22, 0.18));
}
@media (min-width: 520px) {
    .gl-wl-analog-clock { width: 125px; height: 125px; }
}
