/* ── Nodal Funnel — Frontend Styles ─────────────────────────── */



.nf-funnel {

    --nf-accent: #6FAF2D;

    --nf-radius: 12px;

    --nf-transition: 220ms ease;

    --nf-bg: #F7F9F6;

    --nf-bg-step: #F7F9F6;

    --nf-bg-option: #F7F9F6;

    --nf-bg-hover: #DDE9ED;

    --nf-bg-checked: #DDE9ED;

    --nf-bg-back: #DDE9ED;

    --nf-text: #2E2E2E;

    --nf-text-sub: #5A6A5A;

    --nf-text-back: #5A6A5A;

    --nf-border: #C8D8C8;



    /* Похідні від accent — генеруються автоматично через opacity */

    --nf-accent-bg: color-mix(in srgb, var(--nf-accent) 12%, white);

    --nf-accent-bg-checked: color-mix(in srgb, var(--nf-accent) 22%, white);

    --nf-accent-border: color-mix(in srgb, var(--nf-accent) 45%, white);

    --nf-accent-dark: color-mix(in srgb, var(--nf-accent) 70%, black);

    --nf-accent-text: color-mix(in srgb, var(--nf-accent) 60%, black);



    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    font-size: 15px;

    color: var(--nf-text);

    background: var(--nf-bg);

    max-width: 680px;

    margin: 0 auto;

    padding: 0 16px 48px;

    box-sizing: border-box;

}



.nf-funnel *,

.nf-funnel *::before,

.nf-funnel *::after {

    box-sizing: inherit;

}



/* ── Progress ────────────────────────────────────────────────── */



.nf-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 28px 0 24px;
    padding: 0 10px;
}



.nf-progress__track {

    flex: 1;

    height: 5px;

    background: var(--nf-border);

    border-radius: 99px;

    overflow: hidden;

}



.nf-progress__fill {

    height: 100%;

    width: 0%;

    background: var(--nf-accent);

    border-radius: 99px;

    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);

}



.nf-progress__pct {

    font-size: 12px;

    font-weight: 600;

    color: var(--nf-text-sub);

    min-width: 36px;

    text-align: right;

    font-variant-numeric: tabular-nums;

    flex-shrink: 0;

}



/* ── Calculator ──────────────────────────────────────────────── */



.nf-calc {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 12px;

    margin: 0 0 20px;

    padding: 11px 16px;

    background: var(--nf-bg-step);

    border: 1.5px solid var(--nf-accent);

    border-radius: 8px;

}



.nf-calc__label {

    display: flex;

    align-items: center;

    gap: 7px;

    font-size: 12px;

    font-weight: 600;

    color: var(--nf-text-sub);

    text-transform: uppercase;

    letter-spacing: .5px;

}



.nf-calc__label svg {

    width: 15px;

    height: 15px;

    flex-shrink: 0;

    color: var(--nf-accent);

}



.nf-calc__amount {

    font-size: 18px;

    font-weight: 700;

    color: var(--nf-accent);

    font-variant-numeric: tabular-nums;

}



/* ── Steps container ─────────────────────────────────────────── */



.nf-steps {

    position: relative;

    overflow: hidden;

}



/* ── Single step ─────────────────────────────────────────────── */



.nf-step {

    display: none;

}



.nf-step--active {

    display: block;

}



/* Slide animations */

.nf-step--animating {

    animation-duration: 260ms;

    animation-fill-mode: both;

    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);

}



@keyframes nfEnterRight {

    from { opacity: 0; transform: translateX(32px); }

    to   { opacity: 1; transform: translateX(0); }

}



@keyframes nfEnterLeft {

    from { opacity: 0; transform: translateX(-32px); }

    to   { opacity: 1; transform: translateX(0); }

}



@keyframes nfExitLeft {

    from { opacity: 1; transform: translateX(0); }

    to   { opacity: 0; transform: translateX(-32px); }

}



@keyframes nfExitRight {

    from { opacity: 1; transform: translateX(0); }

    to   { opacity: 0; transform: translateX(32px); }

}



.nf-step--enter-right { animation-name: nfEnterRight; }

.nf-step--enter-left  { animation-name: nfEnterLeft; }

.nf-step--exit-left   { animation-name: nfExitLeft;  pointer-events: none; }

.nf-step--exit-right  { animation-name: nfExitRight; pointer-events: none; }



/* ── Step image ──────────────────────────────────────────────── */



.nf-step__image {

    border-radius: var(--nf-radius);

    overflow: hidden;

    margin-bottom: 20px;

    line-height: 0;

}



.nf-step__image img {

    width: 100%;

    max-height: 320px;

    object-fit: cover;

    border-radius: var(--nf-radius);

}



/* ── Step header ─────────────────────────────────────────────── */



.nf-step__header {

    margin-bottom: 24px;

}



.nf-step__title {

    font-size: 22px;

    font-weight: 700;

    margin: 0 0 8px;

    line-height: 1.3;

    color: var(--nf-text);

}



.nf-step__title-link {

    color: inherit;

    text-decoration: none;

}



.nf-step__title-link:hover {

    color: var(--nf-accent);

}



.nf-step__description {

    color: var(--nf-text-sub);

    line-height: 1.6;

    margin: 0;

}



/* ── Blocks ──────────────────────────────────────────────────── */



.nf-step__blocks {

    display: flex;

    flex-direction: column;

    gap: 20px;

    margin-bottom: 28px;

}



.nf-block {

    border: 1px solid var(--nf-border);

    border-radius: var(--nf-radius);

    padding: 16px;

    background: var(--nf-bg-step);

    margin: 0;

    /* fieldset defaults to min-content width and would overflow .nf-steps */
    min-width: 0;

    transition: border-color var(--nf-transition);

}

/* Long unbreakable text (URLs, SKUs) must wrap instead of being clipped */
.nf-step__description,
.nf-block__desc,
.nf-option__title,
.nf-option__desc {
    overflow-wrap: anywhere;
}



.nf-block--invalid {

    border-color: #EF4444;

}



.nf-block__legend {

    display: flex;

    align-items: center;

    gap: 8px;

    padding: 0;

    font-size: inherit;

    border: none;

}



.nf-block__badge {

    font-size: 10px;

    font-weight: 700;

    letter-spacing: 0.5px;

    text-transform: uppercase;

    padding: 2px 8px;

    border-radius: 99px;

    flex-shrink: 0;

    background: var(--nf-accent-bg);

    color: var(--nf-accent-text);

}



.nf-block__title {

    font-weight: 600;

    font-size: 14px;

    flex: 1;

    width: fit-content;

    padding: 0 5px;

    background-color: var(--nf-accent);

    color: #fff;

}



.nf-block__desc {

    font-size: 13px;

    color: var(--nf-text-sub);

    margin: 0 0 12px;

    line-height: 1.5;

}



/* Group-level price badge */

.nf-block__price {

    display: inline-flex;

    align-items: center;

    gap: 4px;

    margin: 0 0 12px;

    font-size: 13px;

    font-weight: 700;

    color: var(--nf-accent-text);

    background: var(--nf-accent-bg);

    border: 1px solid var(--nf-accent-border);

    border-radius: 6px;

    padding: 4px 10px;

    white-space: nowrap;

}



.nf-block__price-tax {

    font-size: 11px;

    font-weight: 500;

    color: var(--nf-text-sub);

    font-style: italic;

}



.nf-required {

    color: #EF4444;

    margin-left: 2px;

}



.nf-block__error {

    font-size: 12px;

    color: #EF4444;

    margin: 8px 0 0;

    min-height: 1em;

}



/* ── Options ─────────────────────────────────────────────────── */



.nf-options {

    display: flex;

    flex-direction: column;

    gap: 8px;

}



.nf-option {

    display: flex;

    align-items: flex-start;

    gap: 12px;

    padding: 12px 14px;

    background: var(--nf-bg-option);

    border: 2px solid var(--nf-border);

    border-radius: 8px;

    cursor: pointer;

    transition:

        border-color var(--nf-transition),

        background var(--nf-transition),

        transform var(--nf-transition);

    user-select: none;

    position: relative;

}



.nf-option:hover {

    border-color: var(--nf-accent);

    background: var(--nf-bg-hover);

    transform: translateY(-1px);

}



.nf-option:has(input:checked) {

    border-color: var(--nf-accent);

    background: var(--nf-bg-checked);

}



.nf-option input[type='radio'],

.nf-option input[type='checkbox'] {

    position: absolute;

    opacity: 0;

    width: 0;

    height: 0;

    pointer-events: none;

}



/* Custom indicator dot/check */

.nf-option__indicator {

    flex-shrink: 0;

    width: 20px;

    height: 20px;

    border: 2px solid var(--nf-border);

    border-radius: 50%;

    background: var(--nf-bg);

    margin-top: 1px;

    transition:

        border-color var(--nf-transition),

        background var(--nf-transition);

    display: flex;

    align-items: center;

    justify-content: center;

}



.nf-block--checkbox .nf-option__indicator {

    border-radius: 5px;

}



.nf-option:has(input:checked) .nf-option__indicator {

    border-color: var(--nf-accent);

    background: var(--nf-accent);

}



/* Radio dot */

.nf-block--radio .nf-option:has(input:checked) .nf-option__indicator::after {

    content: '';

    display: block;

    width: 8px;

    height: 8px;

    border-radius: 50%;

    background: #fff;

}



/* Checkbox tick */

.nf-block--checkbox .nf-option:has(input:checked) .nf-option__indicator::after {

    content: '';

    display: block;

    width: 11px;

    height: 7px;

    border-left: 2.5px solid #fff;

    border-bottom: 2.5px solid #fff;

    transform: rotate(-45deg) translateY(-1px);

}



/* Option text */

.nf-option__body {

    display: flex;

    flex-direction: column;

    gap: 2px;

    flex: 1;

    min-width: 0;

}



.nf-option__title {

    font-weight: 500;

    line-height: 1.4;

    color: var(--nf-text);

}



.nf-option__desc {

    font-size: 12px;

    color: var(--nf-text-sub);

    line-height: 1.4;

}



/* Price badge */

.nf-option__price {

    display: inline-flex;

    align-items: center;

    gap: 4px;

    margin-top: 4px;

    font-size: 12px;

    font-weight: 600;

    color: var(--nf-accent-text);

    background: var(--nf-accent-bg);

    border: 1px solid var(--nf-accent-border);

    border-radius: 4px;

    padding: 2px 7px;

    white-space: nowrap;

    line-height: 1.4;

    width: fit-content;

}



.nf-option:has(input:checked) .nf-option__price {

    background: var(--nf-accent-bg-checked);

    border-color: var(--nf-accent);

}



.nf-option__tax {

    font-size: 10px;

    font-weight: 500;

    color: var(--nf-text-sub);

    font-style: italic;

}



/* ── Navigation ──────────────────────────────────────────────── */



.nf-nav {

    display: flex;

    justify-content: space-between;

    align-items: center;

    margin-top: 28px;

    gap: 12px;

}



.nf-nav__spacer {

    flex: 1;

}



.nf-btn {

    display: inline-flex;

    align-items: center;

    gap: 6px;

    padding: 11px 22px;

    border-radius: 8px;

    font-size: 14px;

    font-weight: 600;

    cursor: pointer;

    border: none;

    outline: none;

    transition:

        filter var(--nf-transition),

        transform var(--nf-transition),

        background var(--nf-transition);

    line-height: 1;

    font-family: inherit;

}



.nf-btn--next {

    background: var(--nf-accent);

    color: #fff;

    margin-left: auto;

}



.nf-btn--next:hover {

    filter: brightness(1.1);

    transform: translateY(-1px);

}



.nf-btn--next:active {

    filter: brightness(0.95);

    transform: translateY(0);

}



.nf-btn--back {

    background: var(--nf-bg-back);

    color: var(--nf-text-back);

}



.nf-btn--back:hover {

    background: var(--nf-border);

}



/* ── Form step (Fluent Forms) ────────────────────────────────── */



.nf-step__form {

    padding: 4px 0;

}



/* ── Done screen ─────────────────────────────────────────────── */



.nf-done {

    display: none;

    text-align: center;

    padding: 56px 24px;

}



.nf-done--visible {

    display: block;

    animation: nfEnterRight 300ms cubic-bezier(0.4, 0, 0.2, 1) both;

}



.nf-done__icon {

    width: 64px;

    height: 64px;

    color: var(--nf-accent);

    margin: 0 auto 20px;

}



.nf-done__icon svg {

    width: 100%;

    height: 100%;

}



.nf-done__title {

    font-size: 22px;

    font-weight: 700;

    margin: 0 0 8px;

    color: var(--nf-text);

}



.nf-done__text {

    color: var(--nf-text-sub);

    margin: 0;

    line-height: 1.6;

}



/* ── Notice ──────────────────────────────────────────────────── */



.nf-notice {

    padding: 12px 16px;

    background: #FEF3C7;

    border: 1px solid #FCD34D;

    border-radius: 8px;

    color: #92400E;

    font-size: 13px;

}



/* ── Responsive ──────────────────────────────────────────────── */



@media (max-width: 480px) {

    .nf-funnel {

        padding: 0;

    }



    .nf-step__title {

        font-size: 18px;

    }



    .nf-btn {

        padding: 10px 18px;

        font-size: 13px;

    }



    .nf-option {

        padding: 10px 12px;

    }

}