/**
 * ═══════════════════════════════════════════════════════════════
 * LOGOUT CONFIRMATION MODAL
 * Uses CSS variables — automatically matches the active theme.
 * ═══════════════════════════════════════════════════════════════
 */

/* Overlay */
.logout-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    display: none;
    opacity: 0;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}
.logout-modal-overlay.active {
    display: flex;
    opacity: 1;
}

/* Modal panel — uses theme card + border variables */
.logout-modal {
    background: var(--bg-card);
    border: 1px solid var(--border-secondary);
    border-radius: var(--radius-xl);
    max-width: 440px;
    width: 90%;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.logout-modal-overlay.active .logout-modal {
    transform: scale(1);
    opacity: 1;
}

/* Header — uses accent-secondary as the banner (matches page-header) */
.logout-modal-header {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    padding: 30px;
    text-align: center;
}

/* Icon circle */
.logout-modal-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.18);
    border: 2px solid rgba(255, 255, 255, 0.30);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    animation: lm-pulse 2s ease-in-out infinite;
}
.logout-modal-icon i {
    font-size: 2.5rem;
    color: #fff;
}

@keyframes lm-pulse {
    0%, 100% { transform: scale(1);    box-shadow: 0 0 0 0   rgba(255,255,255,0.35); }
    50%       { transform: scale(1.05); box-shadow: 0 0 0 14px rgba(255,255,255,0);   }
}

.logout-modal-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 10px;
    letter-spacing: 0.4px;
    text-shadow: 0 1px 6px rgba(0,0,0,0.22);
}
.logout-modal-subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.88);
    margin: 0;
    text-shadow: 0 1px 4px rgba(0,0,0,0.18);
}

/* Body */
.logout-modal-body {
    padding: 32px 30px;
    text-align: center;
    background: var(--bg-card);
}
.logout-modal-message {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.65;
    margin: 0 0 28px;
}

/* Buttons row */
.logout-modal-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
}

.logout-modal-btn {
    flex: 1;
    min-width: 140px;
    padding: 13px 20px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.97rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.25s ease;
}
.logout-modal-btn i { font-size: 1.15rem; }

/* Cancel — subtle secondary style */
.logout-modal-btn-cancel {
    background: var(--bg-tertiary);
    color: var(--text-muted);
    border: 1px solid var(--border-primary);
}
.logout-modal-btn-cancel:hover {
    background: var(--hover-bg);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: translateY(-2px);
}

/* Confirm — accent gradient matches page-header and page buttons */
.logout-modal-btn-confirm {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    color: #fff;
    box-shadow: 0 4px 14px var(--focus-ring);
}
.logout-modal-btn-confirm:hover {
    box-shadow: 0 6px 20px var(--focus-ring);
    transform: translateY(-2px);
    filter: brightness(1.08);
}
.logout-modal-btn-confirm:active { transform: translateY(0); }

/* Loading state */
.logout-modal-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}
@keyframes lm-spin {
    to { transform: rotate(360deg); }
}
.logout-modal-btn.loading i { animation: lm-spin 0.9s linear infinite; }

/* Desktop — prevent text wrap */
@media (min-width: 481px) {
    .logout-modal-btn { white-space: nowrap; min-width: 160px; }
}

/* Mobile */
@media (max-width: 480px) {
    .logout-modal { width: 95%; }
    .logout-modal-header { padding: 24px 18px; }
    .logout-modal-icon { width: 68px; height: 68px; }
    .logout-modal-icon i { font-size: 2rem; }
    .logout-modal-title { font-size: 1.5rem; }
    .logout-modal-subtitle { font-size: 0.9rem; }
    .logout-modal-body { padding: 24px 18px; }
    .logout-modal-message { font-size: 0.93rem; }
    .logout-modal-actions { flex-direction: column; gap: 10px; }
    .logout-modal-btn { width: 100%; min-width: 0; }
}