/* Booky AI · missed-call revenue estimator */
.roi-section {
    --roi-result-bg: color-mix(in srgb, var(--brand) 9%, var(--bg-card));
    --roi-track: var(--border-strong);
    --roi-focus: var(--brand);
    --roi-action-hover: var(--color-green-900);
    --roi-error-text: var(--color-error-dark);
    padding-block: clamp(3.5rem, 7vw, 6rem);
}


.roi-title {
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-size: clamp(2.25rem, 4.5vw, 3.75rem);
    font-weight: 650;
    letter-spacing: -0.04em;
    line-height: 1.08;
    margin: 0 0 clamp(2rem, 4vw, 3rem);
    max-width: 20ch;
    overflow-wrap: anywhere;
}

.roi-title > span { color: var(--brand); }

@media (max-width: 47.99rem) {
    .roi-title br { display: none; }
}

.roi-calculator {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    overflow: clip;
}

.roi-inputs { padding: clamp(1.25rem, 4vw, 2.75rem); }
.roi-inputs > h3 { color: var(--text-primary); font-family: var(--font-heading); font-size: 1.25rem; font-weight: 600; letter-spacing: -0.02em; margin: 0 0 2rem; }
.roi-field + .roi-field { margin-top: 1.5rem; }
.roi-field-heading { align-items: center; display: flex; gap: 0.75rem; justify-content: space-between; }
.roi-field-heading > label { color: var(--text-primary); font-size: 0.9375rem; font-weight: 500; line-height: 1.4; margin: 0; }
.roi-field-heading > label > span { color: var(--text-secondary); display: block; font-size: 0.75rem; font-weight: 400; margin-top: 0.125rem; }

.roi-number-wrap {
    align-items: center;
    background: var(--bg-page);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    display: flex;
    flex: 0 0 auto;
    font-size: 1rem;
    min-height: 2.75rem;
    padding-inline: 0.75rem;
    width: 6.5rem;
}

.roi-number-wrap > span { color: var(--text-secondary); }
.roi-number-wrap > input { appearance: textfield; background: transparent; border: 0; border-radius: var(--radius-md); color: inherit; font: inherit; font-variant-numeric: tabular-nums; font-weight: 600; min-height: 2.75rem; min-width: 0; outline: 0; padding: 0; text-align: right; width: 100%; }
.roi-number-wrap > input::-webkit-inner-spin-button, .roi-number-wrap > input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.roi-number-wrap > input:disabled { cursor: not-allowed; opacity: 0.5; }
.roi-number-wrap:focus-within { outline: 2px solid var(--roi-focus); outline-offset: 3px; }
.roi-number-wrap:has(input[aria-invalid="true"]) { border-color: var(--color-error); }
.roi-number-wrap--currency { gap: 0.375rem; width: 7.5rem; }
.roi-number-wrap--percent { gap: 0.25rem; }

.roi-range {
    --roi-progress: 0%;
    --roi-fill: linear-gradient(to right, var(--brand) 0%, var(--brand) var(--roi-progress), var(--roi-track) var(--roi-progress), var(--roi-track) 100%);
    appearance: none;
    background: transparent;
    cursor: pointer;
    display: block;
    height: 2.75rem;
    margin: 0.5rem 0 0;
    padding: 0;
    width: 100%;
}

.roi-range::-webkit-slider-runnable-track { background: var(--roi-fill); border-radius: var(--radius-full); height: 0.375rem; }
.roi-range::-moz-range-track { background: var(--roi-fill); border-radius: var(--radius-full); height: 0.375rem; }
.roi-range::-webkit-slider-thumb { -webkit-appearance: none; background: var(--brand-dark); border: 3px solid var(--bg-card); border-radius: 50%; box-shadow: var(--shadow-sm); height: 1.5rem; margin-top: -0.5625rem; width: 1.5rem; }
.roi-range::-moz-range-thumb { background: var(--brand-dark); border: 3px solid var(--bg-card); border-radius: 50%; box-shadow: var(--shadow-sm); box-sizing: border-box; height: 1.5rem; width: 1.5rem; }
.roi-range:focus-visible { border-radius: var(--radius-md); outline: 2px solid var(--roi-focus); outline-offset: 3px; }
.roi-range:disabled { cursor: not-allowed; opacity: 0.5; }

.roi-range-ends { color: var(--text-secondary); display: flex; font-size: 0.6875rem; justify-content: space-between; margin-top: -0.125rem; }
.roi-field-error { color: var(--roi-error-text); font-size: 0.75rem; line-height: 1.4; margin: 0.25rem 0 0; min-height: 1.05rem; }
.roi-field--assumption { border-top: 1px solid var(--border-default); padding-top: 1.5rem; }
.roi-field-help { color: var(--text-secondary); font-size: 0.75rem; line-height: 1.5; margin: 0; max-width: 40ch; }

.roi-result {
    background: var(--roi-result-bg);
    border-top: 1px solid var(--border-default);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
    padding: clamp(1.5rem, 4vw, 2.75rem);
}

.roi-result-summary > h3 { color: var(--text-primary); font-family: var(--font-heading); font-size: 1rem; font-weight: 500; margin: 0 0 1rem; }
.roi-money { color: var(--brand); display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 0.5rem; font-variant-numeric: tabular-nums; }
.roi-money > output { font-family: var(--font-heading); font-size: clamp(2rem, 4.8vw, 4rem); font-weight: 600; letter-spacing: -0.04em; line-height: 1.15; overflow-wrap: anywhere; }
.roi-money > span { color: var(--text-secondary); font-size: 0.875rem; white-space: nowrap; }
.roi-annual { color: var(--text-primary); font-size: 1rem; line-height: 1.5; margin: 0.5rem 0 0; }
.roi-annual > output { font-variant-numeric: tabular-nums; font-weight: 600; }
.roi-bookings { border-top: 1px solid var(--border-default); color: var(--text-secondary); font-size: 0.875rem; line-height: 1.5; margin: 1.5rem 0 0; padding-top: 1.25rem; }
.roi-result-footer { margin-top: 2.5rem; }
.roi-method { color: var(--text-secondary); font-size: 0.8125rem; }
.roi-method > summary { align-content: center; border-radius: var(--radius-sm); color: var(--text-primary); cursor: pointer; font-weight: 500; min-height: 2.75rem; }
.roi-method > summary:focus-visible { outline: 2px solid var(--roi-focus); outline-offset: 3px; }
.roi-method > p { font-size: 0.75rem; line-height: 1.6; margin: 0 0 1rem; max-width: 44ch; }
.roi-disclaimer { color: var(--text-secondary); font-size: 0.75rem; line-height: 1.5; margin: 0.5rem 0 1.5rem; max-width: 42ch; }
.roi-actions { align-items: center; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.roi-actions .roi-cta { background: var(--brand-dark); border-color: var(--brand-dark); color: var(--text-on-brand); gap: 1rem; min-height: 2.875rem; padding: 0.875rem 1.25rem; }
.roi-cta > svg { fill: none; height: 1rem; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; width: 1rem; }
.roi-plans { align-content: center; color: var(--text-primary); display: inline-block; font-size: 0.875rem; font-weight: 500; min-height: 2.75rem; text-decoration: underline !important; text-underline-offset: 0.25rem; white-space: nowrap; }
.roi-actions > a:focus-visible { outline: 2px solid var(--roi-focus); outline-offset: 3px; }
.roi-validation-note { color: var(--text-secondary); font-size: 0.75rem; line-height: 1.5; margin: 1rem 0 0; }
.roi-validation-note[hidden] { display: none; }
.roi-announcement { border: 0; clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; white-space: nowrap; width: 1px; }
.roi-noscript { color: var(--text-secondary); font-size: 0.875rem; margin-top: 1rem; }

@media (hover: hover) and (pointer: fine) {
    .roi-number-wrap:hover { border-color: var(--border-strong); }
    .roi-actions .roi-cta:hover { background: var(--roi-action-hover); border-color: var(--roi-action-hover); box-shadow: none; }
    .roi-plans:hover { color: var(--brand); }
}

@media (min-width: 62rem) {
    .roi-calculator { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); }
    .roi-result { border-left: 1px solid var(--border-default); border-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .roi-section .btn { transition: none; }
}

:is(.theme-dark, [data-theme="dark"], [data-bs-theme="dark"]) .roi-section {
    --roi-error-text: var(--color-error-light);
}
