/* ===============================
   MODAL OVERLAY
================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 33, 71, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* ===============================
   MODAL CONTAINER (80% WIDTH FIX)
================================ */
.modal-container {
    width: 80%;                /* 🔥 FIX HERE */
    max-width: 760px;
    height: 92vh;
    background: #ffffff;
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 60px rgba(0,0,0,0.35);
    overflow: hidden;
    position: relative;
}

/* ===============================
   HEADER
================================ */
.modal-header {
    background: linear-gradient(135deg, #002147, #003366);
    padding: 18px;
    text-align: center;
    color: #ffffff;
    flex-shrink: 0;
}

.modal-logo {
    width: 60px;
    margin-bottom: 6px;
}

.modal-title {
    color: #D4AF37;
    font-size: 20px;
    margin-bottom: 2px;
}

.modal-subtitle {
    font-size: 13px;
    opacity: 0.9;
}

/* ===============================
   BODY
================================ */
.modal-body {
    flex: 1;
    padding: 16px 18px;
    display: flex;
    overflow: hidden; /* ❌ no scroll on desktop */
}

/* ===============================
   FORM
================================ */
.contact-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

/* ===============================
   FORM SECTIONS
================================ */
.form-section {
    margin-bottom: 14px;
    flex-shrink: 0;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 12px;
}

/* ===============================
   INPUTS
================================ */
input,
textarea {
    width: 100%;
    padding: 10px;
    border-radius: 6px;
    border: 1.5px solid #dddddd;
    font-size: 13px;
    font-family: inherit;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: #D4AF37;
}

/* ===============================
   TEXTAREA
================================ */
textarea {
    resize: none;
    min-height: 70px;
}

/* ===============================
   CHAR COUNTER
================================ */
.char-count {
    font-size: 11px;
    text-align: right;
    margin-top: 4px;
    color: #27ae60;
}

/* ===============================
   ACTION BUTTONS – DESKTOP
================================ */
.form-actions {
    margin-top: auto;
    display: flex;
    gap: 12px;
    padding-top: 12px;
    background: #ffffff;
    flex-shrink: 0;
}

/* ===============================
   BUTTONS
================================ */
.btn-submit {
    flex: 2;
    background: linear-gradient(135deg, #D4AF37, #b8941f);
    border: none;
    color: #ffffff;
    padding: 12px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    position: relative;
}

.btn-reset {
    flex: 1;
    background: transparent;
    border: 1.5px solid #cccccc;
    border-radius: 6px;
    cursor: pointer;
}

/* ===============================
   LOADING SPINNER
================================ */
.loading-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.btn-submit.loading span {
    display: none;
}

.btn-submit.loading .loading-spinner {
    display: inline-block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===============================
   CLOSE BUTTON
================================ */
.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    color: #ffffff;
    border: none;
    cursor: pointer;
    font-size: 18px;
}

/* ===============================
   MOBILE RESPONSIVE
================================ */
@media (max-width: 768px) {

    .modal-overlay {
        align-items: flex-start;
        overflow-y: auto;
    }

    .modal-container {
        width: 100%;           /* 🔥 mobile full width */
        height: auto;
        min-height: 100vh;
        border-radius: 0;
    }

    .modal-body {
        overflow-y: auto;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .form-actions {
        position: sticky;
        bottom: 0;
        flex-direction: column;
        padding: 12px 0;
        box-shadow: 0 -6px 12px rgba(0,0,0,0.08);
        z-index: 5;
    }

    .btn-submit,
    .btn-reset {
        width: 100%;
    }
}
