﻿.custom-alert-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 16px;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    z-index: 9999;
    animation: alert-overlay-in 0.12s ease-out;
}

.custom-alert-box {
    width: 100%;
    max-width: 360px;
    padding: 24px 24px 22px;
    background: #ffffff;
    border: 1px solid #ffcdd2;
    border-radius: 14px;
    box-shadow: none;
    text-align: center;
    font-family: 'Microsoft JhengHei', Arial, sans-serif;
    animation: alert-box-in 0.14s ease-out;
}

.custom-alert-box p {
    margin: 0 0 22px;
    color: #1f2937;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.65;
    word-break: break-word;
    white-space: pre-wrap;
}

.custom-alert-box button {
    min-width: 120px;
    min-height: 44px;
    padding: 0 22px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #c62828 0%, #e53935 100%);
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Microsoft JhengHei', Arial, sans-serif;
    letter-spacing: 0.04em;
    cursor: pointer;
    box-shadow: none;
    transition: filter 0.18s ease;
}

.custom-alert-box button:hover {
    filter: brightness(1.04);
}

.custom-alert-box button:active {
    filter: brightness(0.98);
}

.custom-alert-actions {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.custom-alert-box-confirm .custom-alert-btn-cancel {
    background: linear-gradient(135deg, #1565c0 0%, #1e88e5 100%);
    color: #ffffff;
    border: none;
}

.custom-alert-box-confirm .custom-alert-btn-cancel:hover {
    filter: brightness(1.04);
}

.custom-alert-box-confirm .custom-alert-btn-confirm {
    background: linear-gradient(135deg, #c62828 0%, #e53935 100%);
    color: #ffffff;
    border: none;
}

.custom-alert-box-confirm .custom-alert-btn-confirm:hover {
    filter: brightness(1.04);
}

.custom-alert-box-confirm .custom-alert-actions button:focus {
    outline: none;
}

@keyframes alert-overlay-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes alert-box-in {
    from {
        opacity: 0;
        transform: translateY(6px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 480px) {
    .custom-alert-box {
        padding: 22px 20px 20px;
        border-radius: 12px;
    }

    .custom-alert-box p {
        font-size: 17px;
        margin-bottom: 18px;
    }

    .custom-alert-box:not(.custom-alert-box-confirm) button {
        width: 100%;
    }

    .custom-alert-box-confirm .custom-alert-actions {
        flex-direction: row;
    }

    .custom-alert-box-confirm .custom-alert-actions button {
        flex: 1;
        min-width: 0;
    }
}
