/* ============================================================
   FORM REDESIGN — reference (Mayura) style, in the red theme
   Clean outlined fields + pill submit button, applied to all
   landing-page forms: .up-form, #contact-form, and modal popups
   (.modal-body form). Loaded after style.css so these rules win.
   NOTE: the phone input's LEFT padding is intentionally left to
   intl-tel-input (set inline) so the dial code never overlaps the
   number — see fix_iti_padding() in index.php.
   ============================================================ */

:root {
    --frm-primary: #dc1c35;
    --frm-primary-d: #a81225;
    --frm-surface: #ffffff;
    --frm-border: #dc1c35;
    --frm-text: #1f2733;
    --frm-muted: #9aa3b2;
}

/* ---------- form container cards ---------- */
.up-form {
    background: var(--frm-surface) !important;
    border-radius: 14px !important;
    box-shadow: 0 16px 44px rgba(17, 24, 39, 0.12) !important;
    overflow: hidden;
    padding: 0 0 24px !important;
}

.reg-title {
    background: var(--frm-primary) !important;
    color: #fff !important;
    font-size: 17px !important;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 15px 12px !important;
    margin: 0 0 22px !important;
    text-transform: uppercase;
    text-align: center;
}

/* ---------- input-group → clean block layout, drop the old icons ---------- */
.up-form .input-group,
#contact-form .input-group,
.modal-body form .input-group {
    display: block !important;
    width: 100% !important;
}

.up-form .input-group-addon,
#contact-form .input-group-addon,
.modal-body form .input-group-addon {
    display: none !important;
}

.up-form .form-group,
#contact-form .form-group,
.modal-body form .form-group {
    height: auto !important;
    margin-bottom: 18px !important;
    padding-left: 10px;
    padding-right: 10px;
}

/* ---------- fields: outlined, square-ish, dark text (reference look) ---------- */
.up-form .form-control,
#contact-form .form-control,
.modal-body form .form-control,
.up-form input,
.up-form select {
    height: 50px !important;
    background: #fff !important;
    border: 1px solid var(--frm-border) !important;
    border-radius: 4px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    padding-right: 14px !important;
    color: var(--frm-text) !important;
    font-size: 15px !important;
    box-shadow: none !important;
    /* Bootstrap 3 floats .input-group .form-control left; that float collapses
       the intl-tel-input .iti wrapper to 0 height and hides the flag/dial code.
       Clear it so every field is a normal full-width block. */
    float: none !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* left padding only for non-phone fields — the phone input's left padding is
   set dynamically by intl-tel-input so we must NOT override it here */
.up-form .form-control:not(.intl-mobile),
#contact-form .form-control:not(.intl-mobile),
.modal-body form .form-control:not(.intl-mobile),
.up-form input:not(.intl-mobile),
.up-form select {
    padding-left: 14px !important;
}

.up-form textarea,
#contact-form textarea,
.modal-body form textarea {
    height: auto !important;
    min-height: 92px !important;
    padding: 12px 14px !important;
    background: #fff !important;
    border: 1px solid var(--frm-border) !important;
    border-radius: 4px !important;
    color: var(--frm-text) !important;
}

.up-form .form-control::placeholder,
#contact-form .form-control::placeholder,
.modal-body form .form-control::placeholder,
.up-form input::placeholder,
.modal-body form textarea::placeholder {
    color: var(--frm-muted) !important;
    opacity: 1;
}

.up-form .form-control:focus,
#contact-form .form-control:focus,
.modal-body form .form-control:focus,
.up-form input:focus,
.up-form textarea:focus,
.modal-body form textarea:focus {
    border-color: var(--frm-primary) !important;
    box-shadow: 0 0 0 3px rgba(220, 28, 53, 0.14) !important;
    outline: none !important;
}

/* ---------- phone widget (intl-tel-input) ----------
   We give the number input a FIXED left padding wide enough to clear the
   flag + dial-code segment. Relying on intl-tel-input's own measured padding
   was unreliable: it is computed with the fallback font (before Montserrat
   loads), so once the web font swapped in the dial code grew and overlapped
   the number; it was also ~0 for fields hidden inside closed modals. A fixed
   value decouples us from font timing and visibility, so the dial code can
   never overlap regardless of when/where the field is shown. */
.iti {
    width: 100% !important;
    display: block !important;
}

.iti .form-control.intl-mobile,
input.intl-mobile {
    height: 50px !important;
    background: #fff !important;
    border: 1px solid var(--frm-border) !important;
    border-radius: 4px !important;
    /* room for flag + up-to-4-digit dial code (e.g. +971) + dropdown arrow */
    padding-left: 92px !important;
}

/* keep the country/flag button vertically centred and clear of the border */
.iti__selected-country {
    padding-left: 10px !important;
}

.iti__selected-country {
    background: transparent !important;
}

.iti__selected-country:hover,
.iti__selected-country-primary:hover {
    background: rgba(0, 0, 0, 0.03) !important;
}

.iti__selected-dial-code {
    color: var(--frm-text) !important;
}

.iti__arrow {
    border-top-color: var(--frm-muted) !important;
}

/* ---------- pill submit button ---------- */
.up-form button[type="submit"],
.up-form .signin,
.up-form .popup-btn,
#contact-form button[type="submit"],
#contact-form .popup-btn,
#contact-form .signin,
.modal-body form .popup-btn,
.modal-body form .signin,
.modal-body form button[type="submit"] {
    display: block !important;
    width: auto !important;
    min-width: 190px;
    margin: 14px auto 0 !important;
    height: 50px !important;
    padding: 0 38px !important;
    border: none !important;
    border-radius: 100px !important;
    background: var(--frm-primary) !important;
    color: #fff !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    letter-spacing: 0.8px !important;
    text-transform: uppercase;
    box-shadow: 0 10px 24px rgba(220, 28, 53, 0.30) !important;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease !important;
}

.up-form button[type="submit"]:hover,
.up-form .signin:hover,
.up-form .popup-btn:hover,
#contact-form button[type="submit"]:hover,
#contact-form .popup-btn:hover,
#contact-form .signin:hover,
.modal-body form .popup-btn:hover,
.modal-body form .signin:hover,
.modal-body form button[type="submit"]:hover,
.up-form .popup-btn:focus,
.modal-body form .popup-btn:focus {
    background: var(--frm-primary-d) !important;
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(220, 28, 53, 0.40) !important;
    color: #fff !important;
    letter-spacing: 0.8px !important;
}

/* ---------- validation messages ---------- */
.up-form .error,
#contact-form .error,
.modal-body form .error {
    color: var(--frm-primary) !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    margin: 5px 0 0 10px !important;
    display: block;
}

/* ---------- consent text ---------- */
.up-form .check-txt,
#contact-form .check-txt,
.modal-body form .check-txt {
    font-size: 12.5px !important;
    line-height: 1.5 !important;
    color: #6b7280 !important;
}

.up-form .checkbox-wrap .input-group,
#contact-form .checkbox-wrap .input-group,
.modal-body form .checkbox-wrap .input-group {
    display: flex !important;
    align-items: flex-start;
    gap: 8px;
}

/* ---------- modern modal card ---------- */
.modal-content {
    border: none !important;
    border-radius: 16px !important;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35) !important;
    overflow: hidden;
}

.modal-body {
    padding: 30px 24px 32px !important;
}

.modal-body h3 {
    font-size: 21px !important;
    font-weight: 800 !important;
    color: var(--frm-text) !important;
    letter-spacing: 0.3px;
}

.modal-body p {
    color: var(--frm-muted) !important;
    font-size: 14px !important;
}

.modal-body .close {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #f1f3f6 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    right: 14px !important;
    top: 14px !important;
}

.modal-body .close span {
    height: auto !important;
    width: auto !important;
    line-height: 1 !important;
    color: var(--frm-text) !important;
}

/* ---------- dropdown panel + search ---------- */
.iti__dropdown-content {
    background: #ffffff !important;
    color: var(--frm-text) !important;
    border: 1px solid #e3e7ee !important;
    border-radius: 10px !important;
    box-shadow: 0 18px 44px rgba(17, 24, 39, 0.2) !important;
    overflow: hidden;
    z-index: 2000 !important;
}

.iti__search-input {
    width: 100% !important;
    padding: 12px 14px !important;
    border: 0 !important;
    border-bottom: 1px solid #e3e7ee !important;
    color: var(--frm-text) !important;
    font-size: 14px !important;
    outline: none !important;
}

.iti__search-input::placeholder {
    color: var(--frm-muted) !important;
}

.iti__country-list {
    text-align: left;
    max-height: 230px;
    overflow-y: auto;
}

.iti__country {
    padding: 10px 14px !important;
    color: var(--frm-text) !important;
}

.iti__dial-code {
    color: var(--frm-muted) !important;
}

.iti__country.iti__highlight,
.iti__country:hover {
    background: #fdeced !important;
}

/* ---------- mobile: force each field full-width with a clear gap ----------
   The popup forms lay fields out as col-md-6 with no col-xs fallback, so on
   small screens they had no guaranteed gutter and ended up touching. Stack
   every field, full width, with breathing room above/below. */
@media (max-width: 767px) {

    .up-form .form-group,
    #contact-form .form-group,
    .modal-body form .form-group {
        width: 100% !important;
        float: none !important;
        margin-bottom: 16px !important;
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    .modal-body {
        padding: 26px 18px 28px !important;
    }

    /* a touch less side padding so the number has room next to the dial code */
    .iti .form-control.intl-mobile,
    input.intl-mobile {
        padding-left: 88px !important;
        padding-right: 12px !important;
    }
}
