/* styles/popup-status.css */

/* ฉากหลัง (Overlay) */
.status-popup {
    position: fixed;
    inset: 0; /* เต็มจอ */
    z-index: 9999;
    display: none; /* ซ่อนไว้ก่อน */
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6); /* สีดำจางๆ */
    backdrop-filter: blur(5px); /* เบลอฉากหลัง */
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* คลาสสำหรับแสดงผล (ใช้คู่กับ JS) */
.status-popup.show {
    display: flex !important;
    opacity: 1;
}

/* กล่องข้อความ (Content Box) */
.popup-content {
    background: #161b22; /* สีพื้นหลังเข้ม */
    border: 1px solid #30363d;
    border-radius: 20px;
    padding: 30px;
    width: 90%;
    max-width: 380px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    
    /* อนิเมชั่นเด้งขยาย */
    transform: scale(0.8);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.status-popup.show .popup-content {
    transform: scale(1);
}

/* วงกลมไอคอน */
.popup-icon-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px auto;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ปรับขนาดไอคอน Feather */
.popup-icon-wrapper svg {
    width: 40px;
    height: 40px;
    stroke-width: 3;
}

/* ---------------- สีตามสถานะ ---------------- */

/* สำเร็จ (สีเขียว) */
.popup-content.success .popup-icon-wrapper {
    background: rgba(46, 160, 67, 0.15);
    color: #3fb950;
}
.popup-content.success .popup-close-btn {
    background: #238636;
}

/* ผิดพลาด (สีแดง) */
.popup-content.error .popup-icon-wrapper {
    background: rgba(248, 81, 73, 0.15);
    color: #f85149;
}
.popup-content.error .popup-close-btn {
    background: #da3633;
}

/* ---------------- ข้อความ ---------------- */
.popup-title {
    margin: 0 0 10px 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #f0f6fc;
}

.popup-message {
    margin: 0 0 25px 0;
    color: #8b949e;
    font-size: 1rem;
    line-height: 1.5;
}

/* ปุ่มปิด */
.popup-close-btn {
    color: white;
    border: none;
    padding: 12px 0;
    width: 100%;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: filter 0.2s;
}

.popup-close-btn:hover {
    filter: brightness(1.1);
}