/**
 * GoodMood Modal — Design System
 *
 * Uses tokens from the GoodMood design system:
 *   Radius: 0.75rem (cards), Shadows: shadow-lg, Font: Inter
 *   Colors: violet accent, semantic colors for types
 */

/* ── Overlay ─────────────────────────────────────────────── */
.gm-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(17, 24, 39, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}
.gm-modal-overlay.gm-modal-visible {
    opacity: 1;
    visibility: visible;
}

/* ── Modal Card ──────────────────────────────────────────── */
.gm-modal {
    background: #ffffff;
    border-radius: 0.75rem;
    padding: 2rem;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15), 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    text-align: center;
    transform: scale(0.95) translateY(10px);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.gm-modal-visible .gm-modal {
    transform: scale(1) translateY(0);
}

/* ── Icon ────────────────────────────────────────────────── */
.gm-modal-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

/* ── Title ───────────────────────────────────────────────── */
.gm-modal-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 0.5rem;
    line-height: 1.4;
}

/* ── Body ────────────────────────────────────────────────── */
.gm-modal-body {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0 0 1.5rem;
    line-height: 1.6;
}

/* ── Actions ─────────────────────────────────────────────── */
.gm-modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

/* ── Buttons ─────────────────────────────────────────────── */
.gm-modal-btn {
    padding: 0.5rem 1.25rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
    min-width: 100px;
    line-height: 1.4;
}
.gm-modal-btn:focus-visible {
    outline: 2px solid #FFA44E;
    outline-offset: 2px;
}

/* Secondary (cancel) */
.gm-modal-btn--secondary {
    background: #ffffff;
    color: #374151 !important;
    border-color: #e5e7eb;
}
.gm-modal-btn--secondary:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #374151 !important;
}

/* Danger (confirm destructive) */
.gm-modal-btn--danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #ffffff;
}
.gm-modal-btn--danger:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

/* Primary (info/default) */
.gm-modal-btn--primary {
    background: linear-gradient(135deg, #FFA44E, #f59e0b);
    color: #ffffff;
}
.gm-modal-btn--primary:hover {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 2px 8px rgba(255, 164, 78, 0.3);
}

/* Success */
.gm-modal-btn--success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
}
.gm-modal-btn--success:hover {
    background: linear-gradient(135deg, #059669, #047857);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}
