/* Frequency Balancing funnel + card defaults.
   Every value hangs off a custom property so the theme can restyle without !important. */

.ehz-funnel {
    --ehz-hover: var(--ehz-dawn, #f3f0ea);
    --ehz-surface: var(--ehz-shell, #fffdf9);
    --ehz-accent: var(--ehz-sea, #2f6f62);
    --ehz-accent-soft: var(--ehz-mist, #e8f1ee);
    --ehz-radius: 14px;
    --ehz-gap: 1rem;

    color: var(--ehz-ink);
    margin: 0 auto;
    max-width: 62rem;
}

.ehz-funnel *,
.ehz-funnel *::before,
.ehz-funnel *::after {
    box-sizing: border-box;
}

.ehz-funnel__heading {
    font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem);
    line-height: 1.15;
    margin: 0 0 .35em;
}

.ehz-funnel__lead {
    color: var(--ehz-muted);
    margin: 0 0 1.5rem;
    max-width: 44ch;
}

.ehz-funnel__form {
    background: var(--ehz-surface);
    border: 1px solid var(--ehz-line);
    border-radius: var(--ehz-radius);
    padding: clamp(1rem, .6rem + 1.6vw, 2rem);
}

/* Progress */

.ehz-funnel__progress {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1.25rem;
    list-style: none;
    margin: 0 0 1.5rem;
    padding: 0;
}

.ehz-funnel__progress-step {
    align-items: center;
    color: var(--ehz-muted);
    display: flex;
    font-size: .875rem;
    gap: .5rem;
}

.ehz-funnel__progress-num {
    align-items: center;
    background: var(--ehz-shell, #fff);
    border: 1px solid var(--ehz-line);
    border-radius: 50%;
    display: inline-flex;
    font-size: .8125rem;
    height: 1.75rem;
    justify-content: center;
    width: 1.75rem;
}

.ehz-funnel__progress-step.is-current {
    color: var(--ehz-ink);
    font-weight: 600;
}

.ehz-funnel__progress-step.is-current .ehz-funnel__progress-num {
    background: var(--ehz-accent);
    border-color: var(--ehz-accent);
    color: var(--ehz-on-accent, #fff);
}

.ehz-funnel__progress-step.is-done .ehz-funnel__progress-num {
    background: var(--ehz-accent-soft);
    border-color: var(--ehz-accent);
    color: var(--ehz-accent);
}

/* Steps: only one at a time once JS is running. */

.ehz-funnel__step {
    border: 0;
    margin: 0 0 1.5rem;
    min-width: 0;
    padding: 0;
}

.ehz-funnel[data-ehz-js="1"] .ehz-funnel__step {
    display: none;
    margin-bottom: 0;
}

.ehz-funnel[data-ehz-js="1"] .ehz-funnel__step.is-active {
    display: block;
}

.ehz-funnel__step:focus {
    outline: none;
}

.ehz-funnel__question {
    display: block;
    font-size: clamp(1.15rem, 1rem + .6vw, 1.5rem);
    font-weight: 600;
    margin: 0 0 .35em;
    padding: 0;
}

.ehz-funnel__hint {
    color: var(--ehz-muted);
    font-size: .9375rem;
    margin: 0 0 1rem;
}

/* Chips */

.ehz-funnel__chips {
    display: flex;
    flex-wrap: wrap;
    gap: .625rem;
}

.ehz-chip {
    align-items: center;
    background: var(--ehz-shell, #fff);
    border: 1px solid var(--ehz-line);
    border-radius: 999px;
    cursor: pointer;
    display: inline-flex;
    gap: .5rem;
    line-height: 1.2;
    padding: .55rem .95rem;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.ehz-chip:hover {
    background: var(--ehz-hover);
    border-color: var(--ehz-line-strong);
}

.ehz-chip__input {
    height: 1px;
    margin: 0;
    opacity: 0;
    position: absolute;
    width: 1px;
}

.ehz-chip__icon {
    display: inline-flex;
    flex: 0 0 auto;
}

.ehz-chip__icon svg {
    display: block;
    height: 1.25rem;
    width: 1.25rem;
}

.ehz-chip:has(.ehz-chip__input:checked) {
    background: var(--ehz-accent-soft);
    border-color: var(--ehz-accent);
    color: var(--ehz-accent);
    font-weight: 600;
}

.ehz-chip:has(.ehz-chip__input:focus-visible),
.ehz-option:has(.ehz-option__input:focus-visible) {
    outline: 2px solid var(--ehz-accent);
    outline-offset: 2px;
}

/* Radio options */

.ehz-funnel__options {
    display: grid;
    gap: .625rem;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
}

.ehz-funnel__options--inline {
    grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
}

.ehz-option {
    background: var(--ehz-shell, #fff);
    border: 1px solid var(--ehz-line);
    border-radius: var(--ehz-radius);
    cursor: pointer;
    display: block;
    padding: .9rem 1rem;
    transition: background-color .15s ease, border-color .15s ease;
}

.ehz-option:hover {
    background: var(--ehz-hover);
    border-color: var(--ehz-line-strong);
}

.ehz-option__input {
    height: 1px;
    margin: 0;
    opacity: 0;
    position: absolute;
    width: 1px;
}

.ehz-option__label {
    display: block;
    font-weight: 600;
}

.ehz-option__hint {
    color: var(--ehz-muted);
    display: block;
    font-size: .875rem;
    margin-top: .2rem;
}

.ehz-option:has(.ehz-option__input:checked) {
    background: var(--ehz-accent-soft);
    border-color: var(--ehz-accent);
    box-shadow: inset 0 0 0 1px var(--ehz-accent);
}

/* Conditional options are toggled with the hidden attribute, which loses to the
   display declarations above unless it is stated with more weight. */
.ehz-funnel .ehz-chip[hidden],
.ehz-funnel .ehz-option[hidden],
.ehz-funnel .ehz-funnel__progress-step[hidden],
.ehz-funnel .ehz-funnel__step[hidden] {
    display: none;
}

/* Navigation */

.ehz-funnel__nav {
    display: flex;
    flex-wrap: wrap;
    gap: .625rem;
    margin-top: 1.5rem;
}

.ehz-funnel__status {
    color: var(--ehz-muted);
    font-size: .9375rem;
    margin: .75rem 0 0;
    min-height: 1.25em;
}

.ehz-funnel.is-loading .ehz-funnel__nav {
    opacity: .6;
    pointer-events: none;
}

/* Buttons */

.ehz-btn {
    background: var(--ehz-accent, #2f6f62);
    border: 1px solid var(--ehz-accent, #2f6f62);
    border-radius: 999px;
    color: var(--ehz-on-accent, #fff);
    cursor: pointer;
    display: inline-block;
    font: inherit;
    font-weight: 600;
    line-height: 1.2;
    padding: .7rem 1.4rem;
    text-decoration: none;
    transition: opacity .15s ease;
}

.ehz-btn:hover,
.ehz-btn:focus {
    color: var(--ehz-on-accent, #fff);
    opacity: .88;
}

.ehz-btn--ghost {
    background: transparent;
    border-color: var(--ehz-line, #dcd6cc);
    color: var(--ehz-ink, #1f2a2e);
}

.ehz-btn--ghost:hover,
.ehz-btn--ghost:focus {
    color: var(--ehz-ink, #1f2a2e);
}

/* Results */

.ehz-results {
    outline: none;
}

.ehz-results__heading {
    font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem);
    margin: 0 0 .25em;
}

.ehz-results__count,
.ehz-results__empty {
    color: var(--ehz-muted, #5d6b70);
    margin: 0 0 1.5rem;
}

.ehz-results__grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
}

.ehz-results__actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1.75rem 0 0;
}

/* Near matches: the closest practitioners when nobody fits exactly. Information, not an error,
   so everything stays in the muted colour. */

.ehz-results__summary {
    color: var(--ehz-muted, #5d6b70);
    margin: 0 auto 1.5rem;
    max-width: 52ch;
    text-align: center;
}

.ehz-card__diff {
    margin: 0 1.15rem .75rem;
}

.ehz-card .ehz-card__diff-label {
    color: var(--ehz-muted, #5d6b70);
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .02em;
    margin: 0 0 .35rem;
}

.ehz-card__diff-list {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.ehz-card__diff-item {
    background: transparent;
    border: 1px solid var(--ehz-line-strong, var(--ehz-line, #dcd6cc));
    border-radius: 999px;
    color: var(--ehz-muted, #5d6b70);
    font-size: var(--ehz-size-tiny, .75rem);
    line-height: 1.4;
    margin: 0;
    padding: .18rem .6rem;
}

.ehz-results__wait {
    background: var(--ehz-accent-soft, #e8f1ee);
    border: 1px solid var(--ehz-line, #dcd6cc);
    border-radius: var(--ehz-radius, 14px);
    margin: 2rem auto 0;
    max-width: 40rem;
    padding: 1.25rem 1.5rem;
    text-align: center;
}

.ehz-results__wait-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 .25rem;
}

.ehz-results__wait-text {
    color: var(--ehz-muted, #5d6b70);
    margin: 0 0 1rem;
}

.ehz-results__wait-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    justify-content: center;
    margin: 0;
}

.ehz-results--empty .ehz-results__wait {
    margin-top: 1rem;
}

@media (max-width: 619px) {
    .ehz-results--near .ehz-results__grid {
        grid-template-columns: 1fr;
    }

    .ehz-results__wait {
        padding: 1.1rem 1rem;
    }

    .ehz-results__wait-actions .ehz-btn {
        text-align: center;
        width: 100%;
    }
}

/* Card. Markup mirrored by templates/card-practitioner.php, funnel.js and the theme twin.
   The theme ships its own card styles; these only carry the plugin on its own. */

.ehz-card {
    background: var(--ehz-surface, #fffdf9);
    border: 1px solid var(--ehz-line, #dcd6cc);
    border-radius: var(--ehz-radius, 14px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ehz-card__photo {
    aspect-ratio: 4 / 3;
    background: var(--ehz-accent-soft, #e8f1ee);
    overflow: hidden;
}

.ehz-card__photo img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.ehz-card__name {
    font-size: 1.15rem;
    margin: 1.15rem 1.15rem .25rem;
}

.ehz-card__name a {
    color: inherit;
    text-decoration: none;
}

.ehz-card__name a:hover,
.ehz-card__name a:focus {
    text-decoration: underline;
}

.ehz-card__tagline {
    color: var(--ehz-muted, #5d6b70);
    margin: 0 1.15rem .75rem;
}

.ehz-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin: 0 1.15rem .75rem;
}

.ehz-tag {
    background: var(--ehz-accent-soft, #e8f1ee);
    border-radius: 999px;
    color: var(--ehz-accent, #2f6f62);
    font-size: .75rem;
    line-height: 1.4;
    padding: .2rem .6rem;
}

.ehz-card__meta {
    color: var(--ehz-muted, #5d6b70);
    display: flex;
    flex-wrap: wrap;
    font-size: .8125rem;
    gap: .25rem 1rem;
    margin: 0 1.15rem .75rem;
}

.ehz-card__meta-item {
    align-items: center;
    display: inline-flex;
    gap: .35rem;
}

.ehz-card__price {
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 1.15rem;
}

.ehz-card__unit {
    color: var(--ehz-muted, #5d6b70);
    display: block;
    font-size: .8125rem;
    font-weight: 400;
}

.ehz-card__cta {
    margin: auto 1.15rem 1.15rem;
    padding-top: 1rem;
}

.ehz-card__cta .ehz-btn {
    display: block;
    text-align: center;
}

/* Only added when the theme does not ship it. */

.ehz-funnel .screen-reader-text,
.ehz-card .screen-reader-text {
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

@media (prefers-reduced-motion: reduce) {
    .ehz-chip,
    .ehz-option,
    .ehz-btn {
        transition: none;
    }
}
