/* ========================= */
/*    PDPA Notification      */
/* ========================= */

#consentModal .modal-dialog {
    max-width: 40%;  /* ขยายขนาด modal สำหรับแท็บเล็ต */
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

#consentModal .modal-content {
    padding: 20px;
    border-radius: 15px;
    text-align: left;
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* ปรับขนาด modal สำหรับ iPad และแท็บเล็ต */
@media (max-width: 1024px) {
    #consentModal .modal-dialog {
        max-width: 60%; /* ปรับให้กว้างขึ้นสำหรับ iPad */
    }

    #consentModal .modal-body p {
        font-size: 1.1rem;  /* ปรับขนาดตัวอักษรให้เล็กลงเล็กน้อย */
        line-height: 1.5;
    }
}

/* Responsive design for smaller screens (Mobile Phones) */
@media (max-width: 768px) {
    #consentModal .modal-dialog {
        max-width: 90%;
        width: 100%;
        height: 100%;
        margin: 0;
    }

    #consentModal .modal-content {
        width: 100%;
        height: 100%;
        border-radius: 0;
        padding: 15px;
    }

    #consentModal .modal-body p {
        font-size: 1rem;
        text-align: left; 
        overflow-y: auto; /* ให้สามารถเลื่อนดูข้อความได้ */
        max-height: 70vh;
    }
}

/* Modal Footer adjustments */
#consentModal .modal-footer {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

#consentModal .btn-primary {
    background-color: #1e466b;
    border-color: #1e466b;
    padding: 10px 20px;
    font-size: 1rem;
}

#consentModal .btn-secondary {
    background-color: #ccc;
    border-color: #ccc;
    padding: 10px 20px;
    font-size: 1rem;
}

#declineConsent {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
    color: #fff !important;
    padding: 10px 20px;
    font-size: 1rem;
}

#declineConsent:hover {
    background-color: #c82333 !important;
    border-color: #bd2130 !important;
}
/* ขยายตัวหนังสือบนหน้าจอขนาดใหญ่ขึ้น */
@media (min-width: 1024px) {
    #consentModal .modal-header {
        font-size: 1.2rem; /* ปรับขนาดหัวข้อใหญ่ขึ้น */
    }

    #consentModal .modal-body p {
        font-size: 1.1rem; /* ปรับขนาดข้อความภายในใหญ่ขึ้น */
    }

    #consentModal .btn-primary, 
    #consentModal .btn-secondary {
        font-size: 1.0rem; /* ปรับขนาดปุ่มใหญ่ขึ้น */
    }
}