/* Ruomi modal — global overlay (login, location picker, alerts) */
.ruomi-modal-backdrop {
    position: fixed;
    inset: 0;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(4, 3, 10, 0.78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right))
             max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
    animation: ruomiFadeIn 0.25s ease;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.ruomi-modal {
    background: var(--glass-bg-strong, rgba(28, 20, 52, 0.95));
    border: 1px solid var(--glass-border, rgba(167, 139, 250, 0.28));
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
    max-width: 480px;
    width: 100%;
    margin: auto;
    flex-shrink: 0;
    animation: ruomiSlideUp 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.ruomi-modal-header {
    padding: 1.1rem 1.25rem 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.ruomi-modal-header h5 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--warm-ink);
}

.ruomi-modal-body {
    padding: 0.5rem 1.25rem 1.25rem;
    color: var(--warm-ink);
}

.ruomi-modal-close {
    background: none;
    border: none;
    color: var(--warm-muted);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.15rem 0.35rem;
}

.ruomi-modal-close:hover {
    color: var(--warm-coral);
}

body.ruomi-modal-open {
    overflow: hidden;
    touch-action: none;
}

html[data-theme="light"] .ruomi-modal {
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(124, 58, 237, 0.18);
}

@keyframes ruomiFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes ruomiSlideUp {
    from { opacity: 0; transform: translateY(16px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 575.98px) {
    .ruomi-modal-backdrop {
        align-items: flex-end;
        padding: 0;
    }
    .ruomi-modal {
        max-width: 100%;
        border-radius: 18px 18px 0 0;
        margin: 0;
        max-height: 88vh;
        overflow-y: auto;
    }
}

/* Location dropdown in navbar — less transparent */
.ruomi-location-menu {
    background: rgba(18, 14, 36, 0.94) !important;
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid rgba(167, 139, 250, 0.32) !important;
}

html[data-theme="light"] .ruomi-location-menu {
    background: rgba(255, 255, 255, 0.96) !important;
    border-color: rgba(124, 58, 237, 0.2) !important;
}

.ruomi-location-menu .dropdown-header {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--warm-muted);
}
