/* Istanbul Vita lead widget ("Free Hair Analysis" popup + floating dock).
   Self-contained, namespaced .hlw-* only; loaded by app/components/lead_widget.php. */

.hlw {
    --hlw-forest: #0a2a23;
    --hlw-ink: #202328;
    --hlw-gold: #cba15b;
    --hlw-gold-ref: #c9ab81;
    --hlw-muted: #8b99a6;
    --hlw-label: #93a1ad;
    --hlw-line: #dbe3ea;
    --hlw-paper: #f4f7f9;
    --hlw-warm: #f6f1e8;
    --hlw-white: #ffffff;
    --hlw-danger: #d64f4f;
    --hlw-whatsapp: #25d366;
    --hlw-whatsapp-hover: #1ebe57;
    --hlw-overlay: rgba(12, 16, 20, 0.5);
    --hlw-submit: #151b22;
    --hlw-font: "Montserrat", system-ui, sans-serif;
    --hlw-z-whatsapp: 990;
    --hlw-z-overlay: 10100;
    --hlw-z-dialog: 10101;
    box-sizing: border-box;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

.hlw *,
.hlw *::before,
.hlw *::after {
    box-sizing: border-box;
}

/* iOS Safari zooms the page when a focused control is under 16px. */
.hlw input,
.hlw select,
.hlw textarea {
    font-size: 16px;
}

.hlw-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.hlw-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.hlw-dock {
    position: fixed;
    right: calc(20px + env(safe-area-inset-right, 0px));
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    z-index: var(--hlw-z-whatsapp);
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity 0.28s ease, transform 0.28s ease, visibility 0.28s;
}

.hlw--revealed .hlw-dock {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
}

.hlw-form {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 58px;
    padding: 0 20px;
    border-radius: 999px;
    background: var(--hlw-gold);
    color: var(--hlw-forest);
    font-family: var(--hlw-font);
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.01em;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 10px 28px rgba(203, 161, 91, 0.32);
}

.hlw-form:hover {
    background: var(--hlw-gold-ref);
}

.hlw-form:focus-visible {
    outline: 2px solid var(--hlw-gold);
    outline-offset: 3px;
}

.hlw-whatsapp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: var(--hlw-whatsapp);
    border: 0;
    box-shadow: 0 10px 28px rgba(37, 211, 102, 0.35);
    text-decoration: none;
}

.hlw-whatsapp img {
    width: 28px;
    height: 28px;
    display: block;
    filter: brightness(0) invert(1);
}

.hlw-whatsapp:hover {
    background: var(--hlw-whatsapp-hover);
}

.hlw-whatsapp:focus-visible {
    outline: 2px solid var(--hlw-gold);
    outline-offset: 3px;
}

.hlw--open .hlw-dock {
    z-index: 30;
    pointer-events: none;
}

html.hlw-scroll-lock,
body.hlw-scroll-lock {
    overflow: hidden;
    overscroll-behavior: none;
}

body.hlw-scroll-lock {
    position: fixed;
    left: 0;
    right: 0;
    width: 100%;
}

.hlw-overlay {
    position: fixed;
    inset: 0;
    z-index: var(--hlw-z-overlay);
    display: grid;
    place-items: center;
    padding: 22px;
    padding-bottom: max(22px, env(safe-area-inset-bottom, 0px));
    background: var(--hlw-overlay);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    overscroll-behavior: none;
}

.hlw-overlay[hidden] {
    display: none;
}

.hlw-dialog {
    position: relative;
    z-index: var(--hlw-z-dialog);
    width: min(460px, 100%);
    min-height: 520px;
    max-height: min(720px, calc(100vh - 44px));
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 26px 14px 24px;
    background: var(--hlw-white);
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 16px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.22);
    font-family: var(--hlw-font);
    color: var(--hlw-ink);
    overscroll-behavior: contain;
    touch-action: pan-y;
}

.hlw-dialog:focus {
    outline: none;
}

.hlw-dialog:focus-visible {
    outline: 2px solid var(--hlw-gold);
    outline-offset: 2px;
}

.hlw-chrome {
    position: relative;
    display: grid;
    grid-template-columns: 40px 1fr 40px;
    align-items: start;
    gap: 10px;
    min-height: 50px;
    padding: 0 4px;
}

.hlw-progress {
    position: absolute;
    top: 2px;
    left: 55px;
    right: 55px;
    height: 4px;
    overflow: hidden;
    background: #f1f5f8;
    border-radius: 999px;
}

.hlw-progress__bar {
    display: block;
    height: 100%;
    width: 25%;
    background: linear-gradient(90deg, var(--hlw-gold-ref), var(--hlw-submit));
    border-radius: inherit;
}

.hlw-step-label {
    grid-column: 2;
    margin: 16px 0 0;
    color: var(--hlw-muted);
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    text-align: center;
}

.hlw-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    color: var(--hlw-muted);
    background: transparent;
    border: 0;
    cursor: pointer;
    font: inherit;
    line-height: 1;
}

.hlw-nav-btn--back {
    font-size: 30px;
    transform: translateY(-2px);
}

.hlw-nav-btn--back[hidden] {
    visibility: hidden;
    pointer-events: none;
}

.hlw-nav-btn--close {
    grid-column: 3;
    justify-self: end;
    font-size: 34px;
    font-weight: 300;
    transform: translateY(-2px);
}

.hlw-nav-btn:hover {
    color: var(--hlw-ink);
}

.hlw-nav-btn:focus-visible {
    outline: 2px solid var(--hlw-gold);
    outline-offset: 2px;
    border-radius: 8px;
}

.hlw-step {
    display: flex;
    flex: 1 0 auto;
    flex-direction: column;
    min-height: 430px;
    padding: 22px 12px 0;
}

.hlw-title {
    margin: 0 0 8px;
    color: var(--hlw-ink);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.045em;
}

.hlw-copy {
    margin: 0 0 26px;
    color: var(--hlw-muted);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
}

.hlw-services {
    display: grid;
    gap: 11px;
    margin: 8px 0 0;
    padding: 0;
    border: 0;
}

.hlw-service {
    position: relative;
    display: grid;
    grid-template-columns: 24px 1fr;
    gap: 14px;
    align-items: center;
    min-height: 56px;
    margin: 0;
    padding: 0 18px;
    background: var(--hlw-white);
    border: 1px solid var(--hlw-line);
    border-radius: 9px;
    cursor: pointer;
}

.hlw-service input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.hlw-service__mark {
    position: relative;
    width: 22px;
    height: 22px;
    border: 2px solid #d7e1e9;
    border-radius: 50%;
}

.hlw-service__label {
    color: var(--hlw-ink);
    font-size: 15px;
    font-weight: 800;
}

.hlw-service:hover {
    border-color: var(--hlw-gold-ref);
}

.hlw-service--selected {
    background: var(--hlw-warm);
    border-color: var(--hlw-gold-ref);
}

.hlw-service--selected .hlw-service__mark {
    background: var(--hlw-submit);
    border-color: var(--hlw-submit);
}

.hlw-service:has(input:focus-visible) {
    outline: 2px solid var(--hlw-gold);
    outline-offset: 2px;
    border-color: var(--hlw-gold-ref);
}

@supports not selector(:has(*)) {
    .hlw-service:focus-within {
        outline: 2px solid var(--hlw-gold);
        outline-offset: 2px;
    }
}

/* Grouped step-1 list: kept compact so 7 options fit without scrolling. */
.hlw-services {
    gap: 14px;
}

.hlw-service-group {
    display: grid;
    gap: 7px;
}

.hlw-service-group__label {
    margin: 0;
    color: var(--hlw-label);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1.2;
    text-transform: uppercase;
}

.hlw-service-group__options {
    display: grid;
    gap: 7px;
}

.hlw-service-group__options--split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hlw-service-group .hlw-service {
    min-height: 48px;
    padding: 6px 14px;
    gap: 12px;
}

.hlw-service-group__options--split .hlw-service {
    padding: 6px 12px;
    gap: 10px;
}

.hlw-service__text {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.hlw-service-group .hlw-service__label {
    font-size: 14px;
    line-height: 1.25;
}

.hlw-service__hint {
    color: var(--hlw-muted);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
}

@media (max-height: 700px) and (min-width: 431px) {
    .hlw-service-group .hlw-service {
        min-height: 44px;
        padding-top: 4px;
        padding-bottom: 4px;
    }
}

.hlw-service--selected .hlw-service__mark::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 3px;
    width: 6px;
    height: 10px;
    border-right: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
    transform: rotate(45deg);
}


.hlw-field {
    display: block;
    margin-bottom: 21px;
}

.hlw-field > span,
.hlw-field > label {
    display: block;
    margin-bottom: 9px;
    color: var(--hlw-label);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hlw-field input:not(.hlw-phone__input) {
    width: 100%;
    height: 52px;
    padding: 0 16px;
    color: var(--hlw-ink);
    background: var(--hlw-white);
    border: 1px solid var(--hlw-line);
    border-radius: 9px;
    font: inherit;
    font-size: 16px;
    font-weight: 700;
    outline: 0;
}

.hlw-field input:not(.hlw-phone__input):focus {
    border-color: var(--hlw-gold-ref);
    box-shadow: 0 0 0 3px rgba(201, 171, 129, 0.16);
}

.hlw-field--error input:not(.hlw-phone__input),
.hlw-phone--error {
    border-color: var(--hlw-danger);
}

.hlw-error {
    min-height: 18px;
    margin: 12px 0 0;
    color: var(--hlw-danger);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.25;
}

.hlw-search {
    display: grid;
    grid-template-columns: 28px 1fr;
    align-items: center;
    height: 54px;
    margin: 8px 0 18px;
    padding: 0 14px;
    border: 1px solid var(--hlw-gold-ref);
    border-radius: 9px;
    box-shadow: 0 0 0 3px rgba(201, 171, 129, 0.12);
}

.hlw-search__icon {
    position: relative;
    width: 16px;
    height: 16px;
    border: 2px solid var(--hlw-muted);
    border-radius: 50%;
}

.hlw-search__icon::after {
    content: "";
    position: absolute;
    right: -5px;
    bottom: -1px;
    width: 7px;
    height: 2px;
    background: var(--hlw-muted);
    transform: rotate(45deg);
}

.hlw-search input,
.hlw-country-search {
    width: 100%;
    height: 100%;
    border: 0;
    outline: 0;
    color: var(--hlw-ink);
    background: transparent;
    font: inherit;
    font-size: 16px;
    font-weight: 700;
}

.hlw-country-list {
    height: 300px;
    overflow-y: auto;
    padding: 0;
    margin: 0;
    list-style: none;
    scrollbar-color: #c8d3dc transparent;
    scrollbar-width: thin;
    overscroll-behavior: contain;
    touch-action: pan-y;
}

.hlw-country-list::-webkit-scrollbar {
    width: 8px;
}

.hlw-country-list::-webkit-scrollbar-thumb {
    background: #c8d3dc;
    border-radius: 99px;
}

.hlw-country-option {
    display: grid;
    grid-template-columns: 34px 1fr auto;
    gap: 12px;
    align-items: center;
    width: 100%;
    min-height: 46px;
    padding: 0 10px;
    color: var(--hlw-ink);
    background: transparent;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.hlw-country-option:hover,
.hlw-country-option--active {
    background: var(--hlw-warm);
}

.hlw-country-option:focus-visible {
    outline: 2px solid var(--hlw-gold);
}

.hlw-country-option__iso {
    font-size: 13px;
    font-weight: 700;
}

.hlw-country-option__name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 800;
}

.hlw-country-option__meta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.hlw-country-option__star {
    color: var(--hlw-gold-ref);
    font-size: 12px;
}

.hlw-country-option__dial {
    color: var(--hlw-muted);
    font-size: 13px;
    font-weight: 800;
}

.hlw-country-option--featured .hlw-country-option__dial {
    color: var(--hlw-gold-ref);
}

.hlw-country-empty {
    margin: 0;
    padding: 12px;
    color: var(--hlw-muted);
    font-size: 14px;
    font-weight: 700;
}

.hlw-phone {
    display: grid;
    grid-template-columns: 104px 1fr;
    height: 56px;
    overflow: hidden;
    margin-top: 8px;
    border: 1px solid var(--hlw-gold-ref);
    border-radius: 9px;
    box-shadow: 0 0 0 3px rgba(201, 171, 129, 0.12);
}

.hlw-phone__country {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0;
    color: var(--hlw-ink);
    background: var(--hlw-paper);
    border: 0;
    border-right: 1px solid var(--hlw-line);
    cursor: pointer;
    font: inherit;
}

.hlw-phone__country:hover {
    background: #eef2f5;
}

.hlw-phone__country:focus-visible {
    outline: 2px solid var(--hlw-gold);
    outline-offset: -2px;
}

.hlw-phone__iso,
.hlw-phone__dial,
.hlw-phone__chevron {
    font-size: 13px;
    font-weight: 700;
}

.hlw-phone__dial,
.hlw-phone__chevron {
    color: var(--hlw-muted);
}

.hlw-phone__input {
    width: 100%;
    min-width: 0;
    height: 56px;
    padding: 0 16px;
    color: var(--hlw-ink);
    border: 0;
    outline: 0;
    background: transparent;
    font: inherit;
    font-size: 16px;
    font-weight: 800;
}

.hlw-enter-hint {
    margin: 10px 0 18px;
    color: var(--hlw-muted);
    font-size: 11px;
    font-weight: 800;
    text-align: center;
}

.hlw-enter-hint kbd {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    margin-left: 5px;
    padding: 0 8px;
    color: var(--hlw-muted);
    background: #f7f9fb;
    border: 1px solid var(--hlw-line);
    border-radius: 4px;
    font: inherit;
    font-size: 10px;
}

.hlw-submit {
    position: static;
    display: flex;
    width: 100%;
    margin: auto 0 0;
    flex: none;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    color: #ffffff;
    background: var(--hlw-submit);
    border: 0;
    border-radius: 14px;
    cursor: pointer;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
}

.hlw-submit:hover {
    background: var(--hlw-forest);
}

.hlw-submit:focus-visible {
    outline: 2px solid var(--hlw-gold);
    outline-offset: 2px;
}

.hlw-submit:disabled {
    opacity: 0.62;
    cursor: wait;
}

.hlw-success {
    display: flex;
    flex: 1 0 auto;
    flex-direction: column;
    align-items: center;
    min-height: 430px;
    padding: 80px 12px 0;
    text-align: center;
}

.hlw-success .hlw-submit {
    margin-top: auto;
}

.hlw-success__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    color: #ffffff;
    background: var(--hlw-submit);
    border-radius: 50%;
    font-size: 33px;
    font-weight: 600;
}

.hlw-success .hlw-title {
    margin: 27px 0 10px;
}

.hlw-success .hlw-copy {
    margin: 0;
}

.hlw-banner {
    margin: 0 0 16px;
    color: var(--hlw-danger);
    font-size: 13px;
    font-weight: 800;
}

@media (max-width: 430px) {
    .hlw-overlay {
        padding: 10px;
        align-items: end;
        place-items: end center;
    }

    .hlw-dialog {
        width: 100%;
        min-height: 0;
        max-height: calc(100dvh - 12px);
        overflow: auto;
        border-radius: 16px 16px 12px 12px;
    }

    .hlw-step {
        min-height: 0;
    }

    .hlw-country-list {
        height: min(300px, 42vh);
    }

    .hlw-dock {
        right: calc(14px + env(safe-area-inset-right, 0px));
        bottom: calc(14px + env(safe-area-inset-bottom, 0px));
        gap: 8px;
    }

    .hlw-form {
        height: 54px;
        padding: 0 16px;
        font-size: 13px;
    }

    .hlw-whatsapp {
        width: 54px;
        height: 54px;
    }
}

@media (max-width: 360px) {
    .hlw-phone {
        grid-template-columns: 92px 1fr;
    }

    .hlw-title {
        font-size: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hlw-progress__bar,
    .hlw-form,
    .hlw-whatsapp,
    .hlw-submit,
    .hlw-dock {
        transition: none;
        transform: none;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .hlw-progress__bar {
        transition: width 0.28s ease;
    }
}

/* ---- Istanbul Vita additions ------------------------------------------------------------ */

/* The site's own button / heading / label styles must not leak into the widget. */
.hlw .hlw-title {
    font-family: var(--hlw-font) !important;
    font-size: 22px !important;
    font-weight: 700 !important;
    line-height: 1.15 !important;
    letter-spacing: -0.03em !important;
    text-align: left;
}

.hlw .hlw-success .hlw-title {
    text-align: center;
}

@media (max-width: 360px) {
    .hlw .hlw-title {
        font-size: 20px !important;
    }
}

.hlw h2,
.hlw p,
.hlw label,
.hlw fieldset,
.hlw legend {
    font-family: var(--hlw-font);
    text-transform: none;
}

.hlw button {
    font-family: var(--hlw-font);
    letter-spacing: normal;
    text-transform: none;
    box-shadow: none;
}

.hlw-step > .hlw-copy {
    margin-bottom: 20px;
}

/* Required consent (step 4): checkbox on the left, the text wraps beside it. */
.hlw-consent {
    margin: 18px 0 0;
}

.hlw-consent__row {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    width: 100%;
    margin: 0;
    padding: 0;
    color: var(--hlw-ink);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
    text-align: left;
    cursor: pointer;
}

.hlw .hlw-consent__box {
    position: static;
    display: block;
    width: 20px;
    min-width: 0;
    height: 20px;
    margin: 1px 0 0;
    padding: 0;
    opacity: 1;
    border: 0;
    appearance: auto;
    -webkit-appearance: checkbox;
    accent-color: var(--hlw-submit);
    cursor: pointer;
}

.hlw-consent__box:focus-visible {
    outline: 2px solid var(--hlw-gold);
    outline-offset: 2px;
}

.hlw-consent__text {
    min-width: 0;
    overflow-wrap: anywhere;
}

.hlw-consent a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.hlw-consent--error .hlw-consent__box {
    outline: 2px solid var(--hlw-danger);
    outline-offset: 1px;
}

.hlw-consent .hlw-error {
    margin-top: 8px;
}

.hlw-consent__note {
    margin: 10px 0 0 30px;
    color: var(--hlw-muted);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.45;
}

.hlw-banner a {
    color: inherit;
    text-decoration: underline;
}

/* Dock: "Free Hair Analysis" pill + WhatsApp. */
.hlw-whatsapp svg {
    display: block;
    width: 30px;
    height: 30px;
    fill: #ffffff;
}

.hlw-form {
    border: 0;
    cursor: pointer;
}

/* Phones: the cookie banner owns the bottom of the screen until a choice is made. */
@media (max-width: 560px) {
    body:has(.consent-banner:not([hidden])) .hlw-dock {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }
}

@media (max-width: 430px) {
    .hlw-step,
    .hlw-success {
        min-height: min(430px, calc(100dvh - 120px));
    }

    .hlw-form {
        max-width: calc(100vw - 100px);
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

@media print {
    .hlw {
        display: none;
    }
}
/* The site sets every <p> (size, line height, margins) with !important; the widget's own
   paragraphs keep the widget's values. */
.hlw p.hlw-step-label { margin: 16px 0 0 !important; font-size: 13px !important; line-height: 1 !important; }
.hlw p.hlw-copy { margin: 0 0 20px !important; font-size: 14px !important; line-height: 1.4 !important; }
.hlw .hlw-success p.hlw-copy { margin: 0 0 24px !important; }
.hlw p.hlw-error { margin: 8px 0 0 !important; font-size: 13px !important; line-height: 1.3 !important; min-height: 0 !important; }
.hlw p.hlw-enter-hint { margin: 12px 0 18px !important; font-size: 11px !important; line-height: 1.4 !important; }
.hlw p.hlw-banner { margin: 0 0 14px !important; font-size: 13px !important; line-height: 1.4 !important; }
.hlw p.hlw-consent__note { margin: 10px 0 0 30px !important; font-size: 12px !important; line-height: 1.45 !important; }
.hlw li.hlw-country-empty { font-size: 14px !important; line-height: 1.4 !important; }
.hlw .hlw-field > span { font-size: 12px !important; line-height: 1.2 !important; }
