/*
 * Test question step (Figma "Hakini Landing Page" > Test Step and Test Step
 * Responsive). Scoped to .tStep and the email dialog.
 */

.tStep,
.tStep__dialog,
.tResult {
    --ts-font: Samim, sans-serif;
    --ts-font-600: Samim-m, Samim, sans-serif;
    --ts-font-700: Samim-b, Samim, sans-serif;
    --ts-navy: #004492;
    --ts-slate: #36415d;
    --ts-ink: #0f172a;
    --ts-line: #d0d0d0;
    --ts-peach: #ffdbcc;
    font-family: var(--ts-font);
    font-synthesis: none;
}
.tStep *,
.tStep__dialog * {
    box-sizing: border-box;
}
html:lang(ar) .tStep,
html:lang(ar) .tStep__dialog {
    direction: rtl;
}
:where(.tStep, .tStep__dialog) :is(h1, h2, p, legend, fieldset) {
    margin: 0;
    padding: 0;
    border: 0;
    font-weight: normal;
}
.tStep button,
.tStep__dialog button,
.tStep__dialog input,
.tResult button,
.tResult input {
    font-family: inherit;
}
.tStep {
    min-height: calc(100vh - 100px);
    padding: 32px 0 80px;
    background: #fff8f5;
}
.tStep__wrap {
    width: 1100px;
    max-width: calc(100% - 32px);
    margin: 0 auto;
}
.tStep__card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 32px 32px 32px;
    border-radius: 20px;
    background: #fff;
}
.tStep__head {
    max-width: 760px;
    padding-inline-end: 220px;
}
.tStep__title {
    color: var(--ts-navy);
    font-family: var(--ts-font-700);
    font-size: 28px;
    line-height: 34px;
}
.tStep__instruction {
    margin-top: 6px !important;
    color: var(--ts-slate);
    font-family: var(--ts-font-600);
    font-size: 18px;
    line-height: 22px;
}
.tStep__help {
    position: absolute;
    top: 42px;
    right: 32px;
    padding: 11px 16px;
    border: 1px solid rgba(0, 68, 146, 0.3);
    border-radius: 10px;
    color: var(--ts-navy);
    font-family: var(--ts-font-600);
    font-size: 16px;
    line-height: 19px;
}
html:lang(ar) .tStep__help {
    right: auto;
    left: 32px;
}
.tStep__help:hover,
.tStep__help:focus {
    color: var(--ts-navy);
    text-decoration: none;
    background: #f3f8ff;
}

.tStep__progress {
    margin-top: 42px;
}
.tStep__progress p {
    display: flex;
    justify-content: space-between;
    color: var(--ts-slate);
    font-family: var(--ts-font-600);
    font-size: 20px;
    line-height: 24px;
}
.tStep__bar {
    height: 10px;
    margin-top: 14px;
    overflow: hidden;
    border-radius: 30px;
    background: #f3f1f0;
}
.tStep__bar span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: 30px;
    background: var(--ts-peach);
    transition: width 0.3s ease;
}
html:lang(ar) .tStep__bar span {
    margin-right: 0;
    margin-left: auto;
}

.tStep__form {
    margin-top: 32px;
}
.tStep__question legend {
    width: 100%;
    border: 0;
    margin-bottom: 16px;
    color: var(--ts-navy);
    font-family: var(--ts-font-600);
    font-size: 20px;
    line-height: 24px;
}
.tStep__option {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 50px;
    margin: 0 0 16px;
    padding: 12px 20px;
    border: 1px solid var(--ts-line);
    border-radius: 10px;
    background: #fff;
    color: #000;
    font-size: 18px;
    font-weight: normal;
    line-height: 22px;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}
.tStep__option:last-child {
    margin-bottom: 0;
}
.tStep__option:hover {
    border-color: #ffc9b3;
}
.tStep__option input {
    flex: none;
    width: 20px;
    height: 20px;
    margin: 0;
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    background: #fff;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}
.tStep__option input:checked {
    background: radial-gradient(circle, var(--ts-navy) 0 5px, #fff 5.5px);
}
.tStep__option input:focus-visible {
    outline: 2px solid var(--ts-navy);
    outline-offset: 2px;
}
.tStep__option:has(input:checked) {
    border-color: #ffc9b3;
    background: #fff8f5;
    font-family: var(--ts-font-600);
}

.tStep__error {
    min-height: 20px;
    margin-top: 12px !important;
    color: #bc171f;
    font-size: 15px;
}
.tStep__nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 56px;
    margin-top: 16px;
}
.tStep__prev,
.tStep__next {
    min-width: 188px;
    height: 42px;
    padding: 0 25px;
    border: 0;
    border-radius: 100px;
    font-size: 18px;
    cursor: pointer;
}
.tStep__prev {
    background: #ecf4fe;
    color: var(--ts-navy);
    font-family: var(--ts-font-600);
}
.tStep__next {
    background: var(--ts-navy);
    color: #fff;
    font-family: var(--ts-font-700);
}
.tStep__next:disabled {
    background: #9fb3cf;
    cursor: default;
}
.tStep__saved {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 40px;
    padding: 0 15px;
    border: 1px solid #92dfb9;
    border-radius: 7px;
    background: #f4fbf6;
    color: #019120;
    font-family: var(--ts-font-600);
    font-size: 16px;
}
.tStep__saved[hidden] {
    display: inline-flex;
    visibility: hidden;
}
.tStep__saved img {
    width: 20px;
}

.tStep__safe {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-top: 24px;
    padding: 23px 28px;
    border-radius: 20px;
    background: #fff;
    color: var(--ts-ink);
    font-size: 18px;
    line-height: 20px;
}
.tStep__safe img {
    flex: none;
    width: 42px;
}
.tStep__safeTitle {
    margin-bottom: 10px !important;
    font-family: var(--ts-font-600);
    font-size: 20px;
    line-height: 24px;
}

/* ---- Email dialog ------------------------------------------------------------ */

.tStep__dialog {
    position: fixed;
    inset: 0;
    z-index: 1060;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(15, 23, 42, 0.45);
}
.tStep__dialog[hidden] {
    display: none;
}
.tStep-dialog-open {
    overflow: hidden;
}
.tStep__dialogBox {
    width: 480px;
    max-width: 100%;
    padding: 28px;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.2);
}
.tStep__dialogBox h2 {
    color: var(--ts-navy);
    font-family: var(--ts-font-700);
    font-size: 24px;
    line-height: 30px;
}
.tStep__dialogBox > p:not(.tStep__error) {
    margin-top: 8px !important;
    color: var(--ts-slate);
    font-size: 16px;
    line-height: 22px;
}
.tStep__field {
    display: block;
    margin: 20px 0 0;
    font-weight: normal;
}
.tStep__field span {
    display: block;
    margin-bottom: 8px;
    color: var(--ts-ink);
    font-family: var(--ts-font-600);
    font-size: 15px;
}
.tStep__field input {
    width: 100%;
    height: 50px;
    padding: 0 18px;
    border: 1px solid #d5dde7;
    border-radius: 25px;
    outline: 0;
    color: var(--ts-ink);
    font-size: 16px;
}
.tStep__field input:focus {
    border-color: var(--ts-navy);
}
.tStep__dialogActions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}
.tStep__dialogActions button {
    flex: 1;
    min-width: 0;
}

/* ---- Phone --------------------------------------------------------------------- */

@media (max-width: 767px) {
    .tStep {
        padding: 20px 0 48px;
    }
    .tStep__wrap {
        max-width: calc(100% - 40px);
    }
    .tStep__card {
        padding: 24px 20px;
    }
    .tStep__head {
        padding: 0;
    }
    .tStep__help,
    html:lang(ar) .tStep__help {
        position: static;
        order: 5;
        align-self: center;
        margin-top: 20px;
    }
    .tStep__progress {
        margin-top: 32px;
    }
    .tStep__form {
        margin-top: 28px;
    }
    .tStep__question legend {
        font-size: 18px;
        line-height: 22px;
    }
    .tStep__option {
        min-height: 52px;
        padding: 12px 16px;
        font-size: 16px;
        line-height: 19px;
    }
    .tStep__nav {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px 12px;
    }
    .tStep__saved {
        grid-column: 1 / -1;
        grid-row: 1;
        justify-self: center;
    }
    .tStep__prev,
    .tStep__next {
        min-width: 0;
        padding: 0 12px;
    }
    .tStep__safe {
        align-items: flex-start;
        gap: 16px;
        padding: 20px;
        font-size: 16px;
    }
}

/* ==== Results (Figma "Minimal / Low", "Mild Symptoms Detected", "Severe Risk") ==== */

.tResult {
    background: #fff;
}
.tResult__top,
.tResult__bottom {
    padding: 28px 0 40px;
    background: #fff8f5;
}
.tResult__bottom {
    padding: 40px 0 72px;
}
.tResult__card {
    width: 1100px;
    max-width: calc(100% - 32px);
    margin: 0 auto;
    padding: 44px 48px 48px;
    border-radius: 20px;
    background: #fff;
    text-align: center;
}
.tResult__summary {
    width: 424px;
    max-width: 100%;
    margin: 0 auto;
    text-align: start;
}
.tResult__scoreRow {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}
.tResult__label {
    color: #36415d;
    font-family: var(--sp-font-700);
    font-size: 14px;
    line-height: 17px;
}
.tResult__score {
    margin-top: 2px !important;
    color: var(--sp-ink);
    font-family: var(--sp-font-700);
    font-size: 26px;
    line-height: 32px;
}
.tResult__score strong {
    color: var(--band-text);
}
.tResult__badge {
    padding: 10px;
    border-radius: 10px;
    background: var(--band-soft);
    color: var(--band-text);
    font-family: var(--sp-font-600);
    font-size: 16px;
    line-height: 19px;
}
.tResult__scale {
    margin-top: 20px;
}
.tResult__bar {
    position: relative;
    display: grid;
    grid-template-columns: repeat(var(--count), 1fr);
    gap: 2px;
    height: 10px;
}
.tResult__bar span:first-child {
    border-start-start-radius: 30px;
    border-end-start-radius: 30px;
}
.tResult__bar span:last-of-type {
    border-start-end-radius: 30px;
    border-end-end-radius: 30px;
}
.tResult__marker {
    position: absolute;
    top: -7px;
    width: 6px;
    height: 24px;
    margin-inline-start: -3px;
    border: 2px solid #fff;
    border-radius: 30px;
    background: var(--sp-navy);
}
.tResult__legend {
    display: grid;
    grid-template-columns: repeat(var(--count), 1fr);
    gap: 2px;
    margin-top: 16px !important;
}
.tResult__legend li {
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: #36415d;
    font-family: var(--sp-font-600);
    font-size: 14px;
    line-height: 17px;
}
.tResult__legend strong {
    color: var(--sp-ink);
    font-family: var(--sp-font-700);
    font-weight: normal;
    font-size: 16px;
}
.tResult__title {
    margin-top: 26px !important;
    color: var(--sp-navy);
    font-family: var(--sp-font-700);
    font-size: 28px;
    line-height: 34px;
}
.tResult__text {
    max-width: 610px;
    margin: 6px auto 0 !important;
    color: #36415d;
    font-family: var(--sp-font-600);
    font-size: 22px;
    line-height: 27px;
}
.tResult__note {
    max-width: 610px;
    margin: 14px auto 0 !important;
    color: #737373;
    font-size: 15px;
    line-height: 22px;
}
.tResult__more {
    max-width: 610px;
    margin: 14px auto 0;
}
.tResult__more summary {
    display: inline-block;
    color: var(--sp-navy);
    font-family: var(--sp-font-600);
    font-size: 16px;
    text-decoration: underline;
    cursor: pointer;
}
.tResult__more p {
    margin-top: 10px !important;
    font-size: 16px;
    line-height: 24px;
    text-align: start;
}
.tResult__actions {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 28px;
}
.tResult__action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 270px;
    height: 57px;
}
.tResult__action:hover,
.tResult__action:focus {
    text-decoration: none;
}
.tStep__prev.tResult__action:hover {
    color: var(--sp-navy);
}
.tStep__next.tResult__action:hover {
    color: #fff;
}
.tResult__action img {
    width: 22px;
    filter: brightness(0) saturate(100%) invert(16%) sepia(85%) saturate(2400%) hue-rotate(204deg);
}
.tResult__cols {
    display: flex;
    justify-content: center;
    gap: 26px;
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid #f0f0f0;
    text-align: start;
}
.tResult__cols > div {
    flex: 0 1 380px;
    min-width: 0;
}
.tResult__h2 {
    margin-bottom: 16px !important;
    color: var(--sp-ink);
    font-family: var(--sp-font-700);
    font-size: 20px;
    line-height: 24px;
    text-align: center;
}
.tResult__box {
    border: 1px solid #f4f4f4;
    border-radius: 14px;
    background: #fff;
}
.tResult__mine {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 17px;
}
.tResult__mine strong {
    font-family: var(--sp-font-700);
    font-weight: normal;
    font-size: 18px;
}
.tResult__mine span {
    color: #36415d;
    font-size: 16px;
}
.tResult__bands {
    margin-top: 10px !important;
    padding: 10px !important;
}
.tResult__bands li {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 3px 0;
    border-radius: 10px;
}
.tResult__bands li.is-current {
    background: #fafafa;
}
.tResult__range {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    min-width: 93px;
    height: 47px;
    padding: 0 12px;
    border-radius: 8px;
    font-family: var(--sp-font-700);
    font-size: 16px;
    direction: ltr;
}
.tResult__bands strong {
    display: block;
    font-family: var(--sp-font-600);
    font-weight: normal;
    font-size: 16px;
}
.tResult__bands small {
    display: block;
    margin-top: 4px;
    color: #36415d;
    font-size: 14px;
}
.tResult__faq {
    margin-bottom: 10px;
    padding: 12px 20px;
    border: 1px solid #f4f4f4;
    border-radius: 8px;
}
.tResult__faq summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-family: var(--sp-font-600);
    font-size: 16px;
    line-height: 24px;
    list-style: none;
    cursor: pointer;
}
.tResult__faq summary::-webkit-details-marker {
    display: none;
}
.tResult__faq summary::after {
    content: "";
    flex: none;
    width: 13px;
    height: 8px;
    background: #737373;
    -webkit-mask: url("../images/booking/chevron.svg") center / contain no-repeat;
    mask: url("../images/booking/chevron.svg") center / contain no-repeat;
    transition: transform 0.2s ease;
}
.tResult__faq[open] summary::after {
    transform: rotate(180deg);
}
.tResult__faq p {
    margin-top: 8px !important;
    color: #737373;
    font-size: 16px;
    line-height: 24px;
}
.tResult__app {
    margin-top: 32px;
}
.tResult__app .tResult__h2 {
    margin-bottom: 12px !important;
}
.tResult__app div {
    display: flex;
    justify-content: center;
    gap: 10px;
}
.tResult__app img {
    height: 46px;
}

.tResult__extra .sTherapists {
    margin-top: 0;
}
.tResult__extra .sArticles,
.tResult__extra .sPrograms {
    margin-top: 80px;
}
.tResult__extra .sPrograms {
    margin-bottom: 72px;
}

.tResult__send {
    padding: 32px 48px 36px;
}
.tResult__sendTitle {
    color: var(--sp-navy);
    font-family: var(--sp-font-700);
    font-size: 22px;
    line-height: 27px;
}
.tResult__sendText {
    margin-top: 6px !important;
    font-size: 16px;
}
.tResult__form {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 10px;
    margin-top: 12px;
    text-align: start;
}
.tResult__form .tStep__field {
    flex: 0 1 510px;
}
.tResult__form .tStep__next {
    min-width: 0;
    height: 50px;
}
.tResult__status {
    min-height: 20px;
    margin-top: 10px !important;
    color: #019120;
    font-size: 15px;
}
.tResult__status.is-error {
    color: #bc171f;
}
.tResult__report {
    margin-top: 12px !important;
    font-size: 16px;
}
.tResult__share {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 14px;
}
.tResult__share > span {
    width: 1px;
    height: 28px;
    background: #e5e5e5;
}
.tResult__share a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f1f3f6;
}
.tResult__share a img {
    width: 18px;
}
.tResult__share .tStep__prev {
    min-width: 0;
}

@media (max-width: 767px) {
    .tResult__card,
    .tResult__send {
        max-width: calc(100% - 32px);
        padding: 28px 20px;
    }
    .tResult__text {
        font-size: 18px;
        line-height: 24px;
    }
    .tResult__actions {
        flex-direction: column;
        gap: 12px;
    }
    .tResult__action {
        flex: none;
        min-width: 0;
        width: 100%;
        height: 50px;
    }
    .tResult__cols {
        flex-direction: column;
        gap: 28px;
    }
    .tResult__cols > div {
        flex: none;
    }
    .tResult__form {
        flex-direction: column;
        align-items: stretch;
    }
    .tResult__form .tStep__field {
        flex: none;
    }
    .tResult__share {
        flex-wrap: wrap;
    }
}

@media print {
    header,
    footer,
    .navbar,
    .whatsapp-contact,
    .tResult__actions,
    .tResult__app,
    .tResult__extra,
    .tResult__bottom {
        display: none !important;
    }
    .tResult__top {
        padding: 0;
        background: #fff;
    }
    .tResult__card {
        width: 100%;
        max-width: none;
        padding: 0;
    }
    .tResult__bar span,
    .tResult__range,
    .tResult__badge {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}
