/* ===================================== */
/* Contact Us Modal - Common Component   */
/* Benevolve Design System               */
/* Primary: #004259 | Font: Archivo      */
/* ===================================== */

/* Overlay */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 42, 58, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 40px 16px;
    box-sizing: border-box;
}

/* Card */
.modal .modal-content {
    background-color: #ffffff;
    margin: auto;
    border-radius: 16px;
    width: 480px;
    max-width: 100%;
    box-shadow: 0 24px 80px rgba(0, 42, 58, 0.2), 0 2px 8px rgba(0, 0, 0, 0.06);
    animation: modalFadeIn 0.3s ease-out;
    overflow: hidden;
}

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

/* Header */
.modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 28px 28px 0;
    border: none;
}

.modal .modal-title {
    font-family: 'Archivo', sans-serif;
    color: #004259;
    font-size: 22px;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
    letter-spacing: -0.3px;
}

.modal .sub-title {
    font-family: 'Archivo', sans-serif;
    color: #6b8d9a;
    font-size: 13px;
    font-weight: 400;
    margin: 6px 0 0;
    padding: 0 28px;
    line-height: 1.5;
}

/* Close Button */
.modal .close {
    color: #8a9ba3;
    font-size: 22px;
    font-weight: 300;
    text-decoration: none;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.15s ease;
    line-height: 1;
    flex-shrink: 0;
    margin-top: -2px;
}

.modal .close:hover {
    background-color: #edf2f5;
    color: #004259;
}

/* Body */
.modal .modal-body {
    padding: 20px 28px 28px;
}

/* ---- Form Fields ---- */

.modal .form-group {
    margin-bottom: 18px;
}

.modal .form-group .field-label {
    font-family: 'Archivo', sans-serif;
    color: #1a3c4a;
    font-size: 13px;
    font-weight: 500;
    display: block;
    margin-bottom: 6px;
    letter-spacing: 0.01em;
}

.modal .form-group .field-label .required {
    color: #d94052;
    margin-left: 1px;
}

/* Text / Email / Number Inputs */
.modal input[type="text"],
.modal input[type="email"],
.modal input[type="number"] {
    font-family: 'Archivo', sans-serif;
    width: 100%;
    height: 44px;
    border: 1.5px solid #d4dee3;
    border-radius: 10px;
    padding: 0 14px;
    font-size: 14px;
    color: #1a3c4a;
    background-color: #f7f9fa;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
    box-sizing: border-box;
}

.modal input[type="text"]:focus,
.modal input[type="email"]:focus,
.modal input[type="number"]:focus {
    border-color: #004259;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(0, 66, 89, 0.1);
}

.modal input[type="text"]::placeholder,
.modal input[type="email"]::placeholder,
.modal input[type="number"]::placeholder {
    color: #a3b8c2;
    font-weight: 400;
}

/* Textarea */
.modal textarea {
    font-family: 'Archivo', sans-serif;
    width: 100%;
    border: 1.5px solid #d4dee3;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 14px;
    color: #1a3c4a;
    background-color: #f7f9fa;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
    resize: vertical;
    min-height: 80px;
    box-sizing: border-box;
}

.modal textarea:focus {
    border-color: #004259;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(0, 66, 89, 0.1);
}

.modal textarea::placeholder {
    color: #a3b8c2;
    font-weight: 400;
}

/* ---- Phone Number ---- */

.modal .phone-group {
    display: flex;
    gap: 8px;
}

.modal .country-codes-div {
    width: 88px;
    min-width: 88px;
    height: 44px;
    border: 1.5px solid #d4dee3;
    background-color: #f7f9fa;
    border-radius: 10px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.modal .country-codes-div:focus-within {
    border-color: #004259;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(0, 66, 89, 0.1);
}

.modal .fixed-prefix {
    color: #6b8d9a;
    font-family: 'Archivo', sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
}

.modal .country-codes {
    font-family: 'Archivo', sans-serif;
    color: #1a3c4a;
    font-size: 14px;
    font-weight: 400;
    border: none !important;
    background-color: transparent !important;
    outline: none !important;
    padding: 0 !important;
    height: auto !important;
    width: 100% !important;
    box-shadow: none !important;
}

.modal .mobile-number {
    flex: 1;
    height: 44px;
    border: 1.5px solid #d4dee3 !important;
    border-radius: 10px;
    padding: 0 14px;
    font-size: 14px;
    font-family: 'Archivo', sans-serif;
    color: #1a3c4a;
    background-color: #f7f9fa;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
    box-sizing: border-box;
}

.modal .mobile-number:focus {
    border-color: #004259 !important;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(0, 66, 89, 0.1);
}

.modal .mobile-number::placeholder {
    color: #a3b8c2;
    font-weight: 400;
}

/* ---- Validation ---- */

.modal .is-invalid,
.modal input.is-invalid,
.modal textarea.is-invalid {
    border-color: #d94052 !important;
    background-color: #fef8f8 !important;
}

.modal .is-invalid:focus,
.modal input.is-invalid:focus,
.modal textarea.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(217, 64, 82, 0.1) !important;
}

.modal .invalid-feedback {
    font-family: 'Archivo', sans-serif;
    color: #d94052;
    font-size: 12px;
    font-weight: 400;
    margin-top: 5px;
    display: block;
    line-height: 1.4;
}

.modal .invalid-feedback.hide {
    display: none;
}

/* ---- Consent Checkboxes ---- */

.modal .consent-group {
    margin-bottom: 14px;
}

.modal .consent-group:last-of-type {
    margin-bottom: 20px;
}

.modal .consent-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-family: 'Archivo', sans-serif;
    font-size: 11.5px;
    color: #5e7e8c;
    font-weight: 400;
    line-height: 1.65;
}

.modal .consent-label input[type="checkbox"] {
    width: auto !important;
    height: auto !important;
    min-width: 18px;
    min-height: 18px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: #004259;
    flex-shrink: 0;
    border-radius: 4px;
}

.modal .consent-link {
    color: #004259;
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 500;
    transition: color 0.15s ease;
}

.modal .consent-link:hover {
    color: #00627a;
}

/* ---- Submit Button ---- */

.modal .submitBtn {
    font-family: 'Archivo', sans-serif;
    width: 100%;
    height: 46px;
    background-color: #004259;
    border: none;
    border-radius: 10px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.01em;
}

.modal .submitBtn:hover:not(:disabled) {
    background-color: #005a75;
    box-shadow: 0 6px 20px rgba(0, 66, 89, 0.25);
}

.modal .submitBtn:active:not(:disabled) {
    background-color: #003a4d;
    box-shadow: 0 2px 8px rgba(0, 66, 89, 0.2);
    transform: translateY(0);
}

.modal .submitBtn:disabled {
    background-color: #c1d4db;
    color: #f0f5f7;
    cursor: not-allowed;
}

/* ---- Success / Error Messages ---- */

.modal .contact-submit-success-msg {
    font-family: 'Archivo', sans-serif;
    color: #1a8a4a;
    font-size: 13px;
    margin-top: 14px;
    font-weight: 500;
    text-align: center;
    line-height: 1.5;
    background-color: #edf8f1;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #c3e6d1;
}

.modal .contact-submit-error-msg {
    font-family: 'Archivo', sans-serif;
    color: #c0392b;
    font-size: 13px;
    margin-top: 14px;
    font-weight: 500;
    text-align: center;
    line-height: 1.5;
    background-color: #fdf0ef;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #f5d0cc;
}

.modal .msg-hide {
    display: none;
}

/* ===================================== */
/* Responsive                            */
/* ===================================== */

@media (max-width: 991px) {
    .modal .modal-content {
        width: 90%;
        max-width: 480px;
    }
}

@media (max-width: 767px) {
    .modal {
        padding: 24px 12px;
    }

    .modal .modal-content {
        width: 100%;
        max-width: none;
        border-radius: 14px;
    }

    .modal .modal-header {
        padding: 22px 22px 0;
    }

    .modal .sub-title {
        padding: 0 22px;
    }

    .modal .modal-body {
        padding: 18px 22px 24px;
    }

    .modal .modal-title {
        font-size: 20px;
    }

    .modal .sub-title {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .modal .phone-group {
        flex-direction: column;
        gap: 8px;
    }

    .modal .country-codes-div {
        width: 100%;
    }

    .modal .mobile-number {
        width: 100% !important;
    }

    .modal .modal-header {
        padding: 20px 18px 0;
    }

    .modal .sub-title {
        padding: 0 18px;
    }

    .modal .modal-body {
        padding: 16px 18px 22px;
    }
}
