/* Booking / tour request pop-up (frontend/booking_form.php) — used on the cart and tour pages.
   Site theme: navy #0B132B, gold #FFCA5C (buttons) / #FFDB86 (headings), Playfair Display headings. Everything is scoped to #ContactForm. */

#ContactForm {
    --bf-gold: #FFCA5C;
    --bf-gold-light: #FFDB86;
    --bf-text: #FFFFFF;
    --bf-muted: rgba(255, 255, 255, 0.72);
    --bf-card: #0B132B;
    --bf-field: rgba(255, 255, 255, 0.06);
    --bf-line: rgba(255, 255, 255, 0.16);

    display: none;
    position: fixed;
    inset: 0;
    z-index: 2147483646; /* above the mobile menu button (layout/menu.php uses 2147483601) */
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 40px 16px;
    overflow-y: auto;
    background: rgba(8, 6, 18, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-sizing: border-box;
}

#ContactForm *, #ContactForm *::before, #ContactForm *::after { box-sizing: border-box; }

#ContactForm .BookingCard {
    position: relative;
    max-width: 720px;
    margin: 0 auto;
    padding: 34px 36px 30px;
    border: 1px solid rgba(255, 202, 92, 0.35);
    border-radius: 18px;
    background: var(--bf-card);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
    color: var(--bf-text);
    color-scheme: dark; /* light calendar / number icons on the dark fields */
    animation: bf-in 0.25s ease-out;
}

@keyframes bf-in {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: none; }
}

/* ---------- header ---------- */
#ContactForm .BookingHead { margin: 0 40px 24px 0; }

#ContactForm .BookingHead h2 {
    margin: 0 0 6px;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.9rem;
    font-weight: 600;
    line-height: 1.2;
    color: var(--bf-gold-light);
}

#ContactForm .BookingHead p { margin: 0; color: var(--bf-muted); font-size: 0.98rem; }

#ContactForm #Close {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--bf-line);
    border-radius: 50%;
    background: transparent;
    color: var(--bf-text);
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

#ContactForm #Close:hover { background: var(--bf-gold); border-color: var(--bf-gold); color: #0B132B; }

/* ---------- fields ---------- */
#ContactForm .BookingGrid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 18px;
}

#ContactForm .BookingField { display: flex; flex-direction: column; gap: 7px; min-width: 0; margin: 0; padding: 0; border: 0; }
#ContactForm .BookingWide { grid-column: 1 / -1; }

#ContactForm .BookingField > label,
#ContactForm .BookingField > legend {
    padding: 0;
    color: var(--bf-text);
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

#ContactForm .BookingField > legend { margin-bottom: 7px; }
#ContactForm label span, #ContactForm legend span { color: var(--bf-gold); }

#ContactForm input:not([type=hidden]),
#ContactForm select {
    display: block !important;
    width: 100%;
    height: 48px;
    margin: 0;
    padding: 0 14px;
    border: 1px solid var(--bf-line);
    border-radius: 10px;
    outline: none;
    background: var(--bf-field);
    color: var(--bf-text);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 400;
    box-shadow: none;
    transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}

#ContactForm input::placeholder { color: rgba(255, 255, 255, 0.4); }

#ContactForm input:focus,
#ContactForm select:focus {
    border-color: var(--bf-gold);
    background: rgba(255, 255, 255, 0.09);
    box-shadow: 0 0 0 3px rgba(255, 202, 92, 0.25);
}

#ContactForm select option { background: var(--bf-card); color: var(--bf-text); }

/* spam trap field: never visible to people */
#ContactForm .BookingTrap { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* budget + currency side by side */
#ContactForm #BudgetFlexInp { display: flex; gap: 10px; }
#ContactForm #BudgetFlexInp #BudgetCurrency { width: 130px; flex-shrink: 0; }

/* adults / kids / infants */
#ContactForm #FlexPersonInp { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
#ContactForm .BookingMini { display: flex; flex-direction: column; gap: 5px; margin: 0; }
#ContactForm .BookingMini small { color: var(--bf-muted); font-size: 0.82rem; }

/* phone field with the country flag picker */
#ContactForm #PhoneFlexInp, #ContactForm .iti { width: 100%; margin: 0; }
#ContactForm .iti input[type=tel] { padding-left: 52px; }
#ContactForm .iti__selected-flag { border-radius: 10px 0 0 10px; }
#ContactForm .iti__country-list { color: #0B132B; background: #fff; }

/* On phones the phone-code library opens the country list as a full-screen pop-up at the end of the page
   (.iti--container, z-index 1060 by default). Put it above this pop-up form and the mobile menu button. */
.iti--container { z-index: 2147483647 !important; }
.iti-mobile .iti--container .iti__country-list { color: #0B132B; background: #fff; border-radius: 12px; }
#ContactForm .iti__country-list .iti__dial-code { color: #6b6b7b; }

/* ---------- send button ---------- */
#ContactForm #SubmitButton {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin: 28px 0 0;
    padding: 15px 24px;
    border: 0;
    border-radius: 999px;
    background: var(--bf-gold);
    color: #0B132B;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
    transition: background-color 0.2s, transform 0.2s;
}

#ContactForm #SubmitButton:hover { background: var(--bf-gold-light); transform: translateY(-2px); }
#ContactForm #SubmitButton:active { transform: none; }

/* ---------- "request sent" message (cart and tour pages) ---------- */
.mysti-booking-notice {
    position: fixed;
    top: 24px;
    left: 50%;
    z-index: 2147483640;
    display: flex;
    align-items: center;
    gap: 14px;
    width: max-content;
    max-width: calc(100% - 32px);
    padding: 16px 22px;
    border: 1px solid rgba(255, 202, 92, 0.45);
    border-radius: 14px;
    background: #0B132B;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
    color: #FFFFFF;
    cursor: pointer;
    transform: translateX(-50%);
}

.mysti-booking-notice .fa { font-size: 30px; }
.mysti-booking-notice.is-ok .fa { color: #6fcf8b; }
.mysti-booking-notice.is-error .fa { color: #e06c6c; }
.mysti-booking-notice b { display: block; font-size: 1.05rem; }
.mysti-booking-notice span { color: rgba(255, 255, 255, 0.72); font-size: 0.92rem; }

/* ---------- phones ---------- */
@media screen and (max-width: 640px) {
    #ContactForm { padding: 16px 10px; }
    #ContactForm .BookingCard { padding: 26px 18px 22px; border-radius: 14px; }
    #ContactForm .BookingHead h2 { font-size: 1.55rem; }
    #ContactForm .BookingGrid { grid-template-columns: 1fr; gap: 16px; }
    #ContactForm #FlexPersonInp { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
    #ContactForm #BudgetFlexInp #BudgetCurrency { width: 110px; }
}
