/**
 * Charter quote form and homepage hero.
 *
 * Colours and fonts follow the theme (navy #19232d, gold #dcbb87, Playfair
 * Display headings, Lato body, 30px pill buttons like the header's Book Now)
 * but are restated here rather than read from the theme's classes, for the
 * same reason as hamad-aircraft.css.
 *
 * @package Hamad Aviation Core
 */

:root {
    --hamad-cq-navy: #19232d;
    --hamad-cq-navy-deep: #121a22;
    --hamad-cq-gold: #dcbb87;
    --hamad-cq-gold-dark: #c9a56d;
    --hamad-cq-box: rgba(255, 255, 255, 0.05);
    --hamad-cq-box-line: rgba(255, 255, 255, 0.12);
    --hamad-cq-muted: rgba(255, 255, 255, 0.6);
    --hamad-cq-invalid: #ff8a80;
}

/* ---------- hero ---------- */

.hamad-cq-hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: min(100vh, 940px);
    padding: 160px 16px 80px; /* clears the transparent navbar (110px) */
    color: #fff;
    background-color: var(--hamad-cq-navy);
    background-image:
        linear-gradient(180deg, rgba(14, 20, 27, 0.82) 0%, rgba(14, 20, 27, 0.4) 40%, rgba(14, 20, 27, 0.9) 100%),
        var(--hamad-cq-bg, none);
    background-size: cover;
    background-position: center;
    isolation: isolate;
}

.hamad-cq-hero__inner {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
}

.hamad-cq-hero__eyebrow {
    margin: 0 0 14px;
    color: var(--hamad-cq-gold);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    text-align: center;
}

.hamad-cq-hero__title {
    max-width: 820px;
    margin: 0 auto 16px;
    color: #fff;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(34px, 4.6vw, 60px);
    font-weight: 700;
    line-height: 1.12;
    text-align: center;
    text-wrap: balance;
}

.hamad-cq-hero__subtitle {
    max-width: 600px;
    margin: 0 auto 40px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
    line-height: 1.6;
    text-align: center;
    -webkit-hyphens: none;
    hyphens: none;
    text-wrap: balance;
}

.hamad-cq-hero__secondary {
    display: table;
    margin: 30px auto 0;
    padding-bottom: 2px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 15px;
    text-decoration: none;
    border-bottom: 1px solid rgba(220, 187, 135, 0.5);
    transition: color 0.2s, border-color 0.2s;
}

.hamad-cq-hero__secondary:hover,
.hamad-cq-hero__secondary:focus {
    color: var(--hamad-cq-gold);
    border-color: var(--hamad-cq-gold);
}

/* ---------- card ---------- */

.hamad-cq {
    position: relative;
    padding: 26px 28px 28px;
    color: #fff;
    font-family: Lato, 'Helvetica Neue', Arial, sans-serif;
    text-align: left;
    background: rgba(18, 26, 34, 0.93);
    border: 1px solid rgba(220, 187, 135, 0.22);
    border-radius: 18px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.4);
    /*
     * No backdrop-filter, transform or filter here: any of them makes the
     * card the containing block for position: fixed, and the contact popup
     * inside it would be pinned to the card instead of the window.
     */
}

.hamad-cq *,
.hamad-cq *::before,
.hamad-cq *::after {
    box-sizing: border-box;
}

.hamad-cq [hidden] {
    display: none !important;
}

.hamad-cq__trap {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ---------- head: trip switch + phone ---------- */

.hamad-cq__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
    margin-bottom: 20px;
}

.hamad-cq__switch {
    display: inline-flex;
    padding: 4px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--hamad-cq-box-line);
    border-radius: 30px;
}

.hamad-cq__switch-btn {
    padding: 9px 20px;
    color: rgba(255, 255, 255, 0.78);
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    background: transparent;
    border: 0;
    border-radius: 30px;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.hamad-cq__switch-btn:hover {
    color: #fff;
}

.hamad-cq__switch-btn.is-active {
    color: var(--hamad-cq-navy);
    background: var(--hamad-cq-gold);
}

/* ---------- legs ---------- */

.hamad-cq__leg + .hamad-cq__leg {
    margin-top: 14px;
}

.hamad-cq__leg-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    color: var(--hamad-cq-gold);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hamad-cq__remove {
    padding: 0;
    color: var(--hamad-cq-muted);
    font: inherit;
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
    background: none;
    border: 0;
    cursor: pointer;
}

.hamad-cq__remove:hover {
    color: #fff;
    text-decoration: underline;
}

.hamad-cq__leg-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 190px 150px;
    gap: 10px;
}

/* ---------- field boxes ---------- */

.hamad-cq__box {
    position: relative;
    min-width: 0;
    padding: 11px 16px 12px;
    background: var(--hamad-cq-box);
    border: 1px solid var(--hamad-cq-box-line);
    border-radius: 12px;
    transition: border-color 0.2s, background-color 0.2s;
}

.hamad-cq__box:focus-within {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--hamad-cq-gold);
}

.hamad-cq__box.is-invalid {
    border-color: var(--hamad-cq-invalid);
}

.hamad-cq__label {
    display: block;
    margin: 0 0 3px;
    color: var(--hamad-cq-muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1.3;
}

.hamad-cq .hamad-cq__input {
    display: block;
    width: 100%;
    height: auto;
    min-height: 0;
    margin: 0;
    padding: 2px 0;
    color: #fff;
    font: inherit;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    outline: none;
    color-scheme: dark;
    text-overflow: ellipsis;
    -webkit-appearance: none;
    appearance: none;
}

.hamad-cq .hamad-cq__input::placeholder {
    color: rgba(255, 255, 255, 0.42);
    font-weight: 400;
    opacity: 1;
}

.hamad-cq__sub {
    display: block;
    min-height: 17px;
    overflow: hidden;
    color: var(--hamad-cq-muted);
    font-size: 13px;
    line-height: 17px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* boxes in a row stretch to the tallest; content stays vertically centred */
.hamad-cq__box {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hamad-cq__sub:empty {
    display: none;
}

.hamad-cq select.hamad-cq__input {
    padding-right: 20px;
    cursor: pointer;
    background-image: linear-gradient(45deg, transparent 50%, var(--hamad-cq-gold) 50%),
        linear-gradient(135deg, var(--hamad-cq-gold) 50%, transparent 50%);
    background-position: calc(100% - 6px) 55%, 100% 55%;
    background-size: 6px 6px;
    background-repeat: no-repeat;
}

.hamad-cq select.hamad-cq__input option {
    color: var(--hamad-cq-navy);
    font-weight: 400;
    background: #fff;
}

.hamad-cq__leg.is-mirrored .hamad-cq__box--from,
.hamad-cq__leg.is-mirrored .hamad-cq__box--to {
    background: transparent;
    border-style: dashed;
}

.hamad-cq__leg.is-mirrored .hamad-cq__box--from .hamad-cq__input,
.hamad-cq__leg.is-mirrored .hamad-cq__box--to .hamad-cq__input {
    color: rgba(255, 255, 255, 0.7);
    cursor: default;
}

/* swap: a gold disc on the gap between From and To */
.hamad-cq__swap {
    position: absolute;
    top: 50%;
    left: -23px; /* 36px disc centred on the 10px gap */
    z-index: 2;
    width: 30px;
    height: 30px;
    margin-top: -18px;
    padding: 0;
    color: var(--hamad-cq-navy);
    font-size: 15px;
    line-height: 30px;
    text-align: center;
    background: var(--hamad-cq-gold);
    border: 3px solid var(--hamad-cq-navy-deep);
    border-radius: 50%;
    box-sizing: content-box !important;
    cursor: pointer;
    transition: transform 0.25s;
}

.hamad-cq__swap:hover {
    transform: rotate(180deg);
}

.hamad-cq__leg.is-mirrored .hamad-cq__swap {
    visibility: hidden;
}

.hamad-cq__box--to {
    padding-left: 24px;
}

.hamad-cq__add {
    margin-top: 12px;
    padding: 0;
    color: var(--hamad-cq-gold);
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    background: none;
    border: 0;
    cursor: pointer;
}

.hamad-cq__add:hover {
    text-decoration: underline;
}

/* ---------- foot: passengers, aircraft, CTA ---------- */

.hamad-cq__foot {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: stretch;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.hamad-cq__stepper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hamad-cq__stepper button {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    padding: 0;
    color: var(--hamad-cq-gold);
    font-size: 18px;
    line-height: 26px;
    background: transparent;
    border: 1px solid rgba(220, 187, 135, 0.6);
    border-radius: 50%;
    cursor: pointer;
}

.hamad-cq__stepper button:hover {
    color: var(--hamad-cq-navy);
    background: var(--hamad-cq-gold);
}

.hamad-cq .hamad-cq__stepper .hamad-cq__input {
    width: 34px;
    text-align: center;
    -moz-appearance: textfield;
}

.hamad-cq__stepper input::-webkit-outer-spin-button,
.hamad-cq__stepper input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.hamad-cq__cta,
.hamad-cq__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 54px;
    padding: 0 34px;
    color: var(--hamad-cq-navy);
    font: inherit;
    font-size: 16px;
    font-weight: 700;
    white-space: nowrap;
    background: var(--hamad-cq-gold);
    border: 0;
    border-radius: 30px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
}

/* same height and corners as the field boxes beside it */
.hamad-cq__cta {
    align-self: stretch;
    min-height: 70px;
    border-radius: 12px;
}

.hamad-cq__cta span {
    transition: transform 0.2s;
}

.hamad-cq__cta:hover,
.hamad-cq__cta:focus-visible,
.hamad-cq__submit:hover,
.hamad-cq__submit:focus-visible {
    background: var(--hamad-cq-gold-dark);
}

.hamad-cq__cta:hover span {
    transform: translateX(4px);
}

.hamad-cq__submit:disabled {
    opacity: 0.7;
    cursor: wait;
}

.hamad-cq__error {
    margin: 12px 0 0;
    color: var(--hamad-cq-invalid);
    font-size: 14px;
}

/* ---------- airport suggestions ---------- */

.hamad-cq__suggest {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 30;
    width: max(100%, 360px);
    max-height: 340px;
    margin: 0;
    padding: 6px 0;
    overflow-y: auto;
    list-style: none;
    color: var(--hamad-cq-navy);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.hamad-cq__suggest li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 9px 14px;
    cursor: pointer;
}

.hamad-cq__suggest li::before {
    display: none; /* theme bullets */
}

.hamad-cq__suggest li.is-active,
.hamad-cq__suggest li:hover {
    background: #f4efe6;
}

.hamad-cq__suggest-code {
    flex: 0 0 46px;
    color: var(--hamad-cq-gold-dark);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.hamad-cq__suggest strong {
    display: block;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
}

.hamad-cq__suggest small {
    display: block;
    color: #6b7280;
    font-size: 13px;
    line-height: 1.3;
}

.hamad-cq__suggest li.hamad-cq__suggest-empty {
    color: #6b7280;
    font-size: 14px;
    cursor: default;
}

.hamad-cq__suggest li.hamad-cq__suggest-empty:hover {
    background: none;
}

/* ---------- contact step ---------- */

html.hamad-cq-locked {
    overflow: hidden;
}

.hamad-cq__modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.hamad-cq__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 15, 20, 0.72);
    backdrop-filter: blur(3px);
}

.hamad-cq__dialog {
    position: relative;
    width: 100%;
    max-width: 640px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    padding: 40px;
    color: var(--hamad-cq-navy);
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
}

.hamad-cq__close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 34px;
    height: 34px;
    padding: 0;
    color: #6b7280;
    font-size: 28px;
    line-height: 32px;
    background: none;
    border: 0;
    cursor: pointer;
}

.hamad-cq__close:hover {
    color: var(--hamad-cq-navy);
}

.hamad-cq__dialog-title {
    margin: 0 0 18px;
    padding-right: 30px;
    color: var(--hamad-cq-navy);
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 28px;
    line-height: 1.25;
}

.hamad-cq__summary {
    margin: 0 0 24px;
    padding: 14px 18px;
    list-style: none;
    background: #f6f3ee;
    border-radius: 12px;
}

.hamad-cq__summary li {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2px 16px;
    margin: 0;
    padding: 4px 0;
    font-size: 15px;
}

.hamad-cq__summary li::before {
    display: none;
}

.hamad-cq__summary span {
    color: #4b5563;
}

.hamad-cq__summary .hamad-cq__summary-meta {
    margin-top: 4px;
    padding-top: 8px;
    color: #4b5563;
    border-top: 1px solid #e7e0d4;
}

.hamad-cq__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 18px;
}

.hamad-cq__field--wide {
    grid-column: 1 / -1;
}

.hamad-cq__field label {
    display: block;
    margin: 0 0 6px;
    color: var(--hamad-cq-navy);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.hamad-cq__field input,
.hamad-cq__field textarea {
    width: 100%;
    height: auto;
    margin: 0;
    padding: 11px 13px;
    color: var(--hamad-cq-navy);
    font: inherit;
    font-size: 15px;
    background: #fff;
    border: 1px solid #d4d4d4;
    border-radius: 10px;
    box-shadow: none;
    outline: none;
    transition: border-color 0.2s;
}

.hamad-cq__field textarea {
    resize: vertical;
}

.hamad-cq__field input:focus,
.hamad-cq__field textarea:focus {
    border-color: var(--hamad-cq-gold-dark);
}

.hamad-cq__field input.is-invalid {
    border-color: #c1272d;
}

.hamad-cq__dialog .hamad-cq__error {
    margin-top: 14px;
    color: #c1272d;
}

.hamad-cq__actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

.hamad-cq__back {
    min-height: 54px;
    padding: 0 26px;
    color: var(--hamad-cq-navy);
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    background: none;
    border: 1px solid #d4d4d4;
    border-radius: 30px;
    cursor: pointer;
}

.hamad-cq__back:hover {
    border-color: var(--hamad-cq-navy);
}

.hamad-cq__fineprint {
    margin: 18px 0 0;
    color: #6b7280;
    font-size: 13px;
}

.hamad-cq__fineprint a {
    color: inherit;
    text-decoration: underline;
}

.hamad-cq__done {
    padding: 10px 0;
    text-align: center;
}

.hamad-cq__done-icon {
    display: inline-block;
    width: 64px;
    height: 64px;
    margin-bottom: 18px;
    color: var(--hamad-cq-navy);
    font-size: 30px;
    line-height: 64px;
    background: var(--hamad-cq-gold);
    border-radius: 50%;
}

.hamad-cq__done .hamad-cq__dialog-title {
    padding: 0;
}

.hamad-cq__done p {
    margin: 0 0 26px;
    color: #4b5563;
    font-size: 16px;
    line-height: 1.6;
}

.hamad-cq__done a {
    color: var(--hamad-cq-navy);
    font-weight: 700;
}

/* ---------- quick-link rail ---------- */

.hamad-cq-rail {
    position: fixed;
    right: 20px;
    bottom: 84px; /* clears the theme's back-to-top button (30px + 40px) */
    z-index: 9990; /* under the quote modal */
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hamad-cq-rail__btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-sizing: border-box;
    flex-shrink: 0;
    width: 92px;
    height: 92px;
    padding: 0 10px;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1.25;
    text-align: center;
    text-transform: uppercase;
    text-decoration: none;
    background: rgba(18, 26, 34, 0.9);
    border: 1px solid var(--hamad-cq-gold);
    border-radius: 50%;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
    transition: background-color 0.2s, color 0.2s, transform 0.2s;
}

.hamad-cq-rail__btn svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: var(--hamad-cq-gold);
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: stroke 0.2s;
}

.hamad-cq-rail__btn:hover,
.hamad-cq-rail__btn:focus-visible {
    color: var(--hamad-cq-navy);
    background: var(--hamad-cq-gold);
    transform: translateY(-3px);
}

.hamad-cq-rail__btn:hover svg,
.hamad-cq-rail__btn:focus-visible svg {
    stroke: var(--hamad-cq-navy);
}

html.hamad-cq-locked .hamad-cq-rail {
    display: none;
}

/* ---------- responsive ---------- */

@media (max-width: 1099px) {
    .hamad-cq__leg-grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .hamad-cq__foot {
        grid-template-columns: 170px minmax(0, 1fr);
    }

    .hamad-cq__cta {
        grid-column: 1 / -1;
        width: 100%;
    }

    .hamad-cq-rail {
        right: 16px;
        bottom: 84px;
        gap: 10px;
    }

    .hamad-cq-rail__btn {
        width: 84px;
        height: 84px;
        font-size: 10px;
    }

    .hamad-cq-rail__btn svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 767px) {
    .hamad-cq-hero {
        min-height: 0;
        padding: 100px 16px 56px; /* clears the slimmer mobile navbar (~75px) */
    }

    .hamad-cq-hero__subtitle {
        margin-bottom: 28px;
        font-size: 16px;
    }

    .hamad-cq {
        padding: 18px 16px 20px;
        border-radius: 16px;
    }

    .hamad-cq__head {
        margin-bottom: 16px;
    }

    .hamad-cq__switch {
        display: flex;
        width: 100%;
    }

    .hamad-cq__switch-btn {
        flex: 1 1 0;
        padding: 9px 4px;
        font-size: 14px;
    }

    .hamad-cq__box--from,
    .hamad-cq__box--to {
        grid-column: 1 / -1;
    }

    /* stacked: the swap sits on the gap between From (above) and To */
    .hamad-cq__swap {
        top: -23px;
        left: 50%;
        margin-top: 0;
        transform: translateX(-50%) rotate(90deg);
    }

    .hamad-cq__swap:hover {
        transform: translateX(-50%) rotate(270deg);
    }

    .hamad-cq__box--to {
        padding-left: 16px;
    }

    .hamad-cq__foot {
        grid-template-columns: 1fr;
    }

    .hamad-cq-rail {
        right: 12px;
        bottom: 80px;
        gap: 8px;
    }

    .hamad-cq-rail__btn {
        gap: 3px;
        width: 70px;
        height: 70px;
        padding: 0 6px;
        font-size: 8.5px;
        letter-spacing: 0.04em;
    }

    .hamad-cq-rail__btn svg {
        width: 16px;
        height: 16px;
    }

    .hamad-cq__suggest {
        width: 100%;
    }

    .hamad-cq__dialog {
        padding: 28px 20px;
    }

    .hamad-cq__dialog-title {
        font-size: 23px;
    }

    .hamad-cq__grid {
        grid-template-columns: 1fr;
    }

    .hamad-cq__actions {
        flex-direction: column-reverse;
    }
}
