* {
    box-sizing: border-box;
}

:root {
    --dark: #071522;
    --dark-2: #0b2536;

    --white: #ffffff;
    --paper: #f4f6f7;

    --ink: #172833;
    --muted: #687984;

    --cyan: #36bad0;
    --blue: #197b9d;

    --line: #d6e0e4;

    --max: 1180px;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;

    margin: 0;

    color: var(--ink);

    background:
        linear-gradient(
            110deg,
            #f6f8f9 0%,
            #eef2f3 100%
        );

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Arial,
        sans-serif;

    -webkit-font-smoothing:
        antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}


/* header */

.form-header {
    height: 76px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding:
        0 max(28px, calc((100vw - var(--max)) / 2));

    color: white;

    background:
        var(--dark);

    border-bottom:
        1px solid rgba(255,255,255,.08);
}

.form-brand img {
    display: block;

    width: 185px;

    max-height: 62px;

    object-fit: contain;

    object-position:
        left center;
}

.back-link {
    color: #b8c8d1;

    font-size: 13px;
}

.back-link:hover {
    color: white;
}


/* page */

.form-page {
    width:
        min(var(--max), calc(100% - 48px));

    margin:
        0 auto;

    padding:
        80px 0 100px;

    display: grid;

    grid-template-columns:
        minmax(0,.8fr)
        minmax(500px,1.2fr);

    gap: 90px;

    align-items: start;
}


/* intro */

.form-intro {
    position: sticky;

    top: 50px;
}

.form-eyebrow {
    color: #1786a5;

    font-size: 10px;

    font-weight: 750;

    letter-spacing: .17em;
}

.form-intro h1 {
    max-width: 520px;

    margin:
        17px 0 23px;

    font-size:
        clamp(46px,5vw,68px);

    line-height: .98;

    font-weight: 670;

    letter-spacing:
        -.05em;
}

.form-intro p {
    max-width: 510px;

    margin: 0;

    color: var(--muted);

    font-size: 16px;

    line-height: 1.7;
}


/* card */

.form-card {
    padding: 39px;

    border:
        1px solid #d3dde2;

    border-radius: 13px;

    background: white;

    box-shadow:
        0 20px 65px
        rgba(24, 52, 67, .08);
}

.form-card form {
    display: block;
}


/* headings */

.form-section-title {
    margin:
        6px 0 22px;

    padding-bottom:
        13px;

    border-bottom:
        1px solid var(--line);

    color: #243945;

    font-size: 13px;

    font-weight: 700;
}

.form-section-title:not(:first-of-type) {
    margin-top: 38px;
}


/* grid */

.form-grid {
    display: grid;

    gap:
        19px 18px;
}

.form-grid.two {
    grid-template-columns:
        repeat(2, minmax(0,1fr));
}


/* fields */

label {
    display: block;
}

label > span {
    display: block;

    margin-bottom: 8px;

    color: #4d606c;

    font-size: 12px;

    font-weight: 560;
}

input,
select,
textarea {
    width: 100%;

    border:
        1px solid #cdd9df;

    border-radius: 7px;

    outline: none;

    color: #152832;

    background: #fbfcfc;

    font: inherit;

    transition:
        border-color .15s ease,
        box-shadow .15s ease,
        background .15s ease;
}

input,
select {
    min-height: 48px;

    padding:
        0 13px;
}

textarea {
    display: block;

    padding:
        12px 13px;

    resize: vertical;

    line-height: 1.55;
}

input::placeholder,
textarea::placeholder {
    color: #9baab2;
}

input:focus,
select:focus,
textarea:focus {
    border-color:
        #218bad;

    background: #fff;

    box-shadow:
        0 0 0 3px
        rgba(33,139,173,.10);
}

.full-field {
    margin-top: 19px;
}

.form-hint {
    margin-top: 10px;

    color: #81919b;

    font-size: 11px;
}


/* submit */

.submit-button {
    width: 100%;

    min-height: 52px;

    margin-top: 31px;

    padding:
        0 18px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    border:
        1px solid #4cb3ca;

    border-radius: 7px;

    color: white;

    background:
        #197e9f;

    font-size: 14px;

    font-weight: 650;

    cursor: pointer;

    transition:
        background .15s ease,
        transform .15s ease;
}

.submit-button:hover {
    background:
        #218cab;

    transform:
        translateY(-1px);
}


/* messages */

.error-box,
.success-box {
    padding: 20px;

    border-radius: 8px;
}

.error-box {
    margin-bottom: 28px;

    border:
        1px solid #e4b8b8;

    background:
        #fff7f7;

    color:
        #7f3030;
}

.error-box strong {
    display: block;

    margin-bottom: 9px;
}

.error-box ul {
    margin:
        0;

    padding-left:
        20px;

    font-size: 13px;

    line-height: 1.6;
}

.success-box {
    border:
        1px solid #abd5ca;

    background:
        #f4fbf8;
}

.success-box strong {
    display: block;

    color:
        #1d604f;

    font-size: 20px;
}

.success-box p {
    margin:
        10px 0 18px;

    color:
        #4f7067;

    line-height: 1.6;
}

.success-box a {
    color:
        #187c9c;

    font-size: 13px;

    font-weight: 650;
}


/* bot field */

.honeypot {
    position: absolute !important;

    width: 1px !important;
    height: 1px !important;

    overflow: hidden !important;

    clip:
        rect(0 0 0 0) !important;

    white-space:
        nowrap !important;
}


/* accessibility */

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline:
        3px solid #f2c94c;

    outline-offset:
        3px;
}


/* responsive */

@media (max-width: 900px) {

    .form-page {
        grid-template-columns:
            1fr;

        gap: 45px;

        padding-top: 55px;
    }

    .form-intro {
        position: static;
    }

    .form-intro h1 {
        max-width: 650px;
    }

}


@media (max-width: 600px) {

    .form-header {
        height: 68px;

        padding:
            0 17px;
    }

    .form-brand img {
        width: 150px;
    }

    .back-link {
        font-size: 11px;
    }

    .form-page {
        width:
            calc(100% - 28px);

        padding:
            40px 0 60px;
    }

    .form-intro h1 {
        font-size:
            45px;
    }

    .form-card {
        padding:
            25px 18px;
    }

    .form-grid.two {
        grid-template-columns:
            1fr;
    }

}

/* =========================================================
   ICEA TRIP FORM
   ========================================================= */

.trip-type-selector {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0,1fr));

    gap: 12px;

    margin-bottom: 20px;
}

.type-option {
    position: relative;

    min-height: 88px;

    display: flex;

    align-items: center;

    padding: 15px;

    border:
        1px solid #d0dce1;

    border-radius: 8px;

    background:
        #f9fbfb;

    cursor: pointer;

    transition:
        border-color .15s ease,
        background .15s ease,
        box-shadow .15s ease;
}

.type-option:hover {
    border-color:
        #9fc8d5;
}

.type-option input {
    width: 18px;
    height: 18px;

    min-height: 0;

    margin:
        0 12px 0 0;

    accent-color:
        #197e9f;
}

.type-option > span {
    margin: 0;
}

.type-option strong,
.type-option small {
    display: block;
}

.type-option strong {
    color:
        #243946;

    font-size:
        13px;
}

.type-option small {
    margin-top:
        5px;

    color:
        #71828c;

    font-size:
        10px;

    line-height:
        1.4;
}

.type-option:has(input:checked) {
    border-color:
        #278ba8;

    background:
        #f0f8fa;

    box-shadow:
        0 0 0 2px
        rgba(39,139,168,.08);
}

.company-field {
    display: none;

    margin-top:
        17px;
}

.company-field.is-visible {
    display: block;
}


@media (max-width: 600px) {

    .trip-type-selector {
        grid-template-columns:
            1fr;
    }

}

/* =========================================================
   Contact section polish
   ========================================================= */

.contact-name-field {
    grid-column: 1 / -1;
}

.contact-name-field input {
    width: 100%;
}

.contact-channel {
    margin-top: 18px;
}

.contact-hint {
    margin-top: 8px;
}


/* keep name full width on all sizes */
@media (max-width: 600px) {
    .contact-name-field {
        grid-column: auto;
    }
}

/* =========================================================
   Contact section polish
   ========================================================= */

.contact-name-field {
    grid-column: 1 / -1;
}

.contact-name-field input {
    width: 100%;
}

.contact-channel {
    margin-top: 18px;
}

.contact-hint {
    margin-top: 8px;
}


/* keep name full width on all sizes */
@media (max-width: 600px) {
    .contact-name-field {
        grid-column: auto;
    }
}

/* =========================================================
   Trip form V2
   ========================================================= */

.trip-kind-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0,1fr));

    gap: 11px;
}

.trip-kind-option {
    min-height: 78px;

    padding: 13px;

    display: flex;

    align-items: center;

    border:
        1px solid #d0dce1;

    border-radius: 8px;

    background:
        #fafcfc;

    cursor: pointer;

    transition:
        border-color .15s ease,
        background .15s ease,
        box-shadow .15s ease;
}

.trip-kind-option:last-child {
    grid-column:
        1 / -1;
}

.trip-kind-option:hover {
    border-color:
        #9fc9d5;
}

.trip-kind-option input {
    width: 17px;
    height: 17px;

    min-height: 0;

    margin:
        0 11px 0 0;

    accent-color:
        #197e9f;
}

.trip-kind-option > span {
    margin: 0;
}

.trip-kind-option strong,
.trip-kind-option small {
    display: block;
}

.trip-kind-option strong {
    color:
        #233944;

    font-size: 12px;
}

.trip-kind-option small {
    margin-top: 4px;

    color:
        #71828b;

    font-size: 9px;

    line-height: 1.4;
}

.trip-kind-option:has(input:checked) {
    border-color:
        #218aa7;

    background:
        #eef8fa;

    box-shadow:
        0 0 0 2px
        rgba(33,138,167,.08);
}


.conditional-field {
    display: none;

    margin-top: 17px;
}

.conditional-field.is-visible {
    display: block;
}


.checkbox-row {
    min-height: 48px;

    padding:
        0 13px;

    display: flex;

    align-items: center;

    gap: 10px;

    border:
        1px solid #d0dce1;

    border-radius: 7px;

    background:
        #fafcfc;

    cursor: pointer;
}

.checkbox-row input {
    width: 17px;
    height: 17px;

    min-height: 0;

    margin: 0;

    accent-color:
        #197e9f;
}

.checkbox-row > span {
    margin: 0;

    color:
        #334954;

    font-size: 12px;
}


@media (max-width: 600px) {

    .trip-kind-grid {
        grid-template-columns:
            1fr;
    }

    .trip-kind-option:last-child {
        grid-column: auto;
    }

}

/* =========================================================
   ICEA full trip intake
   ========================================================= */

.conditional-field {
    display: none;
    margin-top: 18px;
}

.conditional-field.is-visible {
    display: block;
}


.trip-kind-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 11px;
}

.trip-kind-option {
    min-height: 77px;

    padding: 13px;

    display: flex;
    align-items: center;

    border: 1px solid #d0dce1;
    border-radius: 8px;

    background: #fafcfc;

    cursor: pointer;
}

.trip-kind-option:last-child {
    grid-column: 1 / -1;
}

.trip-kind-option input {
    width: 17px;
    height: 17px;
    min-height: 0;

    margin: 0 11px 0 0;

    accent-color: #197e9f;
}

.trip-kind-option > span {
    margin: 0;
}

.trip-kind-option strong,
.trip-kind-option small {
    display: block;
}

.trip-kind-option strong {
    color: #253b47;
    font-size: 12px;
}

.trip-kind-option small {
    margin-top: 4px;

    color: #72838c;

    font-size: 9px;
    line-height: 1.4;
}

.trip-kind-option:has(input:checked) {
    border-color: #268ca8;
    background: #eef8fa;

    box-shadow:
        0 0 0 2px
        rgba(38,140,168,.08);
}


/* dynamic groups */

.dynamic-block {
    margin-top: 18px;

    padding: 18px;

    border: 1px solid #d7e1e5;
    border-radius: 9px;

    background: #f9fbfb;
}

.dynamic-head {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 20px;
}

.dynamic-head strong,
.dynamic-head small {
    display: block;
}

.dynamic-head strong {
    color: #314752;
    font-size: 12px;
}

.dynamic-head small {
    max-width: 470px;

    margin-top: 4px;

    color: #7c8c95;

    font-size: 10px;
    line-height: 1.45;
}

.mini-button {
    flex: 0 0 auto;

    min-height: 34px;

    padding: 0 12px;

    border: 1px solid #a9cdd8;
    border-radius: 6px;

    color: #166d88;
    background: #fff;

    font-size: 10px;
    font-weight: 650;

    cursor: pointer;
}

.mini-button:hover {
    background: #eff8fa;
}


.dynamic-row {
    position: relative;

    margin-top: 13px;
    padding: 14px;

    display: grid;

    gap: 12px;

    border: 1px solid #d9e3e7;
    border-radius: 7px;

    background: #fff;
}

.child-row {
    grid-template-columns: 90px 1fr 1fr;
    align-items: end;
}

.luggage-row {
    grid-template-columns:
        1.2fr 100px 1.5fr auto;

    align-items: end;
}

.pet-row {
    grid-template-columns:
        1fr 1fr 90px 1fr;

    align-items: end;
}

.simple-row {
    grid-template-columns: 1fr auto;
    align-items: end;
}

.dynamic-row-title {
    align-self: center;

    color: #1b7894;

    font-size: 10px;
    font-weight: 700;
}

.grow-field {
    min-width: 0;
}

.remove-row {
    min-height: 40px;

    align-self: end;

    padding: 0 10px;

    border: 0;

    color: #8b5b5b;
    background: transparent;

    font-size: 9px;

    cursor: pointer;
}

.remove-row:hover {
    color: #b04444;
}


/* switches */

.switch-row {
    min-height: 50px;

    margin-top: 18px;
    padding: 0 14px;

    display: flex;

    align-items: center;

    gap: 11px;

    border: 1px solid #d0dce1;
    border-radius: 7px;

    background: #fafcfc;

    cursor: pointer;
}

.switch-row input,
.inline-check input,
.requirement-option input {
    width: 17px;
    height: 17px;

    min-height: 0;

    margin: 0;

    accent-color: #197e9f;
}

.switch-row > span,
.inline-check > span {
    margin: 0;

    color: #354b56;

    font-size: 11px;
}


/* pet carrier */

.inline-check {
    min-height: 48px;

    display: flex;

    align-items: center;

    gap: 9px;

    padding-top: 19px;

    cursor: pointer;
}


/* requirements */

.requirements-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0,1fr));

    gap: 9px;
}

.requirement-option {
    min-height: 48px;

    padding: 0 13px;

    display: flex;

    align-items: center;

    gap: 10px;

    border: 1px solid #d4dfe3;
    border-radius: 7px;

    background: #fafcfc;

    cursor: pointer;
}

.requirement-option:has(input:checked) {
    border-color: #2790aa;
    background: #eef8fa;
}

.requirement-option > span {
    margin: 0;

    color: #3b505b;

    font-size: 10px;
}


/* hide children block until needed */

#children-section:not(.has-items) {
    display: none;
}


@media (max-width: 900px) {

    .luggage-row,
    .pet-row {
        grid-template-columns:
            repeat(2, minmax(0,1fr));
    }

    .grow-field {
        grid-column: 1 / -1;
    }

}


@media (max-width: 600px) {

    .trip-kind-grid,
    .requirements-grid {
        grid-template-columns: 1fr;
    }

    .trip-kind-option:last-child {
        grid-column: auto;
    }

    .dynamic-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .child-row,
    .luggage-row,
    .pet-row,
    .simple-row {
        grid-template-columns: 1fr;
    }

    .grow-field {
        grid-column: auto;
    }

    .inline-check {
        padding-top: 0;
    }

    .remove-row {
        justify-self: start;
    }

}

/* =========================================================
   ICEA trip UX V9
   ========================================================= */


/* ---------- universal field sizing ---------- */

.form-card *,
.form-card *::before,
.form-card *::after {
    box-sizing: border-box;
}

.form-card label,
.form-card input,
.form-card select,
.form-card textarea {
    min-width: 0;
}

.form-card input,
.form-card select,
.form-card textarea {
    max-width: 100%;
}

.form-card input,
.form-card select {
    text-overflow: ellipsis;
}

.is-hidden {
    display: none !important;
}


/* =========================================================
   ROUTE BUILDER
   A -> stops -> B
   ========================================================= */

.route-builder {
    position: relative;

    display: flex;
    flex-direction: column;

    gap: 0;

    margin-top: 4px;
}

.route-builder::before {
    content: "";

    position: absolute;

    left: 19px;
    top: 46px;
    bottom: 46px;

    width: 1px;

    background: #bdd2da;
}

.route-point,
.route-stop-row {
    position: relative;

    display: grid;

    grid-template-columns:
        40px minmax(0, 1fr) auto;

    gap: 12px;

    align-items: end;

    padding: 11px 0;

    z-index: 1;
}

.route-point {
    grid-template-columns:
        40px minmax(0, 1fr);
}

.route-marker,
.route-stop-marker {
    width: 40px;
    height: 40px;

    display: grid;
    place-items: center;

    align-self: end;

    border: 1px solid #9cc4d0;
    border-radius: 50%;

    color: #126f8b;

    background: #f4fbfc;

    font-size: 11px;
    font-weight: 750;
}

.route-point-b .route-marker {
    color: #fff;

    border-color: #197e9f;

    background: #197e9f;
}

.route-stop-marker {
    width: 30px;
    height: 30px;

    margin-left: 5px;

    align-self: center;

    color: #52717f;

    border-color: #c8d8de;

    background: #fff;

    font-size: 9px;
}

.route-field {
    width: 100%;
    min-width: 0;
}

.route-stops-block {
    position: relative;

    margin: 0;
}

.add-route-stop {
    min-height: 38px;

    margin:
        3px 0
        3px 52px;

    padding: 0 12px;

    display: inline-flex;

    align-items: center;

    gap: 7px;

    border:
        1px dashed #a5c8d3;

    border-radius: 6px;

    color: #196d86;

    background: #f8fbfc;

    font-size: 10px;
    font-weight: 620;

    cursor: pointer;
}

.add-route-stop:hover {
    background: #eef8fa;
}

.route-stop-row .remove-row {
    min-height: 40px;

    padding:
        0 7px;

    align-self: end;
}

.trip-datetime-grid {
    margin-top: 18px;
}


/* =========================================================
   DYNAMIC ROWS
   Stop trying to put everything on one line.
   ========================================================= */

.dynamic-row {
    overflow: hidden;
}


/* luggage:
   type + quantity
   details full width
   remove at bottom
*/

.luggage-row {
    grid-template-columns:
        minmax(0, 1fr)
        minmax(100px, 135px);

    gap:
        14px 12px;
}

.luggage-type-field {
    min-width: 0;
}

.luggage-quantity-field {
    min-width: 0;
}

.luggage-details-field {
    grid-column:
        1 / -1;

    min-width: 0;
}

.luggage-row .remove-row {
    grid-column:
        1 / -1;

    justify-self: end;

    min-height: 26px;

    padding: 0;
}


/* pets: also no cramped four-column layout */

.pet-row {
    grid-template-columns:
        repeat(2, minmax(0,1fr));

    gap:
        14px 12px;
}

.pet-row .grow-field {
    grid-column:
        1 / -1;
}

.pet-row .inline-check {
    min-height: 48px;

    padding-top: 19px;
}

.pet-row .remove-row {
    grid-column:
        1 / -1;

    justify-self: end;

    min-height: 26px;

    padding: 0;
}


/* children */

.child-row {
    grid-template-columns:
        92px
        minmax(0,1fr)
        minmax(0,1fr);

    gap: 12px;
}


/* generic */

.dynamic-row label > span {
    line-height: 1.35;

    overflow-wrap: anywhere;
}

.dynamic-row input,
.dynamic-row select {
    width: 100%;
}


/* =========================================================
   Better general form grid on narrower cards
   ========================================================= */

@media (max-width: 760px) {

    .form-grid.two {
        grid-template-columns:
            1fr;
    }

    .contact-channel {
        grid-template-columns:
            1fr;
    }

    .trip-type-selector,
    .trip-kind-grid,
    .requirements-grid {
        grid-template-columns:
            1fr;
    }

    .trip-kind-option:last-child {
        grid-column:
            auto;
    }

    .child-row {
        grid-template-columns:
            1fr 1fr;
    }

    .dynamic-row-title {
        grid-column:
            1 / -1;
    }

}


@media (max-width: 520px) {

    .luggage-row,
    .pet-row,
    .child-row {
        grid-template-columns:
            1fr;
    }

    .luggage-details-field,
    .pet-row .grow-field,
    .dynamic-row-title {
        grid-column:
            auto;
    }

    .pet-row .inline-check {
        padding-top: 0;
    }

    .route-point,
    .route-stop-row {
        grid-template-columns:
            34px minmax(0,1fr);
    }

    .route-marker {
        width: 34px;
        height: 34px;
    }

    .route-builder::before {
        left: 16px;
    }

    .route-stop-row .remove-row {
        grid-column:
            2;

        justify-self: start;
    }

    .add-route-stop {
        margin-left: 46px;
    }

}

/* =========================================================
   PET ROW V2
   ========================================================= */

.pet-row {
    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr)
        minmax(90px, 120px);

    gap:
        14px 12px;

    align-items:
        end;
}

.pet-type-field,
.pet-size-field,
.pet-quantity-field {
    min-width: 0;
}


.pet-carrier-field {
    grid-column:
        1 / -1;

    min-height:
        46px;

    padding:
        0 13px;

    display:
        flex;

    align-items:
        center;

    gap:
        10px;

    border:
        1px solid #d6e0e4;

    border-radius:
        7px;

    background:
        #fafcfc;

    cursor:
        pointer;
}

.pet-carrier-field:hover {
    border-color:
        #afcdd7;

    background:
        #f5fafb;
}

.pet-carrier-field input {
    width:
        17px;

    height:
        17px;

    min-height:
        0;

    margin:
        0;

    accent-color:
        #197e9f;
}

.pet-carrier-field span {
    margin:
        0;

    color:
        #344b56;

    font-size:
        11px;
}


.pet-details-field {
    grid-column:
        1 / -1;

    min-width:
        0;
}


.pet-row .remove-row {
    grid-column:
        1 / -1;

    justify-self:
        end;

    min-height:
        28px;

    padding:
        0 4px;

    color:
        #9b6767;

    font-size:
        9px;
}


@media (max-width: 760px) {

    .pet-row {
        grid-template-columns:
            repeat(2, minmax(0,1fr));
    }

    .pet-quantity-field {
        grid-column:
            1 / -1;
    }

    .pet-carrier-field,
    .pet-details-field {
        grid-column:
            1 / -1;
    }

}


@media (max-width: 520px) {

    .pet-row {
        grid-template-columns:
            1fr;
    }

    .pet-quantity-field,
    .pet-carrier-field,
    .pet-details-field {
        grid-column:
            auto;
    }

}


/* personal data consent */

.consent-field {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 8px 0 22px;
    font-size: 13px;
    line-height: 1.55;
}

.consent-field input[type="checkbox"] {
    width: 17px;
    height: 17px;
    min-width: 17px;
    margin: 2px 0 0;
}

.consent-field span {
    display: block;
}

.consent-field a {
    color: #187c9c;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.consent-field a:hover {
    text-decoration-thickness: 2px;
}

.legal-draft-notice {
    margin-bottom: 28px;
    padding: 18px 20px;
    border: 1px solid #e1c982;
    border-radius: 8px;
    background: #fffbea;
}

.legal-draft-notice strong {
    display: block;
    margin-bottom: 8px;
}

.legal-draft-notice p {
    margin: 0;
    line-height: 1.6;
}

.legal-text {
    line-height: 1.75;
}
