.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 99999;
}

.modal-overlay.active {
    display: flex;
}

/* MODAL FIX */

.modal-overlay {
    z-index: 9999;
}

.modal-box {
    position: relative;
    z-index: 10000;
    overflow: visible;
}

/* PHONE INPUT FIX */

.iti {
    width: 100%;
    position: relative;
    z-index: 10001;
}

/* DROPDOWN FIX */

.iti__country-list {
    position: absolute !important;
    z-index: 10002 !important;
    max-height: 250px;
    overflow-y: auto;
    border-radius: 10px;
}

/* FLAG AREA */

.iti__flag-container {
    z-index: 10003;
}

/* ================= MODAL BOX ================= */

.modal-box {
    width: 100%;
    max-width: 420px;
    background: linear-gradient(180deg, rgb(8 120 63) 0%, #857d80e3 100%);
    border-radius: 24px;
    padding: 20px;
    transform: scale(0.9);
    opacity: 0;
    transition: 0.3s ease;
    position: relative;
    border: 1px solid linear-gradient(180deg, #887129 0%, #000000 100%);
    z-index: 100000;
    overflow: visible;
    /* IMPORTANT FIX */
}

.modal-overlay.active .modal-box {
    transform: scale(1);
    opacity: 1;
}

/* ================= HEADER ================= */

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    color: #ffffff;
    font-size: 22px;
    margin-left: 27px;
}

.close-btn {
    cursor: pointer;
    color: #ffffff;
    font-size: 32px;
    margin-top: -47px;
    transition: 0.3s;
}

.close-btn:hover {
    color: #0d0a05;
}

/* ================= FORM (scoped to .modal-box so these overrides only
   apply inside the enquiry modal and don't leak onto the hero / mid-page
   forms, which share the same .county88a-* classes from form.css) ================= */

.modal-box .county88a-contact-address {
    color: #ffffff;
    text-align: center;
    line-height: 1.5;
    margin-bottom: 10px !important;
}

.modal-box .county88a-input-group {
    position: relative;
    /* margin-bottom: 18px; */
}

/* ================= INPUT ================= */

.modal-box .county88a-input {
    width: 100%;
    height: 52px;
    border-radius: 12px;
    border: 1px solid #c0800a;
    background: #e0e5eb;
    padding: 14px 16px;
    font-size: 15px;
    color: #000;
    outline: none;
    transition: 0.3s;
}

.modal-box .county88a-input:focus {
    border-color: #f0b321;
    box-shadow: 0 0 0 3px rgba(252, 163, 17, 0.2);
}

/* ================= ICON ================= */

.modal-box .county88a-input-icon {
    position: absolute;
    left: 14px;
    top: 40%;
    transform: translateY(-50%);
    color: #327b55;
    font-size: 14px;
}

.modal-box .county88a-has-icon .county88a-input {
    padding-left: 45px;
    margin-bottom: 15px;
}

/* ================= PHONE INPUT ================= */

.modal-box .county88a-phone-group input {
    padding-left: 95px !important;
}

/* intl-tel-input FIX */

.iti {
    width: 100%;
    position: relative;
    z-index: 10000;
}

.iti__flag-container {
    z-index: 10001;
}

.iti__country-list {
    position: absolute !important;
    z-index: 100000 !important;
    max-height: 250px;
    overflow-y: auto;
    border-radius: 10px;
}

/* ================= BUTTON ================= */

.submit-btn {
    width: 100%;
    padding: 14px;
    background: #fff;
    border-radius: 50px;
    border: none;
    font-weight: 700;
    color: #000 !important;
    cursor: pointer;
    transition: 0.3s;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(201, 162, 39, 0.3);
}

.submit-btns {
    width: 100% !important;
    padding: 14px;
    background: #49e670;
    border-radius: 50px;
    border: none;
    font-weight: 700;
    margin-top: 10px;
    color: #000;
    cursor: pointer;
    transition: 0.3s;
}

.submit-btns a {
    text-decoration: none;
    color: #000;
}

.submit-btns i {
    margin-right: 6px;
    color: #333;
}

.submit-btns:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(201, 162, 39, 0.3);
}

/* ================= CONSENT ================= */

.consent {
    font-size: 13px;
    color: #ccc;
    margin: 10px 0 15px;
    line-height: 1.5;
}

.consent a {
    color: #43573a;
    text-decoration: none;
}

.consent a:hover {
    text-decoration: underline;
}

/* ================= GLOBAL FONT SCALING ================= */

/* DESKTOP (default stays same, slight refinement) */

.modal-box {
    font-size: 16px;
}

/* TABLET */

@media (max-width: 991px) {
    .modal-box {
        font-size: 15px;
    }
    .modal-header h2 {
        font-size: 20px;
    }
    .modal-box .county88a-contact-address {
        font-size: 14px;
    }
    .modal-box .county88a-input {
        height: 50px;
        font-size: 14px;
    }
    .submit-btn,
    .submit-btns {
        font-size: 15px;
        padding: 13px;
    }
    .consent {
        font-size: 12.5px;
    }
}

/* MOBILE */

@media (max-width: 767px) {
    .modal-box {
        font-size: 14px;
    }
    .modal-header h2 {
        font-size: 18px;
    }
    .modal-box .county88a-contact-address {
        font-size: 13px;
    }
    .modal-box .county88a-input {
        height: 48px;
        font-size: 13px;
        padding: 12px 14px;
    }
    .modal-box .county88a-input-icon {
        font-size: 12px;
    }
    .submit-btn,
    .submit-btns {
        font-size: 14px;
        padding: 12px;
    }
    .consent {
        font-size: 11.5px;
    }
}

/* SMALL MOBILE */

@media (max-width: 480px) {
    .modal-box {
        font-size: 13px;
    }
    .modal-header h2 {
        font-size: 16px;
    }
    .modal-box .county88a-contact-address {
        font-size: 12px;
    }
    .modal-box .county88a-input {
        height: 44px;
        font-size: 12px;
        padding: 10px 12px;
    }
    .submit-btn,
    .submit-btns {
        font-size: 13px;
        padding: 11px;
    }
    .consent {
        font-size: 11px;
        line-height: 1.4;
    }
}

/* ================= MOBILE ================= */

@media (max-width: 575px) {
    .modal-box {
        max-width: 95%;
        padding: 18px;
    }
    .modal-box .county88a-input {
        height: 48px;
        font-size: 14px;
    }
    .modal-box .county88a-has-icon .county88a-input {
        padding-left: 40px;
    }
    .modal-box .county88a-phone-group input {
        padding-left: 85px !important;
    }
}

.calls-btn {
    position: relative;
    bottom: 13px;
    right: 1px;
    background: linear-gradient(135deg, rgb(63 146 84), #49e670);
    padding: 15px;
    border-radius: 50%;
}

.calls-btn:hover {
    transform: scale(1.1);
    transition: 0.3s;
}

@media (max-width: 768px) {
    .calls-btn {
        position: relative;
        right: 1px;
    }
}