/*
 * ETG Tour Inquiry: shared look of the Stepper Ticket and Tailor-made Collage
 * templates (Classic does not load this file).
 *
 * Loaded after tour-inquiry.css, which still styles Tom Select, intl-tel-input,
 * the calendar and the contact card. Every rule here is scoped with two
 * classes (.etg-tif.etg-tif-tpl), so it outranks the matching `.etg-tif ...`
 * rule there without !important (except where that file uses !important on
 * Tom Select). Site colours only: buttons #ff8a3a / hover #f47c20, gold
 * #c2923a, brown #53270a. No fonts are loaded here: Montserrat / Open Sans are
 * used when the theme already provides them.
 */

.etg-tif.etg-tif-tpl {
    --etg-btn: #ff8a3a;
    --etg-btn-h: #f47c20;
    --etg-btn-d: #e5690f;
    --etg-o-text: #b84b0b;
    --etg-o-tint: #fff3e9;
    --etg-gold: #c2923a;
    --etg-gold-l: #e6c27f;
    --etg-brown: #53270a;
    --etg-ink: #1f1d1a;
    --etg-ink-2: #57534d;
    --etg-muted: #756d65;
    --etg-paper: #fffaf2;
    --etg-sand: #faf6ef;
    /* Colour behind the form (the page): the punched ticket notches use it. */
    --etg-page: #fff;
    --etg-line: #ece3d4;
    --etg-field: #e2d6c3;
    --etg-r: 4px;
    --etg-r-card: 14px;
    --etg-sh: 0 1px 3px rgba(83, 39, 10, 0.06), 0 14px 34px rgba(83, 39, 10, 0.1);
    --etg-display: Montserrat, "Open Sans", system-ui, sans-serif;
    --etg-body: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

    /*
     * The layout answers to the width of the column the shortcode sits in, not
     * to the screen: a 650px content column on a 1440px monitor must stack like
     * a tablet. The wrapper is the container (name etg-tif); rules inside
     * @container etg-tif style its descendants. A container cannot restyle
     * itself, so its own padding below stays on viewport media queries.
     */
    container-type: inline-size;
    container-name: etg-tif;

    box-sizing: border-box;
    width: 100%;
    padding: 16px 24px 56px;
    /* No own background: the form sits on the page's section. */
    background: transparent;
    color: var(--etg-ink);
    font: 16px/1.6 var(--etg-body);
    text-align: left;
}

.etg-tif.etg-tif-tpl h2,
.etg-tif.etg-tif-tpl h3,
.etg-tif.etg-tif-tpl h4,
.etg-tif.etg-tif-tpl p,
.etg-tif.etg-tif-tpl dl,
.etg-tif.etg-tif-tpl dd,
.etg-tif.etg-tif-tpl ol,
.etg-tif.etg-tif-tpl ul,
.etg-tif.etg-tif-tpl figure,
.etg-tif.etg-tif-tpl form {
    margin: 0;
    padding: 0;
}

.etg-tif.etg-tif-tpl h2,
.etg-tif.etg-tif-tpl h3,
.etg-tif.etg-tif-tpl h4 {
    font-family: var(--etg-display);
    line-height: 1.15;
    letter-spacing: normal;
    text-transform: none;
}

.etg-tif.etg-tif-tpl img {
    max-width: 100%;
    display: block;
}

/* ===== Section heading: ornament + gold title ===== */

.etg-tif.etg-tif-tpl .etg-tif-head {
    text-align: center;
    max-width: 780px;
    margin: 0 auto 34px;
}

.etg-tif.etg-tif-tpl .etg-tif-orn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    max-width: 520px;
    margin: 0 auto 18px;
    color: var(--etg-gold);
}

.etg-tif.etg-tif-tpl .etg-tif-orn::before,
.etg-tif.etg-tif-tpl .etg-tif-orn::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--etg-gold));
}

.etg-tif.etg-tif-tpl .etg-tif-orn::after {
    background: linear-gradient(90deg, var(--etg-gold), transparent);
}

.etg-tif.etg-tif-tpl .etg-tif-orn b {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 2px solid var(--etg-gold);
    display: grid;
    place-items: center;
    font: 800 13px/1 var(--etg-display);
    color: var(--etg-btn-d);
    background: #fff;
    box-shadow: 0 0 0 4px #fff, 0 0 0 5px var(--etg-gold-l);
}

.etg-tif.etg-tif-tpl .etg-tif-head h2 {
    font-size: clamp(28px, 3.4vw, 44px);
    /* The live theme sets h2 { font-weight: 500 !important } on phones. */
    font-weight: 700 !important;
    color: var(--etg-gold);
}

.etg-tif.etg-tif-tpl .etg-tif-head p {
    margin: 12px auto 0;
    max-width: 60ch;
    color: var(--etg-ink-2);
    font-size: 17px;
}

.etg-tif.etg-tif-tpl .form-notice {
    max-width: 1140px;
    margin: 0 auto 22px;
}

/* ===== Fields (same partials as Classic, restyled) ===== */

.etg-tif.etg-tif-tpl .form-group {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.etg-tif.etg-tif-tpl .form-group label {
    margin: 0;
    font: 700 14px/1.3 var(--etg-display);
    color: var(--etg-brown);
}

.etg-tif.etg-tif-tpl .form-group label span {
    color: var(--etg-btn-d);
}

.etg-tif.etg-tif-tpl .etg-tif-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

/* Two date fields side by side may shrink (min 0) but never overflow; a narrow form stacks them (see @container etg-form below). */
.etg-tif.etg-tif-tpl .date-range {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.etg-tif.etg-tif-tpl .date-wrapper,
.etg-tif.etg-tif-tpl .input-wrapper {
    min-width: 0;
}

/*
 * Inputs, selects (Tom Select), the phone field, the date fields and the
 * textarea are NOT restyled here: they use the Classic rules of
 * tour-inquiry.css as they are (grey fill, 2px border, 12px radius, emoji
 * icon at the left, orange focus ring). Only the things around them follow
 * the template.
 */
.etg-tif.etg-tif-tpl input.error {
    border-color: #c0392b;
}

.etg-tif.etg-tif-tpl .date-wrapper .error-msg,
.etg-tif.etg-tif-tpl .phone-error,
.etg-tif.etg-tif-tpl .etg-tif-field-error {
    display: block;
    margin-top: 6px;
    padding-left: 2px;
    color: #c0392b;
    font-size: 13px;
}

/* An empty message keeps no line (and no margin) under its field. */
.etg-tif.etg-tif-tpl .date-wrapper .error-msg:empty,
.etg-tif.etg-tif-tpl .phone-error:empty,
.etg-tif.etg-tif-tpl .etg-tif-field-error:empty {
    display: none;
    margin: 0;
}

.etg-tif.etg-tif-tpl .etg-tif-help {
    display: block;
    color: var(--etg-ink-2);
    font-size: 13px;
    line-height: 1.45;
}

/* Tom Select list: Classic shape, but the site's orange hover/active instead of Classic's cool tint. */
.etg-tif.etg-tif-tpl .ts-dropdown .option:hover {
    background: var(--etg-sand) !important;
}

.etg-tif.etg-tif-tpl .ts-dropdown .active {
    background: var(--etg-o-tint) !important;
    color: var(--etg-o-text) !important;
}

.etg-tif.etg-tif-tpl .ts-wrapper.etg-tif-invalid .ts-control {
    border-color: #c0392b !important;
}

/* Focused fields must not hide under the sticky step bar on phones. */
.etg-tif.etg-tif-tpl input,
.etg-tif.etg-tif-tpl textarea,
.etg-tif.etg-tif-tpl select,
.etg-tif.etg-tif-tpl .ts-wrapper,
.etg-tif.etg-tif-tpl .etg-tif-pane-h {
    scroll-margin-top: 96px;
}

/* ===== Subject suggestions ===== */

.etg-tif.etg-tif-tpl .etg-tif-sugg {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 2px;
}

.etg-tif.etg-tif-tpl .etg-tif-sugg span {
    align-self: center;
    margin-right: 2px;
    color: var(--etg-muted);
    font: 600 12.5px/1.3 var(--etg-body);
}

.etg-tif.etg-tif-tpl .etg-tif-sugg button {
    min-height: 44px;
    padding: 0 14px;
    border: 1.5px solid var(--etg-field);
    border-radius: 999px;
    background: #fff;
    color: var(--etg-brown);
    font: 700 13px/1 var(--etg-display);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.etg-tif.etg-tif-tpl .etg-tif-sugg button:hover {
    border-color: var(--etg-btn);
}

.etg-tif.etg-tif-tpl .etg-tif-sugg button[aria-pressed="true"] {
    background: var(--etg-o-tint);
    border-color: var(--etg-btn);
    color: var(--etg-o-text);
}

.etg-tif.etg-tif-tpl .etg-tif-sugg button::before {
    content: "+ ";
    color: var(--etg-btn-d);
}

.etg-tif.etg-tif-tpl .etg-tif-sugg button[aria-pressed="true"]::before {
    content: "\2713  ";
}

.etg-tif.etg-tif-tpl .etg-tif-sugg-list {
    display: contents;
}

.etg-tif.etg-tif-tpl .etg-tif-sugg button {
    flex: 0 0 auto;
    white-space: nowrap;
}

/* Narrow form (phone): label on its own line, the buttons in one swipeable row with a fade at the right edge. */
@container etg-form (max-width: 440px) {
    .etg-tif.etg-tif-tpl .etg-tif-sugg {
        display: block;
    }

    .etg-tif.etg-tif-tpl .etg-tif-sugg span {
        display: block;
        margin: 0 0 6px;
    }

    .etg-tif.etg-tif-tpl .etg-tif-sugg-list {
        display: flex;
        flex-wrap: nowrap;
        gap: 8px;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        padding: 3px 28px 3px 3px;
        margin: -3px;
        -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent);
        mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent);
    }

    .etg-tif.etg-tif-tpl .etg-tif-sugg-list::-webkit-scrollbar {
        display: none;
    }

    .etg-tif.etg-tif-tpl .etg-tif-sugg button {
        scroll-snap-align: start;
        min-height: 40px;
        padding: 0 12px;
    }
}

/* ===== Travel party: compact, one slim row per traveller type ===== */

/*
 * Wide form column: three equal slim columns in one line. Narrow column
 * (@container etg-form below): one joined box, three rows, thin dividers.
 * Radius and background of the inner items are set explicitly so the Classic
 * .counter-item card (grey fill, 2px border, 12px radius) never leaks in.
 */
.etg-tif.etg-tif-tpl .counter-group {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.etg-tif.etg-tif-tpl .counter-item {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    min-height: 44px;
    padding: 6px 6px 6px 10px;
    border: 1.5px solid var(--etg-field);
    border-radius: 8px;
    background: #fff;
}

.etg-tif.etg-tif-tpl .counter-label {
    min-width: 0;
    font: 700 14px/1.25 var(--etg-display);
    color: var(--etg-brown);
    text-align: left;
    white-space: nowrap;
}

.etg-tif.etg-tif-tpl .counter-label small {
    display: inline;
    margin: 0 0 0 3px;
    font: 400 12px/1.3 var(--etg-body);
    color: var(--etg-muted);
}

.etg-tif.etg-tif-tpl .counter-controls {
    gap: 2px;
    flex: 0 0 auto;
}

/* 32px visible square; the transparent ::before keeps a 44px hit area. */
.etg-tif.etg-tif-tpl .counter-btn {
    position: relative;
    width: 32px;
    height: 32px;
    border-radius: var(--etg-r);
    background: var(--etg-btn);
    color: #fff;
    font: 700 18px/1 var(--etg-display);
    transition: background 0.15s;
}

.etg-tif.etg-tif-tpl .counter-btn::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 44px;
    height: 44px;
    transform: translate(-50%, -50%);
}

.etg-tif.etg-tif-tpl .counter-btn:hover:not(:disabled) {
    background: var(--etg-btn-h);
    transform: none;
}

/* At the minimum / maximum: muted, like Classic. */
.etg-tif.etg-tif-tpl .counter-btn:disabled {
    background: #ddd;
    color: #fff;
    opacity: 0.5;
}

.etg-tif.etg-tif-tpl .counter-value {
    min-width: 22px;
    text-align: center;
    font: 700 16px/1 var(--etg-display);
    color: var(--etg-ink);
}

/* ===== Buttons: the live home buttons ===== */

.etg-tif.etg-tif-tpl .etg-tif-btn,
.etg-tif.etg-tif-tpl button[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    padding: 0 30px;
    border: 0;
    border-radius: var(--etg-r);
    background: var(--etg-btn);
    color: #fff;
    font: 700 16px/1 var(--etg-display);
    letter-spacing: 0.01em;
    text-decoration: none;
    box-shadow: none;
    cursor: pointer;
    transition: background 0.15s, transform 0.15s;
}

.etg-tif.etg-tif-tpl .etg-tif-btn:hover,
.etg-tif.etg-tif-tpl button[type="submit"]:hover {
    background: var(--etg-btn-h);
    box-shadow: none;
    transform: none;
}

.etg-tif.etg-tif-tpl .etg-tif-btn:active,
.etg-tif.etg-tif-tpl button[type="submit"]:active {
    transform: translateY(1px);
}

.etg-tif.etg-tif-tpl button[type="submit"]:disabled {
    cursor: progress;
    opacity: 0.85;
}

.etg-tif.etg-tif-tpl .etg-tif-btn svg {
    width: 18px;
    height: 18px;
    flex: none;
}

.etg-tif.etg-tif-tpl .etg-tif-btn-o {
    background: #fff;
    color: var(--etg-brown);
    border: 1.5px solid var(--etg-field);
}

.etg-tif.etg-tif-tpl .etg-tif-btn-o:hover {
    background: var(--etg-sand);
    border-color: var(--etg-gold);
}

.etg-tif.etg-tif-tpl .etg-tif-btn:focus-visible,
.etg-tif.etg-tif-tpl button[type="submit"]:focus-visible,
.etg-tif.etg-tif-tpl .counter-btn:focus-visible,
.etg-tif.etg-tif-tpl .etg-tif-sugg button:focus-visible,
.etg-tif.etg-tif-tpl .etg-ca .contact-item:focus-visible {
    outline: 3px solid var(--etg-brown);
    outline-offset: 2px;
}

.etg-tif.etg-tif-tpl .submit-wrapper {
    margin: 0;
}

.etg-tif.etg-tif-tpl .etg-tif-send {
    text-align: center;
}

/* ===== Panes, step bar, section labels, Back / Next ===== */

.etg-tif.etg-tif-tpl .etg-tif-pane {
    display: grid;
    gap: 20px;
    min-width: 0;
}

.etg-tif.etg-tif-tpl .etg-tif-pane[hidden] {
    display: none;
}

.etg-tif.etg-tif-tpl .etg-tif-pane + .etg-tif-pane {
    margin-top: 28px;
}

.etg-tif.etg-tif-tpl:is(.etg-tif-js, .etg-tif-js-pending).is-stepper .etg-tif-pane + .etg-tif-pane {
    margin-top: 0;
}

/*
 * Three-step style: templates.js hides panes 2-3 once it runs. A tiny inline
 * script printed right after the wrapper opens adds etg-tif-js-pending, so the
 * panes (and the step bar / Back-Next rows below) are already in their final
 * state at first paint and nothing jumps when the script loads. Without
 * JavaScript the class is never added and every pane shows.
 */
.etg-tif.etg-tif-tpl.etg-tif-js-pending.is-stepper .etg-tif-pane:not([data-step="1"]) {
    display: none;
}

.etg-tif.etg-tif-tpl .etg-tif-pane-h {
    font-size: 24px;
    font-weight: 800 !important;
    color: var(--etg-brown);
    outline: none;
}

.etg-tif.etg-tif-tpl .etg-tif-pane-h small {
    display: block;
    margin-top: 6px;
    font: 400 15px/1.5 var(--etg-body);
    color: var(--etg-ink-2);
}

.etg-tif.etg-tif-tpl .etg-tif-sec {
    display: flex;
    align-items: center;
    gap: 10px;
    font: 800 12px/1 var(--etg-display);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--etg-gold);
    outline: none;
}

.etg-tif.etg-tif-tpl .etg-tif-sec::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--etg-line);
}

.etg-tif.etg-tif-tpl .etg-tif-sec b {
    width: 24px;
    height: 24px;
    flex: none;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--etg-btn);
    color: #fff;
    letter-spacing: 0;
}

.etg-tif.etg-tif-tpl .etg-tif-steps {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.etg-tif.etg-tif-tpl .etg-tif-steps li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font: 700 14px/1.2 var(--etg-display);
    color: var(--etg-muted);
}

.etg-tif.etg-tif-tpl .etg-tif-steps li b {
    width: 34px;
    height: 34px;
    flex: none;
    display: grid;
    place-items: center;
    border: 2px solid var(--etg-line);
    border-radius: 50%;
    background: #fff;
    color: var(--etg-muted);
    font-size: 14px;
}

.etg-tif.etg-tif-tpl .etg-tif-steps li.on {
    color: var(--etg-brown);
}

.etg-tif.etg-tif-tpl .etg-tif-steps li.on b {
    border-color: var(--etg-btn);
    color: var(--etg-btn-d);
    box-shadow: 0 0 0 4px var(--etg-o-tint);
}

.etg-tif.etg-tif-tpl .etg-tif-steps li.done b {
    background: var(--etg-btn);
    border-color: var(--etg-btn);
    color: #fff;
    box-shadow: none;
}

.etg-tif.etg-tif-tpl .etg-tif-bar {
    height: 6px;
    margin: 18px 0 24px;
    border-radius: 99px;
    background: #f1ebe2;
    overflow: hidden;
}

.etg-tif.etg-tif-tpl .etg-tif-bar i {
    display: block;
    width: 33.34%;
    height: 100%;
    border-radius: 99px;
    background: var(--etg-btn);
    transition: width 0.35s;
}

.etg-tif.etg-tif-tpl .etg-tif-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding-top: 4px;
}

.etg-tif.etg-tif-tpl .etg-tif-nav > :only-child,
.etg-tif.etg-tif-tpl .etg-tif-nav .etg-tif-send {
    margin-left: auto;
}

/* Without JavaScript the three-step style is one plain form: no step bar, no Back / Next. */
.etg-tif.etg-tif-tpl:not(.etg-tif-js):not(.etg-tif-js-pending) .etg-tif-stk,
.etg-tif.etg-tif-tpl:not(.etg-tif-js):not(.etg-tif-js-pending) [data-go],
.etg-tif.etg-tif-tpl:not(.etg-tif-js):not(.etg-tif-js-pending) .etg-tif-nav:not(.etg-tif-nav--send) {
    display: none;
}

.etg-tif.etg-tif-tpl .etg-tif-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* ===== Contact card (.etg-ca markup of Classic, restyled) ===== */

.etg-tif.etg-tif-tpl .etg-ca {
    display: grid;
    gap: 12px;
    padding: 20px;
    background: #fff;
    border: 1px solid var(--etg-line);
    border-top: 3px solid var(--etg-btn);
    border-radius: var(--etg-r-card);
    box-shadow: none;
    font-family: var(--etg-body);
}

.etg-tif.etg-tif-tpl .etg-ca::before {
    display: none;
}

.etg-tif.etg-tif-tpl .etg-ca .header-section {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 0;
    padding: 0;
    border: 0;
    flex-wrap: nowrap;
}

.etg-tif.etg-tif-tpl .etg-ca .alert-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 10px;
    background: var(--etg-o-tint);
}

.etg-tif.etg-tif-tpl .etg-ca .alert-icon svg {
    width: 20px;
    height: 20px;
    fill: var(--etg-o-text);
}

.etg-tif.etg-tif-tpl .etg-ca .header-text {
    min-width: 0;
}

.etg-tif.etg-tif-tpl .etg-ca .header-text h2 {
    margin: 0;
    font: 700 16px/1.3 var(--etg-display);
    font-weight: 700 !important;
    color: var(--etg-ink);
}

.etg-tif.etg-tif-tpl .etg-ca .header-text p {
    margin: 2px 0 0;
    font-size: 14px;
    color: var(--etg-ink-2);
}

.etg-tif.etg-tif-tpl .etg-ca .contact-title {
    margin: 4px 0 0;
    font: 700 12px/1.3 var(--etg-display);
    font-weight: 700 !important;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--etg-ink);
}

.etg-tif.etg-tif-tpl .etg-ca .contact-methods {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
}

.etg-tif.etg-tif-tpl .etg-ca .contact-item {
    min-height: 58px;
    padding: 9px 12px;
    gap: 12px;
    border: 1px solid var(--etg-line);
    border-radius: 10px;
    color: var(--etg-ink);
    box-shadow: none;
    transition: border-color 0.15s;
}

.etg-tif.etg-tif-tpl .etg-ca .contact-item:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--etg-btn);
}

.etg-tif.etg-tif-tpl .etg-ca .contact-icon {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 8px;
    background: var(--etg-btn);
}

/* WhatsApp keeps its own brand green (owner, 14 Nov). */
.etg-tif.etg-tif-tpl .etg-ca a[href^="https://wa.me/"] .contact-icon {
    background: #25d366;
}

.etg-tif.etg-tif-tpl .etg-ca .contact-icon svg {
    width: 20px;
    height: 20px;
    fill: #fff;
}

.etg-tif.etg-tif-tpl .etg-ca .contact-label {
    font: 700 11px/1.3 var(--etg-display);
    letter-spacing: 0.06em;
    color: var(--etg-muted);
}

.etg-tif.etg-tif-tpl .etg-ca .contact-value {
    font: 700 14px/1.25 var(--etg-display);
    color: var(--etg-ink);
}

.etg-tif.etg-tif-tpl .etg-ca .contact-arrow {
    margin-left: auto;
    color: var(--etg-gold);
}

/* Contact card under the whole block: heading | the two methods, one row. */
.etg-tif.etg-tif-tpl.ca-below > .etg-ca {
    max-width: 1140px;
    margin: 26px auto 0;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 2.15fr);
    align-items: center;
}

.etg-tif.etg-tif-tpl.ca-below > .etg-ca .contact-title {
    display: none;
}

.etg-tif.etg-tif-tpl.ca-below > .etg-ca .contact-methods {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.25fr);
}

/* ===== Dropdowns sit above whatever follows them ===== */

.etg-tif.etg-tif-tpl .etg-tif-f {
    position: relative;
}

.etg-tif.etg-tif-tpl .etg-tif-f:focus-within {
    z-index: 30;
}

.etg-tif.etg-tif-tpl .ts-dropdown,
.etg-tif.etg-tif-tpl .iti__country-list {
    z-index: 60;
}

/* ===== Narrow columns: breakpoints are the width of the container, not of the screen ===== */

@container etg-tif (max-width: 1060px) {
    .etg-tif.etg-tif-tpl.ca-below > .etg-ca {
        grid-template-columns: minmax(0, 1fr);
    }
}

@container etg-tif (max-width: 768px) {
    .etg-tif.etg-tif-tpl button[type="submit"] {
        padding: 0 30px;
    }
}

@container etg-tif (max-width: 640px) {
    .etg-tif.etg-tif-tpl .etg-tif-head {
        margin-bottom: 22px;
    }

    .etg-tif.etg-tif-tpl .etg-tif-head p {
        font-size: 15.5px;
    }

    /* Step bar: full bleed across the form padding (sticky only on a phone, see the media query below). */
    .etg-tif.etg-tif-tpl .etg-tif-stk {
        margin: 0 -16px;
        padding: 14px 16px 2px;
        background: #fff;
    }

    .etg-tif.etg-tif-tpl .etg-tif-steps li {
        flex-direction: column;
        gap: 5px;
        text-align: center;
        font-size: 12px;
    }

    .etg-tif.etg-tif-tpl .etg-tif-steps li b {
        width: 30px;
        height: 30px;
        font-size: 13px;
    }

    .etg-tif.etg-tif-tpl .etg-tif-bar {
        margin: 12px 0 4px;
    }

    .etg-tif.etg-tif-tpl:is(.etg-tif-js, .etg-tif-js-pending).is-stepper .etg-tif-pane {
        padding-top: 16px;
    }

    .etg-tif.etg-tif-tpl .etg-tif-pane-h {
        font-size: 21px;
    }

    .etg-tif.etg-tif-tpl:is(.etg-tif-js, .etg-tif-js-pending) .etg-tif-nav {
        margin: 4px -16px 0;
        padding: 12px 16px;
        background: #fff;
        border-top: 1px solid var(--etg-line);
        box-shadow: 0 -8px 18px rgba(83, 39, 10, 0.06);
    }

    .etg-tif.etg-tif-tpl .etg-tif-nav .etg-tif-btn,
    .etg-tif.etg-tif-tpl .etg-tif-nav .etg-tif-send {
        flex: 1;
        padding: 0 16px;
    }

    .etg-tif.etg-tif-tpl .etg-tif-nav .etg-tif-btn-o {
        flex: 0 0 auto;
    }

    .etg-tif.etg-tif-tpl .etg-tif-nav .etg-tif-send button[type="submit"],
    .etg-tif.etg-tif-tpl .etg-tif-send button[type="submit"] {
        width: 100%;
    }

    .etg-tif.etg-tif-tpl .etg-tif-lgx {
        display: none;
    }

    .etg-tif.etg-tif-tpl.ca-below > .etg-ca .contact-methods {
        grid-template-columns: minmax(0, 1fr);
    }
}

/*
 * The form column has its own container (etg-form: .etg-tif-fm in Stepper
 * Ticket, .etg-tif-card-body in Tailor-made Collage), because the room the
 * fields get depends on the layout around them (ticket column, card padding),
 * not only on the page width. Three slim counters need about 690px side by
 * side; two date fields need about 440px.
 */
@container etg-form (max-width: 690px) {
    /* Counters: one joined box, one slim row each, thin dividers. */
    .etg-tif.etg-tif-tpl .counter-group {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
        border: 1.5px solid var(--etg-field);
        border-radius: 8px;
        background: #fff;
    }

    .etg-tif.etg-tif-tpl .counter-item {
        border: 0;
        border-radius: 0;
        background: transparent;
        padding: 6px 8px 6px 14px;
    }

    .etg-tif.etg-tif-tpl .counter-item + .counter-item {
        border-top: 1px solid var(--etg-line);
    }
}

@container etg-form (max-width: 440px) {
    .etg-tif.etg-tif-tpl .etg-tif-row,
    .etg-tif.etg-tif-tpl .date-range {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Genuinely about the phone screen: the step bar and Back / Next stay in view while the form scrolls. */
@media (max-width: 640px) {
    .etg-tif.etg-tif-tpl {
        padding: 28px 12px 40px;
    }

    .etg-tif.etg-tif-tpl .etg-tif-stk {
        position: sticky;
        top: 0;
        z-index: 5;
        background: #fff;
        box-shadow: 0 6px 12px -8px rgba(83, 39, 10, 0.28);
    }

    .etg-tif.etg-tif-tpl:is(.etg-tif-js, .etg-tif-js-pending) .etg-tif-nav {
        position: sticky;
        bottom: 0;
        z-index: 5;
    }
}

@media (prefers-reduced-motion: reduce) {
    .etg-tif.etg-tif-tpl *,
    .etg-tif.etg-tif-tpl *::before,
    .etg-tif.etg-tif-tpl *::after {
        transition: none !important;
        animation: none !important;
    }
}

/* Live theme gives text inputs margin-bottom:20px; inside the templates the
   field gap already comes from the column gap, so reset it (Classic untouched). */
.etg-tif.etg-tif-tpl .input-wrapper > input,
.etg-tif.etg-tif-tpl .input-wrapper > textarea,
.etg-tif.etg-tif-tpl .iti input {
    margin-bottom: 0;
}
