/* alert/style.css */

/* ฉากหลังสีดำโปร่งแสง */
.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: 9999; /* ให้อยู่บนสุดเสมอ */
    opacity: 0;
    animation: fadeIn 0.2s forwards;
}

/* ตัวกล่องข้อความ */
.custom-alert-box {
    background: white;
    padding: 25px 30px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    text-align: center;
    max-width: 400px;
    width: 80%;
    transform: translateY(-20px);
    animation: slideDown 0.3s forwards;
}

.custom-alert-title {
    margin: 0 0 10px 0;
    font-size: 1.4em;
    color: #333;
}

.custom-alert-msg {
    margin: 0 0 20px 0;
    font-size: 1em;
    color: #666;
    line-height: 1.5;
}

/* ปุ่มกด */
.custom-alert-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background 0.2s;
}

.custom-alert-btn:hover:not(:disabled) {
    background: #0056b3;
}

/* สถานะตอนปุ่มถูกล็อค (นับถอยหลัง) */
.custom-alert-btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
}

/* แอนิเมชัน */
@keyframes fadeIn { to { opacity: 1; } }
@keyframes slideDown { to { transform: translateY(0); } }