﻿/* ── Spinner Overlay ─────────────────────────────────────────── */
.ruah-spinner-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(3px);
    opacity: 1;
    transition: opacity 0.4s ease;
}

    .ruah-spinner-overlay.ruah-fade-out {
        opacity: 0;
        pointer-events: none;
    }

.ruah-spinner-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.ruah-spinner {
    width: 52px;
    height: 52px;
    border: 5px solid rgba(255, 255, 255, 0.25);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: ruah-spin 0.75s linear infinite;
}

.ruah-spinner-msg {
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 500;
    margin: 0;
    letter-spacing: 0.02em;
}

@keyframes ruah-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ── Popup Backdrop ──────────────────────────────────────────── */
.ruah-popup-backdrop {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
    opacity: 1;
    transition: opacity 0.3s ease;
}

    .ruah-popup-backdrop.ruah-fade-out {
        opacity: 0;
        pointer-events: none;
    }

/* ── Popup Card ──────────────────────────────────────────────── */
.ruah-popup {
    background: #ffffff;
    border-radius: 12px;
    width: 100%;
    max-width: 420px;
    margin: 1rem;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    animation: ruah-popup-in 0.25s ease;
}

@keyframes ruah-popup-in {
    from {
        transform: scale(0.92);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* ── Popup Header (full-color bar) ───────────────────────────── */
.ruah-popup-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
}

.ruah-popup-icon {
    font-size: 14px;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #ffffff;
}

.ruah-popup-title {
    flex: 1;
    font-size: 15px;
    font-weight: 500;
    color: #ffffff;
}

.ruah-popup-close {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    cursor: pointer;
    font-size: 13px;
    color: #ffffff;
    padding: 4px 9px;
    border-radius: 4px;
    line-height: 1;
    transition: background 0.15s;
}

    .ruah-popup-close:hover {
        background: rgba(255, 255, 255, 0.3);
    }

/* ── Popup Body ──────────────────────────────────────────────── */
.ruah-popup-body {
    padding: 18px 18px 22px;
    max-height: 300px;
    overflow-y: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.ruah-popup-message {
    font-size: 15px;
    color: light-dark(rgba(20, 20, 19, 1), rgba(250, 249, 245, 1));
    margin: 0;
    line-height: 1.6;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-family: "Anthropic Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ── Error Theme ─────────────────────────────────────────────── */
.ruah-popup-danger .ruah-popup-header {
    background: #D85A30;
}

/* ── Warning Theme ───────────────────────────────────────────── */
.ruah-popup-warning .ruah-popup-header {
    background: #BA7517;
}

/* ── Mandatory Theme ─────────────────────────────────────────── */
.ruah-popup-mandatory .ruah-popup-header {
    background: #2563EB;
}
.ruah-popup-mandatory .ruah-popup-icon {
    color: #EF4444;
}
