:root {
    --custom-alert-color-success: #008000;
    --custom-alert-color-success-bg: rgba(144, 238, 144, 0.1);
    --custom-alert-color-danger: #ff0000;
    --custom-alert-color-danger-bg: rgba(253, 170, 170, 0.1);
    --custom-alert-color-primary: #3399ff;
    --custom-alert-color-primary-bg: rgba(173, 216, 230, 0.1);
    --custom-alert-color-warning-border: #ffa500;
    --custom-alert-color-warning-text: #cc0000;
    --custom-alert-color-warning-bg: rgba(255, 236, 139, 0.1);
    --custom-alert-color-black: #000;
    --custom-alert-color-white-bg: rgba(230, 230, 230, 0.1);
    --custom-alert-color-white-text: #000;
    --custom-alert-btn-yes-bg: #28a745;
    --custom-alert-btn-no-bg: #dc3545;
    --custom-alert-btn-cancel-bg: #6c757d;
}

/* Background overlay */
.custom-alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: custom-alert-fade-in 0.2s ease-out;
}

    /* Hide overlay */
    .custom-alert-overlay.hide {
        animation: custom-alert-fade-out 0.2s ease-in forwards;
    }

/* Alert box */
.custom-alert-box {
    border: 3px solid var(--custom-alert-color-black);
    margin: 12px;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.3);
    width: 32em;
    max-width: 100%;
    position: relative;
    animation: custom-alert-scale-in 0.2s ease-out;
}

    .custom-alert-box.success {
        color: var(--custom-alert-color-success);
        border-color: var(--custom-alert-color-success);
        background: linear-gradient( 360deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 1) 10%, rgba(144, 238, 144, 1) 100% );
        box-shadow: var(--custom-alert-color-success-bg) 0px 54px 50px, var(--custom-alert-color-success-bg) 0px -12px 50px, var(--custom-alert-color-success-bg) 0px 4px 50px, var(--custom-alert-color-success-bg) 0px 12px 50px, var(--custom-alert-color-success-bg) 0px -3px 50px;
    }

    .custom-alert-box.danger {
        color: var(--custom-alert-color-danger);
        border-color: var(--custom-alert-color-danger);
        background: linear-gradient( 360deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 1) 10%, rgba(253, 170, 170, 1) 100% );
        box-shadow: var(--custom-alert-color-danger-bg) 0px 54px 50px, var(--custom-alert-color-danger-bg) 0px -12px 50px, var(--custom-alert-color-danger-bg) 0px 4px 50px, var(--custom-alert-color-danger-bg) 0px 12px 50px, var(--custom-alert-color-danger-bg) 0px -3px 50px;
    }

    .custom-alert-box.primary {
        color: var(--custom-alert-color-primary);
        border-color: var(--custom-alert-color-primary);
        background: linear-gradient( 360deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 1) 10%, rgba(173, 216, 230, 1) 100% );
        box-shadow: var(--custom-alert-color-primary-bg) 0px 54px 50px, var(--custom-alert-color-primary-bg) 0px -12px 50px, var(--custom-alert-color-primary-bg) 0px 4px 50px, var(--custom-alert-color-primary-bg) 0px 12px 50px, var(--custom-alert-color-primary-bg) 0px -3px 50px;
    }

    .custom-alert-box.warning {
        color: var(--custom-alert-color-warning-text);
        border-color: var(--custom-alert-color-warning-border);
        background: linear-gradient( 360deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 1) 10%, rgba(255, 236, 139, 1) 100% );
        box-shadow: var(--custom-alert-color-warning-bg) 0px 54px 50px, var(--custom-alert-color-warning-bg) 0px -12px 50px, var(--custom-alert-color-warning-bg) 0px 4px 50px, var(--custom-alert-color-warning-bg) 0px 12px 50px, var(--custom-alert-color-warning-bg) 0px -3px 50px;
    }

    .custom-alert-box.white {
        color: var(--custom-alert-color-white-text);
        border-color: var(--custom-alert-color-black);
        background: linear-gradient( 360deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 1) 10%, rgba(230, 230, 230, 1) 100% );
        box-shadow: var(--custom-alert-color-white-bg) 0px 54px 50px, var(--custom-alert-color-white-bg) 0px -12px 50px, var(--custom-alert-color-white-bg) 0px 4px 50px, var(--custom-alert-color-white-bg) 0px 12px 50px, var(--custom-alert-color-white-bg) 0px -3px 50px;
    }

    /* Hide alert box */
    .custom-alert-box.hide {
        animation: custom-alert-scale-out 0.2s ease-in forwards;
    }

/* Alert header (Title + Close Button) */
.custom-alert-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
}

.custom-alert-title {
    font-weight: bold;
    font-size: 22px !important;
    margin-top: 1.2rem;
}
.custom-alert-message {
    max-height: 25vh;
    overflow: auto;
    padding:1rem;
}

/* Close button */
.custom-alert-close {
    background: none;
    border: none;
    font-size: 30px;
    cursor: pointer;
    display: none;
}

/* Buttons */
.custom-alert-btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 0.8rem;
    cursor: pointer;
    color: white;
    margin: 5px;
    transition: transform 0.2s ease;
}

    .custom-alert-btn:hover {
        transform: scale(1.05);
    }

.custom-alert-btn-success {
    color: #fff;
    background-color: var(--custom-alert-color-success);
}

.custom-alert-btn-danger {
    color: #fff;
    background-color: var(--custom-alert-color-danger);
}

.custom-alert-btn-primary {
    color: #fff;
    background-color: var(--custom-alert-color-primary);
}

.custom-alert-btn-warning {
    color: #fff;
    background-color: var(--custom-alert-color-warning-border);
}

.custom-alert-btn-white {
    color: #fff;
    background-color: var(--custom-alert-color-black);
}

.custom-alert-btn-text {
    margin: 10px;
}

.custom-alert-yes-btn {
    background-color: var(--custom-alert-btn-yes-bg);
}

.custom-alert-no-btn {
    background-color: var(--custom-alert-btn-no-bg);
}

.custom-alert-cancel-btn {
    background-color: var(--custom-alert-btn-cancel-bg);
}

/* Input field */
.custom-alert-input {
    width: 100%;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin: 1rem 0;
    box-sizing: border-box;
}

.custom-alert-overlay {
    animation: custom-alert-fade-in 0.3s ease;
}

    .custom-alert-overlay.hide {
        animation: custom-alert-fade-out 0.3s ease forwards;
    }

.custom-alert-box {
    animation: custom-alert-pop-in 0.4s ease;
}

    .custom-alert-box.hide {
        animation: custom-alert-pop-out 0.3s ease forwards;
    }

@keyframes custom-alert-pop-in {
    0% {
        transform: scale(0.7);
        opacity: 0;
    }

    45% {
        transform: scale(1.05);
        opacity: 1;
    }

    80% {
        transform: scale(0.95);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes custom-alert-pop-out {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: scale(0.7);
        opacity: 0;
    }
}