
/* =========================================
   PREMIUM ALERT POPUP DESIGN
========================================= */

.alertable-overlay {
    position: fixed;
    inset: 0;
    z-index: 99998;
    background: rgba(15, 23, 42, 0.68);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

/* Main popup */
.alertable {
    position: fixed;
    z-index: 99999;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% - 30px);
    max-width: 450px;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    overflow: hidden;
    background: #ffffff;
    border: 2px solid #6366f1;
    border-radius: 10px;
    box-shadow: 0 0 0 5px rgba(99, 102, 241, 0.12), 0 20px 60px rgba(15, 23, 42, 0.30), 0 5px 15px rgba(99, 102, 241, 0.15);
    font-family: "Segoe UI", Arial, sans-serif;
    color: #172554;
    animation: premiumAlertShow 0.25s ease-out;
}

@keyframes premiumAlertShow {
    from {
        opacity: 0;
        transform: translate(-50%, -46%) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Bold gradient header */
.alertable-header {
    display: flex;
    align-items: center;
    gap: 13px;
    margin: 0;
    padding: 8px 15px;
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
    border-bottom: 2px solid #c7d2fe;
    color: #312e81;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.2px;
    line-height: 1.4;
}

    /* Header icon */
    .alertable-header::before {
        content: "!";
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: linear-gradient(135deg, #818cf8, #4f46e5);
        border: 1px solid #ffffff;
        color: #ffffff;
        font-size: 22px;
        font-weight: 600;
        box-shadow: 0 4px 12px rgba(79, 70, 229, 0.30);
    }

/* Popup message with border */
.alertable-message {
    margin: 10px 10px 10px;
    padding: 12px 12px;
    /*    background: linear-gradient(135deg, #ffffff, #f8faff);
    border: 2px solid #dbe4ff;
    border-left: 5px solid #6366f1;*/
    border-radius: 11px;
    color: #1e293b;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.75;
    overflow-wrap: anywhere;
    box-shadow: 0 3px 10px rgba(99, 102, 241, 0.06);
}

/* Prompt section */
.alertable-prompt {
    margin: 0;
    padding: 8px 20px 20px;
}

/* Text input */
.alertable-input {
    display: block;
    width: 100%;
    min-height: 47px;
    box-sizing: border-box;
    margin: 0;
    padding: 12px 14px;
    background: #ffffff;
    border: 2px solid #c7d2fe;
    border-radius: 10px;
    color: #1e293b;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    outline: none;
    transition: all 0.2s ease;
}

    .alertable-input:focus {
        border-color: #6366f1;
        box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
    }

/* Footer */
.alertable-buttons {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 7px 10px 7px;
    background: #f5f7ff;
    border-top: 2px solid #e0e7ff;
}

/* Common button styling */
.alertable-ok,
.alertable-cancel {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    margin: 0;
    padding: 0px 20px;
    border: 2px solid transparent;
    border-radius: 5px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Primary action */
.alertable-ok {
    color: #ffffff;
    background: linear-gradient(135deg, #6366f1, #4338ca);
    border-color: #4338ca;
    box-shadow: 0 5px 13px rgba(79, 70, 229, 0.25);
}

    .alertable-ok:hover {
        color: #ffffff;
        background: linear-gradient(135deg, #4f46e5, #3730a3);
        box-shadow: 0 7px 18px rgba(79, 70, 229, 0.35);
        transform: translateY(-2px);
    }

    .alertable-ok:active {
        transform: translateY(0);
    }

/* Cancel action */
.alertable-cancel {
    color: #334155;
    background: #ffffff;
    border-color: #cbd5e1;
}

    .alertable-cancel:hover {
        color: #0f172a;
        background: #e2e8f0;
        border-color: #94a3b8;
    }

    /* Keyboard focus */
    .alertable-ok:focus-visible,
    .alertable-cancel:focus-visible,
    .alertable-input:focus-visible {
        outline: 3px solid rgba(99, 102, 241, 0.35);
        outline-offset: 3px;
    }

/* Responsive layout */
@media (max-width: 480px) {
    .alertable {
        width: calc(100% - 28px);
        border-radius: 15px;
    }

    .alertable-header {
        padding: 17px;
        font-size: 18px;
    }

        .alertable-header::before {
            width: 36px;
            height: 36px;
            font-size: 22px;
        }

    .alertable-message {
        margin: 16px 15px 10px;
        padding: 14px;
        font-size: 15px;
    }

    .alertable-prompt {
        padding: 8px 15px 16px;
    }

    .alertable-buttons {
        padding: 14px 15px 17px;
        gap: 8px;
    }

    .alertable-ok,
    .alertable-cancel {
        padding: 10px 18px;
    }
}

/* Reduced motion accessibility */
@media (prefers-reduced-motion: reduce) {
    .alertable {
        animation: none;
    }

    .alertable-ok,
    .alertable-cancel,
    .alertable-input {
        transition: none;
    }
}



/* =====================================
   SUCCESS ALERT DESIGN
===================================== */

.alertable.success-alert {
    border: 1px solid #16a34a;
    box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.12), 0 20px 55px rgba(22, 101, 52, 0.22);
}

    /* Success header */
    .alertable.success-alert .alertable-header {
        color: #166534;
        background: linear-gradient(135deg, #f0fdf4, #dcfce7);
        border-bottom: 2px solid #bbf7d0;
    }

        /* Success icon */
        .alertable.success-alert .alertable-header::before {
            content: "\2713";
            background: linear-gradient(135deg, #4ade80, #16a34a);
            color: #ffffff;
            border: 2px solid #ffffff;
            box-shadow: 0 4px 12px rgba(22, 163, 74, 0.25);
            font-family: Arial, sans-serif;
            font-size: 23px;
            font-weight: 900;
        }

    /* Bold success message */
    .alertable.success-alert .alertable-message {
        color: #166534;
/*        background: linear-gradient(135deg, #ffffff, #f0fdf4);
        border: 2px solid #bbf7d0;
        border-left: 5px solid #16a34a;*/
        font-size: 16px;
        font-weight: 600;
    }

    /* Success footer */
    .alertable.success-alert .alertable-buttons {
        background: #f0fdf4;
        border-top: 2px solid #dcfce7;
    }

    /* Success OK button */
    .alertable.success-alert .alertable-ok {
        color: #ffffff;
        background: linear-gradient(135deg, #22c55e, #15803d);
        border-color: #15803d;
        box-shadow: 0 5px 13px rgba(22, 163, 74, 0.25);
    }

        .alertable.success-alert .alertable-ok:hover {
            background: linear-gradient(135deg, #16a34a, #166534);
            border-color: #166534;
            box-shadow: 0 7px 18px rgba(22, 163, 74, 0.35);
            transform: translateY(-2px);
        }

/* =====================================
   ERROR ALERT DESIGN
===================================== */

.alertable.error-alert {
    border-color: #dc2626;
}

    .alertable.error-alert .alertable-header {
        color: #991b1b;
        background: linear-gradient(135deg, #fef2f2, #fee2e2);
        border-bottom-color: #fecaca;
    }

        .alertable.error-alert .alertable-header::before {
            content: "\2715";
            background: linear-gradient(135deg, #f87171, #dc2626);
            box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
        }

    .alertable.error-alert .alertable-message {
        color: #991b1b;
        background: #fffafa;
        border-color: #fecaca;
        border-left-color: #dc2626;
    }

    .alertable.error-alert .alertable-ok {
        background: linear-gradient(135deg, #ef4444, #b91c1c);
        border-color: #b91c1c;
        box-shadow: 0 5px 13px rgba(220, 38, 38, 0.2);
    }

        .alertable.error-alert .alertable-ok:hover {
            background: linear-gradient(135deg, #dc2626, #991b1b);
        }
