/* =====================================================
   OTTICA BOERIS - CRM Admin Modal System
   Refined, minimal, light-weight UI (UI UX Pro Max)
   ===================================================== */

:root {
    --modal-bg: #FFFFFF;
    --modal-overlay-bg: rgba(15, 23, 42, 0.45); /* Soft dark overlay */
    --modal-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(226, 232, 240, 0.8);
    --modal-radius: 20px;
    --modal-accent: var(--admin-primary, #2563EB); /* Match CRM Primary */
    --modal-text: #0F172A;
    --modal-text-light: #64748B;
    --modal-border: #E2E8F0;
}

/* Overlay & Container */
.admin-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.75); /* Darker shaded background without blur */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.admin-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Modal Content Box */
.admin-modal {
    background: var(--modal-bg);
    width: 90%;
    max-width: 420px;
    border-radius: var(--modal-radius);
    box-shadow: var(--modal-shadow);
    overflow: hidden;
    transform: scale(0.95) translateY(15px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); /* Spring bounce iOS style */
    position: relative;
    display: flex;
    flex-direction: column;
}

.admin-modal-overlay.active .admin-modal {
    transform: scale(1) translateY(0);
}

/* Header Section */
.admin-modal-header {
    padding: 32px 32px 16px;
    text-align: center;
    border: none;
    display: block;
}

.admin-modal-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: rgba(37, 99, 235, 0.08); /* Soft primary bg */
    color: var(--modal-accent);
    border-radius: 50%;
    font-size: 1.5rem;
    margin: 0 auto 20px;
}

.admin-modal-overlay.active .admin-modal-icon i {
    animation: popIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes popIn {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.admin-modal-title {
    font-family: inherit;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--modal-text);
    margin: 0;
    letter-spacing: -0.02em;
}

/* Body Section */
.admin-modal-body {
    padding: 0 32px 28px;
    text-align: center;
}

.admin-modal-message {
    font-size: 0.95rem;
    color: var(--modal-text-light);
    line-height: 1.6;
    margin: 0;
}

/* Footer Section */
.admin-modal-footer {
    padding: 20px 32px 32px;
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* Buttons integration */
.admin-modal .admin-btn {
    flex: 1;
    min-width: 0;
    padding: 12px 20px;
    border-radius: 12px; /* Smoother CRM buttons */
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    text-transform: none;
}

.admin-modal .admin-btn-outline {
    background: #F8FAFC;
    border: 1px solid var(--modal-border);
    color: var(--modal-text);
}

.admin-modal .admin-btn-outline:hover {
    background: #F1F5F9;
    border-color: #CBD5E1;
}

.admin-modal .admin-btn-primary {
    background: var(--modal-accent);
    color: #FFFFFF;
    border: 1px solid var(--modal-accent);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.admin-modal .admin-btn-primary:hover {
    background: #1D4ED8;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
}

.admin-modal .admin-btn-danger {
    background: #EF4444;
    color: #FFFFFF;
    border: 1px solid #EF4444;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.admin-modal .admin-btn-danger:hover {
    background: #DC2626;
    border-color: #DC2626;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(220, 38, 38, 0.3);
}

/* Danger / Error Variant (Soft UI) */
.admin-modal-danger .admin-modal-icon {
    background: #FEF2F2 !important; /* Soft Pastel Red */
    color: #DC2626 !important; /* Deep Red */
    border: none;
}

.admin-modal-danger .admin-modal-title {
    color: #0F172A; /* Keep title dark instead of aggressively red */
}

/* Responsive Tweak */
@media (max-width: 480px) {
    .admin-modal {
        transform: scale(0.95) translateY(0);
        margin: auto;
    }
    
    .admin-modal-header {
        padding: 24px 24px 16px;
    }

    .admin-modal-body {
        padding: 0 24px 24px;
    }

    .admin-modal-footer {
        padding: 0 24px 24px;
        flex-direction: column-reverse;
        /* Put main action on top on mobile */
        gap: 8px;
    }

    .admin-modal-title {
        font-size: 1.25rem;
    }

    .admin-modal-icon {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }
}