.tq-first-order,
.tq-first-surface {
    --tq-first-ink: #20343f;
    --tq-first-muted: #456069;
    --tq-first-accent: #12616a;
    --tq-first-deep: #0e4d55;
    --tq-first-wash: #eaf6f3;
    --tq-first-line: #bcdad6;
    --tq-first-paper: #fff;
    color: var(--tq-first-ink);
    font-family: inherit;
}

#tq-first-offer {
    position: fixed;
    inset: 0;
    box-sizing: border-box;
    width: min(700px, calc(100% - 48px));
    max-width: none;
    height: max-content;
    max-height: calc(100vh - 48px);
    max-height: calc(100dvh - 48px);
    margin: auto;
    padding: 0;
    overflow: auto;
    overscroll-behavior: contain;
    border: 2px solid #b3ece7;
    border-radius: 26px;
    background: var(--tq-first-paper);
    box-shadow: 0 22px 72px rgba(18, 54, 58, .24);
    font-size: 15px;
    line-height: 1.45;
    text-align: start;
}

#tq-first-offer:not([open]),
.tq-first-surface[hidden],
.tq-first-surface [hidden],
.tq-first-error[hidden] {
    display: none !important;
}

#tq-first-offer::backdrop {
    background: rgba(14, 36, 41, .45);
    backdrop-filter: blur(5px);
}

.tq-first-hero {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: minmax(0, 1.46fr) minmax(166px, 1fr);
    align-items: center;
    gap: 14px;
    padding: 30px 31px 32px;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 89% 18%, #098481 0%, transparent 60%),
        linear-gradient(150deg, #006a6c 0%, #004b51 64%, #007d76 100%);
}

.tq-first-hero::after {
    content: "";
    position: absolute;
    z-index: -1;
    inset: auto -9% -33px;
    height: 57px;
    border-radius: 50% 50% 0 0;
    background: var(--tq-first-paper);
    transform: rotate(-2deg);
}

.tq-first-label {
    display: inline-block;
    margin: 0 0 10px;
    padding: 6px 15px;
    border-radius: 999px;
    background: linear-gradient(174deg, #ffe776, #ffce3b);
    color: #093d41;
    font-size: clamp(13px, 1.9vw, 23px);
    font-weight: 800;
    font-style: italic;
    box-shadow: 0 2px 0 #edaa1c, 0 6px 16px #002e3645;
    transform: rotate(-2deg);
}

#tq-first-offer .tq-first-title {
    margin: 0 0 11px;
    padding: 0;
    border: 0;
    background: none;
    color: #fff;
    font-size: clamp(31px, 4.45vw, 53px);
    line-height: 1;
    font-weight: 850;
    font-style: italic;
    letter-spacing: -.038em;
    text-transform: none;
    text-align: start;
}

.tq-first-headline {
    display: block;
    margin: 0 0 8px;
    text-shadow: 0 3px 9px #00343c9e;
}

.tq-first-rate {
    display: inline-flex;
    align-items: center;
    gap: .16em;
    padding: .15em .48em;
    border-radius: 999px;
    background: linear-gradient(175deg, #da4230, #bd3221);
    box-shadow: 0 4px 0 #94301f, 0 7px 17px #002f3599;
    text-shadow: 0 2px 3px #75220e91;
    transform: rotate(-3deg);
    white-space: nowrap;
}

.tq-first-rate-number {
    color: #ffeb6b;
    font-size: 1.3em;
    font-weight: 900;
}

#tq-first-offer .tq-first-limit {
    display: inline-block;
    margin: 6px 0 0;
    padding: 7px 13px;
    border-radius: 9px;
    background: linear-gradient(176deg, #ffe574, #ffce3a);
    color: #123e43;
    font-size: clamp(14px, 2.05vw, 23px);
    font-weight: 800;
    font-style: italic;
    line-height: 1.24;
    box-shadow: 0 5px 13px #002e363d;
}

.tq-first-art {
    position: relative;
    margin: 10px 0 -10px;
    pointer-events: none;
}

.tq-first-art-image {
    display: block;
    width: 100%;
    height: auto;
}

.tq-first-art--custom .tq-first-art-image {
    aspect-ratio: 4 / 3;
    object-fit: contain;
    border-radius: 12px;
    background: #ffffff1a;
}

.tq-first-reference {
    display: none;
    position: relative;
    aspect-ratio: 1251 / 947;
    overflow: hidden;
}

.tq-first-reference-image {
    position: absolute;
    inset: -7.39% auto auto -7.83%;
    display: block;
    width: 115.75%;
    max-width: none;
    height: auto;
}

.tq-first-art-rate {
    position: absolute;
    inset: 68% auto auto 23%;
    color: white;
    font-size: clamp(13px, 2.1vw, 26px);
    line-height: 1.02;
    font-weight: 900;
    letter-spacing: -.03em;
    text-shadow: 0 2px 3px #88321c;
    transform: rotate(-6deg);
    white-space: nowrap;
}

.tq-first-panel-body {
    padding: 10px 31px 17px;
}

#tq-first-offer .tq-first-terms {
    margin: 0 0 14px;
    color: #163e47;
    text-align: center;
    font-size: clamp(15px, 2.45vw, 23px);
    font-weight: 750;
    line-height: 1.4;
}

.tq-first-terms strong {
    padding: 2px 5px;
    border-radius: 6px;
    background: #ffeda7;
    white-space: nowrap;
}

.tq-first-rules {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(7px, 1.5vw, 14px);
    margin: 0 0 16px;
    padding: 0;
    list-style: none;
}

.tq-first-rule {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 999px;
    background: #e1f5f3;
    color: #0c4b51;
    font-size: clamp(12px, 1.65vw, 18px);
    font-weight: 800;
    line-height: 1.16;
}

.tq-first-rule-icon {
    position: relative;
    flex: none;
    display: grid;
    place-items: center;
    width: 27px;
    height: 27px;
    border: 2px solid currentColor;
    font-size: 13px;
}

.tq-first-rule-icon--ticket { border-radius: 5px; height: 22px; }
.tq-first-rule-icon--ticket::after { content: "%"; }
.tq-first-rule-icon--time { border-radius: 50%; color: #b63424; }
.tq-first-rule-icon--time::before { content: ""; width: 2px; height: 8px; background: currentColor; transform: translateY(-3px); }
.tq-first-rule-icon--time::after { content: ""; position: absolute; top: -5px; width: 8px; height: 2px; background: currentColor; }
.tq-first-rule-icon--cart { border-radius: 2px 3px 6px 7px; height: 16px; transform: translateY(-2px) skew(-10deg); }
.tq-first-rule-icon--cart::after { content: ""; position: absolute; bottom: -7px; left: 5px; width: 4px; height: 4px; border-radius: 50%; background: currentColor; box-shadow: 13px 0 currentColor; }

.tq-first-note {
    margin: 9px 0 0;
    color: #456069;
    text-align: center;
    font-size: clamp(12px, 1.48vw, 17px);
}

#tq-first-offer button,
.tq-first-surface button {
    box-sizing: border-box;
    font: inherit;
    line-height: 1.3;
    cursor: pointer;
}

#tq-first-offer button:focus-visible,
.tq-first-surface :focus-visible {
    outline: 3px solid var(--tq-first-accent);
    outline-offset: 2px;
}

#tq-first-offer .tq-first-close {
    position: absolute;
    inset: 10px 10px auto auto;
    z-index: 2;
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 2px solid #4ac7be;
    border-radius: 10px;
    background: var(--tq-first-paper);
    color: var(--tq-first-deep);
    font-size: 25px;
}

#tq-first-offer .tq-first-close:focus-visible {
    outline-color: #ffdf5d;
}

#tq-first-offer .tq-first-activate {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: .55em;
    width: 100%;
    min-height: 50px;
    padding: 10px 15px;
    border: 1px solid #b53120;
    border-radius: 14px;
    background: linear-gradient(174deg, #c63c2d, #bd3021);
    color: #fff;
    font-size: clamp(18px, 3.15vw, 34px);
    font-weight: 850;
    font-style: italic;
    box-shadow: inset 0 -3px 0 #9c271a, 0 7px 17px #9b321a2e;
}

.tq-first-activate-arrow { line-height: 1; font-style: normal; }

#tq-first-offer .tq-first-activate:hover { background: #a92a1e; }
#tq-first-offer .tq-first-activate:disabled { opacity: .7; cursor: wait; }

#tq-first-offer .tq-first-error {
    margin: 10px 0 0;
    color: #992827;
    font-size: 14px;
}

.tq-first-surface {
    box-sizing: border-box;
    clear: both;
    margin: 0 0 12px;
    font-size: 14px;
    line-height: 1.45;
}

.tq-first-clock {
    padding: 10px 12px;
    border: 1px solid var(--tq-first-line);
    border-radius: 9px;
    background: var(--tq-first-wash);
    color: var(--tq-first-deep);
}

.tq-first-surface > :not([hidden]) + :not([hidden]) { margin-top: 6px; }
.tq-first-clock-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 14px; }
.tq-first-count { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.tq-first-clock p { margin: 4px 0 0; color: var(--tq-first-muted); font-size: 13px; }
.tq-first-clock p:empty { display: none; }
.tq-first-clock .tq-first-reminder { color: var(--tq-first-deep); font-weight: 600; }

.tq-first-surface .tq-first-launcher {
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid var(--tq-first-line);
    border-radius: 8px;
    background: var(--tq-first-paper);
    color: var(--tq-first-deep);
    font-weight: 650;
}

.tq-first-launcher:hover,
#tq-first-offer .tq-first-close:hover {
    background: var(--tq-first-wash);
}

@media (max-width: 670px) {
    #tq-first-offer {
        inset: auto 0 0;
        width: min(420px, calc(100% - 24px));
        margin: 0 auto max(12px, env(safe-area-inset-bottom));
        border-radius: 16px;
        max-height: calc(100vh - 24px);
        max-height: calc(100dvh - max(24px, env(safe-area-inset-bottom) + 12px));
    }
    .tq-first-hero {
        grid-template-columns: minmax(0, 1.35fr) minmax(78px, .82fr);
        gap: 5px;
        padding: 16px 12px 21px;
    }
    .tq-first-hero::after { bottom: -42px; }
    .tq-first-label { padding: 5px 8px; margin-bottom: 8px; font-size: 12px; }
    #tq-first-offer .tq-first-title { font-size: clamp(19px, 5.7vw, 27px); line-height: 1.08; margin-bottom: 8px; }
    #tq-first-offer .tq-first-limit { font-size: 12px; padding: 6px 7px; }
    .tq-first-art { margin-top: 25px; }
    .tq-first-art-rate { font-size: clamp(7px, 2vw, 12px); }
    #tq-first-offer .tq-first-close { inset: 7px 7px auto auto; }
    .tq-first-panel-body { padding: 6px 11px 13px; }
    #tq-first-offer .tq-first-terms { font-size: 14px; margin-bottom: 10px; }
    .tq-first-rule { border-radius: 10px; padding: 7px 5px; text-align: center; }
    .tq-first-rule-icon { display: none; }
    .tq-first-rules { margin-bottom: 10px; }
    #tq-first-offer .tq-first-activate {
        border-radius: 11px;
    }
}

/* The original art has a blurred margin outside the panel. Crop that margin
   and keep the real controls over the corresponding areas of the image. */
@media (forced-colors: none) {
    #tq-first-offer.tq-first-order--reference .tq-first-reference {
        display: block;
    }

    #tq-first-offer.tq-first-order--reference .tq-first-hero {
        position: absolute;
        width: 1px;
        height: 1px;
        margin: -1px;
        padding: 0;
        overflow: hidden;
        clip-path: inset(50%);
    }
}

@media (min-width: 671px) and (forced-colors: none) {
    #tq-first-offer.tq-first-order--reference {
        width: min(700px, calc(100% - 48px), calc((100vh - 48px) * 1.32));
        width: min(700px, calc(100% - 48px), calc((100dvh - 48px) * 1.32));
        border: 0;
    }

    #tq-first-offer.tq-first-order--reference .tq-first-panel-body {
        display: contents;
    }

    #tq-first-offer.tq-first-order--reference :is(.tq-first-terms, .tq-first-rules, .tq-first-note) {
        position: absolute;
        width: 1px;
        height: 1px;
        margin: -1px;
        padding: 0;
        overflow: hidden;
        clip-path: inset(50%);
    }

    #tq-first-offer.tq-first-order--reference .tq-first-close {
        inset: 2.74% 2.47% auto auto;
        width: 6.87%;
        height: 8.87%;
        min-width: 44px;
        min-height: 44px;
        border: 0;
        background: transparent;
        color: transparent;
    }

    #tq-first-offer.tq-first-order--reference .tq-first-activate {
        position: absolute;
        inset: 77.61% auto auto 5.04%;
        width: 90%;
        height: 12.67%;
        min-height: 44px;
    }

    #tq-first-offer.tq-first-order--reference .tq-first-activate:not(:disabled) {
        border: 0;
        background: transparent;
        color: transparent;
        box-shadow: none;
    }

    #tq-first-offer.tq-first-order--reference button:focus-visible {
        outline-color: #ffe776;
        outline-offset: -4px;
    }

    #tq-first-offer.tq-first-order--reference .tq-first-error:not([hidden]) {
        position: absolute;
        inset: auto 5% 2%;
        margin: 0;
        padding: 6px 10px;
        border: 1px solid #e9ac9d;
        border-radius: 6px;
        background: #fff;
        text-align: center;
    }
}

@media (max-width: 670px) and (forced-colors: none) {
    #tq-first-offer.tq-first-order--reference .tq-first-reference {
        aspect-ratio: 1251 / 520;
    }

    .tq-first-order--reference .tq-first-reference-image {
        top: -13.46%;
    }

    #tq-first-offer.tq-first-order--reference .tq-first-close {
        right: 2.47%;
    }
}

/* Keep the desktop content in proportion with the compact 700 px frame. */
@media (min-width: 671px) {
    .tq-first-hero {
        gap: 11px;
        padding: 24px 25px 26px;
    }

    .tq-first-label { font-size: clamp(13px, 1.7vw, 18px); }
    #tq-first-offer .tq-first-title { font-size: clamp(28px, 3.85vw, 42px); }
    #tq-first-offer .tq-first-limit { font-size: clamp(14px, 1.9vw, 18px); }
    .tq-first-art-rate { font-size: clamp(13px, 1.85vw, 21px); }
    .tq-first-panel-body { padding: 8px 25px 14px; }
    #tq-first-offer .tq-first-terms { font-size: clamp(15px, 2.1vw, 19px); }
    .tq-first-rule { gap: 8px; padding: 8px; font-size: clamp(12px, 1.45vw, 15px); }
    .tq-first-note { font-size: clamp(12px, 1.35vw, 14px); }
    #tq-first-offer .tq-first-activate { font-size: clamp(18px, 2.8vw, 27px); }
}
