/* 
 * สไตล์สำหรับโมดัลแจ้งเตือนแบบกำหนดเอง
 * สำหรับใช้งานใน BuddyMarket
 */

 :root {
    --primary-color: #3b82f6;
    --primary-light: #60a5fa;
    --primary-dark: #2563eb;
    --secondary-color: #4338ca;
    --secondary-light: #4f46e5;
}

/* โครงสร้างหลักของโมดัล */
.custom-alert-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.custom-alert-modal {
    background: #fff;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.custom-alert-content {
    width: 100%;
}

/* ส่วนหัวของโมดัล */
.custom-alert-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e9ecef;
}

.custom-alert-header h5 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
}

.btn-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    color: #6c757d;
    transition: color 0.2s;
}

.btn-close:hover {
    color: #343a40;
}

/* ส่วนเนื้อหาของโมดัล */
.custom-alert-body {
    padding: 20px;
    color: #444;
}

.custom-alert-body p {
    margin-bottom: 0.75rem;
}

.custom-alert-body p:last-child {
    margin-bottom: 0;
}

.modal-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.modal-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ส่วนท้ายของโมดัล */
.custom-alert-footer {
    padding: 15px 20px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* สไตล์ปุ่ม */
.custom-alert-footer .btn {
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 500;
}

.custom-alert-footer .btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transition: all 0.2s;
}

.custom-alert-footer .btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.custom-alert-footer .btn-secondary {
    background-color: #e9ecef;
    border-color: #dee2e6;
    color: #495057;
}

.custom-alert-footer .btn-secondary:hover {
    background-color: #dee2e6;
    border-color: #ced4da;
}

/* สไตล์สำหรับฟอร์มในโมดัล */
.custom-alert-body .input-group {
    margin-top: 10px;
}

.custom-alert-body .form-control {
    border-radius: 4px 0 0 4px;
    border: 1px solid #dee2e6;
    padding: 8px 12px;
}

.custom-alert-body .input-group .btn {
    border-radius: 0 4px 4px 0;
    padding: 8px 16px;
}

/* เอฟเฟกต์ body เมื่อโมดัลเปิดอยู่ */
body.modal-open {
    overflow: hidden;
}

/* การแสดงผลบนอุปกรณ์มือถือ */
@media (max-width: 576px) {
    .custom-alert-modal {
        width: 95%;
    }
    
    .custom-alert-header {
        padding: 12px 16px;
    }
    
    .custom-alert-body {
        padding: 16px;
    }
    
    .custom-alert-footer {
        padding: 12px 16px;
    }
}