/* Tvoros Skaičiuoklė — standalone calculator page styles.
   Design tokens map to the Figma frame "Titulinis" and subsequent steps. */

:root {
    --tvc-bg: #f1f5f9;
    --tvc-bg-overlay-top: rgba(15, 23, 42, 0.4);
    --tvc-bg-overlay-bottom: rgba(15, 23, 42, 0.8);
    --tvc-card-bg: rgba(249, 250, 251, 0.9);
    --tvc-card-border: #dee1e7;
    --tvc-text: #171a21;
    --tvc-text-muted: #565f71;
    --tvc-accent: #e2ff5e;
    --tvc-accent-text: #171a1f;
    --tvc-glow-orange: rgba(217, 119, 6, 0.1);
    --tvc-glow-blue: rgba(59, 130, 246, 0.05);
    --tvc-radius-card: 32px;
    --tvc-radius-pill: 999px;
    --tvc-radius-btn: 14px;
    --tvc-pill-bg: rgba(226, 255, 94, 0.1);
    --tvc-pill-border: rgba(226, 255, 94, 0.2);
    --tvc-dot-bg: #f3f4f7;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

.tv-calc-body {
    min-height: 100vh;
    background: var(--tvc-bg);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--tvc-text);
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
}

/* === Header strip === */
.tv-calc-topbar {
    height: 64px;
    backdrop-filter: blur(4px);
    background: rgba(249, 250, 251, 0.6);
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 1px solid transparent;
}

/* === Main stage ===
   Default: flat near-white (matches Step 1+).
   Intro screen opts in to the dark hero via .tv-calc-body--hero on <body>. */
.tv-calc-main {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: #f9fafb;
}

.tv-calc-body--hero .tv-calc-main {
    min-height: 1014px;
    background: linear-gradient(180deg, var(--tvc-bg-overlay-top), var(--tvc-bg-overlay-bottom)),
                radial-gradient(circle at 50% 30%, #475569, #1e293b);
}

/* === The glass card that holds each step === */
.tv-calc-card {
    width: min(896px, calc(100% - 64px));
    margin: 63px auto 0;
    min-height: 784px;
    padding: 80px 64px 80px;
    background: var(--tvc-card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--tvc-card-border);
    border-radius: var(--tvc-radius-card);
    position: relative;
    overflow: hidden;
}

.tv-calc-card::before,
.tv-calc-card::after {
    content: '';
    position: absolute;
    width: 384px;
    height: 384px;
    border-radius: 50%;
    filter: blur(64px);
    pointer-events: none;
}

.tv-calc-card::before {
    background: var(--tvc-glow-orange);
    top: -160px;
    right: -100px;
}

.tv-calc-card::after {
    background: var(--tvc-glow-blue);
    bottom: -160px;
    left: -160px;
}

.tv-calc-card-inner {
    position: relative;
    z-index: 1;
}

/* === Intro screen (Titulinis) === */
.tv-calc-intro {
    text-align: center;
}

.tv-calc-pill {
    display: inline-flex;
    align-items: center;
    height: 38px;
    padding: 0 24px;
    border-radius: var(--tvc-radius-pill);
    background: var(--tvc-pill-bg);
    border: 1px solid var(--tvc-pill-border);
    font: 700 14px/20px 'Inter', sans-serif;
    letter-spacing: 0.35px;
    text-transform: uppercase;
    color: var(--tvc-text);
}

.tv-calc-h1 {
    font-family: 'Manrope', sans-serif;
    font-weight: 800;
    font-size: 72px;
    line-height: 72px;
    letter-spacing: -1.8px;
    margin: 40px 0 0;
    color: var(--tvc-text);
}

.tv-calc-h1-sub {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 72px;
    line-height: 72px;
    letter-spacing: -1.8px;
    margin: 8px 0 0;
    color: var(--tvc-text-muted);
}

.tv-calc-lead {
    font-family: 'Manrope', sans-serif;
    font-weight: 500;
    font-size: 24px;
    line-height: 32px;
    color: var(--tvc-text-muted);
    margin: 32px auto 0;
    max-width: 595px;
}

.tv-calc-trust {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-top: 48px;
    font: 500 14px/20px 'Inter', sans-serif;
    color: var(--tvc-text);
}

.tv-calc-trust-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.tv-calc-trust-sep {
    width: 6px;
    height: 6px;
    border-radius: 3px;
    background: var(--tvc-card-border);
}

.tv-calc-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    height: 80px;
    padding: 0 36px;
    margin-top: 56px;
    background: var(--tvc-accent);
    color: var(--tvc-accent-text);
    border: none;
    border-radius: var(--tvc-radius-btn);
    font: 700 24px/32px 'Inter', sans-serif;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.1s ease, box-shadow 0.2s ease;
}

.tv-calc-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.tv-calc-cta:active {
    transform: translateY(0);
}

.tv-calc-cta-caption {
    margin-top: 16px;
    font: 400 14px/20px 'Inter', sans-serif;
    color: var(--tvc-text-muted);
}

/* === Back button (color/params/payment steps only) ===
   Absolutely positioned in the top-right of .tv-calc-main, sitting at the same
   vertical level as the step header. Plain text + back-arrow glyph, no chrome. */
.tv-calc-back {
    position: absolute;
    top: 105px;
    right: 420px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    padding: 5px 8px;
    color: var(--tvc-text);
    font: 500 13px/19px 'Inter', sans-serif;
    cursor: pointer;
    z-index: 10;
    border-radius: 6px;
    transition: background 0.12s ease;
}

.tv-calc-back svg       { width: 13px; height: 13px; color: var(--tvc-text-muted); }
.tv-calc-back:hover     { background: rgba(15, 23, 42, 0.04); }
.tv-calc-back:focus     { outline: 2px solid var(--tvc-accent); outline-offset: 2px; }

@media (max-width: 720px) {
    .tv-calc-back {
        top: 12px;
        right: 12px;
        padding: 4px 8px;
        font-size: 12px;
        line-height: 18px;
    }
    .tv-calc-back svg { width: 12px; height: 12px; }
}

/* === Step indicator ===
   Default: in-flow, centered, sits below whatever the current step rendered.
   On the intro hero only (.tv-calc-body--hero) we restore the original floating
   behaviour so the pill sits over the dark gradient like in the Figma. */
.tv-calc-steps {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 26px;
    background: rgba(249, 250, 251, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid var(--tvc-card-border);
    border-radius: var(--tvc-radius-pill);
    width: fit-content;
    margin: 32px auto 64px;
}

.tv-calc-body--hero .tv-calc-steps {
    position: absolute;
    left: 50%;
    bottom: 64px;
    transform: translateX(-50%);
    margin: 0;
    z-index: 5;
}

.tv-calc-step-dot {
    width: 12px;
    height: 12px;
    border-radius: 6px;
    background: var(--tvc-dot-bg);
    transition: background 0.2s ease, transform 0.2s ease;
}

.tv-calc-step-dot.is-active {
    width: 15px;
    height: 15px;
    background: var(--tvc-accent);
}

/* === Footer === */
.tv-calc-footer {
    background: rgba(249, 250, 251, 0.95);
    border-top: 1px solid var(--tvc-card-border);
    padding: 33px 24px 32px;
    text-align: center;
}

.tv-calc-footer-inner {
    max-width: 720px;
    margin: 0 auto;
}

.tv-calc-footer-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 5px;
    background: var(--tvc-text-muted);
    color: #fff;
    vertical-align: middle;
    margin-right: 8px;
}

.tv-calc-footer-name {
    font: 700 15px/15px 'Manrope', sans-serif;
    color: var(--tvc-text-muted);
}

.tv-calc-footer-copy {
    margin: 16px 0 0;
    font: 400 14px/20px 'Inter', sans-serif;
    color: var(--tvc-text-muted);
}

/* === Step header (Step 1+) === */
.tv-calc-card--wide {
    width: min(1216px, calc(100% - 64px));
    padding: 64px 48px;
}

/* Plain step: no glass card, just content on the white page background */
.tv-calc-step--plain {
    width: min(1216px, calc(100% - 64px));
    margin: 0 auto;
    padding: 142px 0 80px;
}

.tv-calc-step-header {
    text-align: center;
    margin-bottom: 48px;
}

.tv-calc-step-title {
    font-family: 'Manrope', sans-serif;
    font-weight: 800;
    font-size: 36px;
    line-height: 40px;
    letter-spacing: -0.9px;
    color: var(--tvc-text);
    margin: 0;
}

.tv-calc-step-sub {
    margin: 8px auto 0;
    font: 400 18px/28px 'Inter', sans-serif;
    color: var(--tvc-text-muted);
    max-width: 600px;
}

/* === Step 1: fence type picker === */
.tv-calc-types {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 24px;
}

/* 2-card layout (current Step 1) — centered, larger cards */
.tv-calc-types--two {
    grid-template-columns: repeat(2, minmax(0, 340px));
    justify-content: center;
    gap: 32px;
    margin-top: 48px;
}

.tv-calc-type-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    background: #fff;
    border: 1px solid var(--tvc-card-border);
    border-radius: 16px;
    overflow: visible; /* allow Populiariausia badge to overflow top */
    cursor: pointer;
    text-align: center;
    color: var(--tvc-text);
    transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.2s ease;
    font-family: inherit;
}

.tv-calc-type-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
    border-color: #b8c0cc;
}

.tv-calc-type-card.is-popular {
    border: 2px solid #c5e62b;
}

.tv-calc-type-card.is-selected {
    border-color: var(--tvc-text);
    box-shadow: 0 0 0 3px var(--tvc-accent) inset, 0 12px 30px rgba(15, 23, 42, 0.15);
}

.tv-calc-type-card:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--tvc-accent);
}

.tv-calc-type-title {
    display: block;
    padding: 24px 16px 20px;
    font: 700 18px/24px 'Manrope', sans-serif;
}

.tv-calc-type-img {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 318 / 220;
    background: #f5f7fb;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
}

.tv-calc-type-img-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Obvious "drop image here" placeholder shown until a featured image exists */
.tv-calc-type-img-dropzone {
    position: absolute;
    inset: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 2px dashed #c5cbd6;
    border-radius: 10px;
    background: repeating-linear-gradient(
        45deg,
        #fafbfd,
        #fafbfd 8px,
        #f1f3f7 8px,
        #f1f3f7 16px
    );
    color: var(--tvc-text-muted);
    text-align: center;
    padding: 16px;
}

.tv-calc-type-img-dropzone-title {
    font: 700 14px/20px 'Inter', sans-serif;
    color: var(--tvc-text);
}

.tv-calc-type-img-dropzone-hint {
    font: 400 12px/16px 'Inter', sans-serif;
    color: var(--tvc-text-muted);
}

.tv-calc-type-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
    padding: 24px 16px 12px;
}

.tv-calc-type-price-from {
    font: 400 14px/20px 'Inter', sans-serif;
    color: var(--tvc-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tv-calc-type-price-num {
    font: 700 32px/36px 'Manrope', sans-serif;
    color: var(--tvc-text);
}

.tv-calc-type-price-unit {
    font: 500 16px/24px 'Inter', sans-serif;
    color: var(--tvc-text);
}

.tv-calc-type-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 8px 16px 18px;
    color: var(--tvc-text-muted);
}

.tv-calc-type-meta-icon {
    color: var(--tvc-text);
}

.tv-calc-type-card.is-popular .tv-calc-type-meta-icon {
    color: var(--tvc-text-muted);
}

.tv-calc-type-meta-dots {
    display: inline-flex;
    gap: 6px;
}

.tv-calc-type-meta-dots .dot {
    width: 12px;
    height: 8px;
    border-radius: 4px;
    background: var(--tvc-card-border);
}

.tv-calc-type-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 14px;
    background: var(--tvc-accent);
    color: var(--tvc-accent-text);
    font: 700 12px/16px 'Inter', sans-serif;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    border-radius: var(--tvc-radius-pill);
    z-index: 3;
    white-space: nowrap;
}

/* === Step 2: color picker === */
.tv-calc-colors {
    display: grid;
    justify-content: center;
    gap: 24px;
    margin-top: 24px;
}

.tv-calc-color-card .tv-calc-color-img-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tv-calc-color-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 16px 16px 6px;
    background: #f9fafb;
}

.tv-calc-color-label-name {
    font: 500 14px/20px 'Inter', sans-serif;
    color: var(--tvc-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.7px;
}

.tv-calc-color-label-code {
    font: 500 16px/24px 'Inter', sans-serif;
    color: var(--tvc-text);
}

.tv-calc-type-meta-dots .dot.is-filled {
    background: rgba(23, 26, 33, 0.8);
}

/* Mobile: collapse colors into a single column */
@media (max-width: 800px) {
    .tv-calc-colors {
        grid-template-columns: minmax(0, 320px) !important;
    }
}

/* === Step 3: params (Patikslinkite parametrus) === */
.tv-calc-step--params { padding-top: 101px; }

.tv-calc-params-grid {
    display: grid;
    grid-template-columns: 748px 420px;
    gap: 48px;
    justify-content: center;
    align-items: start;
    margin-top: 40px;
}

.tv-calc-params-form {
    background: #f9fafb;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 32px;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.25);
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.tv-calc-field { display: flex; flex-direction: column; gap: 16px; }

.tv-calc-field-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.tv-calc-field-label {
    font: 700 20px/28px 'Manrope', sans-serif;
    letter-spacing: -0.5px;
    color: rgba(23, 26, 33, 0.9);
}

.tv-calc-field-input {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.tv-calc-textbox {
    width: 94px;
    height: 50px;
    padding: 0 12px;
    text-align: center;
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid rgba(222, 225, 231, 0.6);
    border-radius: 14px;
    font: 700 18px/22px 'Manrope', sans-serif;
    color: var(--tvc-text);
    backdrop-filter: blur(2px);
}

.tv-calc-textbox::-webkit-outer-spin-button,
.tv-calc-textbox::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.tv-calc-field-unit {
    font: 500 18px/28px 'Inter', sans-serif;
    color: var(--tvc-text-muted);
}

/* Range slider — track with two-tone fill driven by --pct (set inline). */
.tv-calc-slider-wrap { padding: 9px 0; }

.tv-calc-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 14px;
    border-radius: 7px;
    background: linear-gradient(
        to right,
        var(--tvc-accent) 0%,
        var(--tvc-accent) var(--pct, 0%),
        #f3f4f7 var(--pct, 0%),
        #ffffff 100%
    );
    border: 1px solid rgba(222, 225, 231, 0.5);
    cursor: pointer;
    outline: none;
}

.tv-calc-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff;
    border: 4px solid var(--tvc-accent);
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.15);
    cursor: grab;
    margin-top: -10px;
}

.tv-calc-slider::-moz-range-thumb {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff;
    border: 4px solid var(--tvc-accent);
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.15);
    cursor: grab;
}

/* Stulpai toggle */
.tv-calc-toggle {
    display: inline-flex;
    padding: 7px;
    background: rgba(244, 245, 246, 0.3);
    border: 1px solid rgba(222, 224, 227, 0.5);
    border-radius: 14px;
    gap: 4px;
    align-self: flex-start;
}

.tv-calc-toggle-btn {
    height: 44px;
    padding: 0 28px;
    background: transparent;
    color: var(--tvc-text);
    border: none;
    border-radius: 10px;
    font: 700 14px/22px 'Manrope', sans-serif;
    cursor: pointer;
    transition: background 0.1s ease;
}

.tv-calc-toggle-btn.is-active {
    background: var(--tvc-accent);
    border: 1px solid #565d6d;
    border-radius: 70px;
}

/* Mount cards (Betonuojami / Ankeruojami) */
.tv-calc-post-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.tv-calc-post-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: #f7f9fa;
    border: 1px solid #ebedef;
    border-radius: 13px;
    cursor: pointer;
    text-align: left;
    color: var(--tvc-text);
    font: inherit;
    transition: border-color 0.15s ease;
}

.tv-calc-post-card.is-selected {
    border-color: #6e6e6e;
    border-width: 1px;
}

.tv-calc-post-check {
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    border-radius: 3px;
    background: #fff;
    border: 1px solid #717478;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tvc-accent-text);
    margin-top: 3px;
}

.tv-calc-post-card.is-selected .tv-calc-post-check {
    background: var(--tvc-accent);
    border-color: #565d6d;
}

.tv-calc-post-text { display: flex; flex-direction: column; gap: 4px; }

.tv-calc-post-title {
    font: 700 13px/14px 'Inter', sans-serif;
    color: var(--tvc-text);
}

.tv-calc-post-sub {
    font: 500 11px/17px 'Inter', sans-serif;
    color: rgba(23, 26, 33, 0.6);
}

/* Live price card (right column) */
.tv-calc-price-card {
    width: 420px;
    border-radius: 32px;
    overflow: hidden;
    background: var(--tvc-accent);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.tv-calc-price-card-top {
    padding: 32px;
    color: var(--tvc-text);
}

.tv-calc-price-card-head {
    margin: 0 0 16px;
    font: 600 20px/28px 'Manrope', sans-serif;
    color: rgba(23, 26, 31, 0.8);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    opacity: 0.9;
}

.tv-calc-price-card-value {
    margin: 0;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.tv-calc-price-card-num {
    font: 800 72px/72px 'Manrope', sans-serif;
    letter-spacing: -3.6px;
    color: var(--tvc-accent-text);
}

.tv-calc-price-card-cur {
    font: 700 36px/40px 'Manrope', sans-serif;
    color: var(--tvc-accent-text);
    opacity: 0.8;
}

.tv-calc-price-card-error {
    margin: 12px 0 0;
    font: 500 14px/20px 'Inter', sans-serif;
    color: #7a1f1f;
    background: rgba(255, 255, 255, 0.5);
    padding: 8px 12px;
    border-radius: 8px;
}

.tv-calc-price-card-bot {
    background: rgba(243, 244, 246, 0.91);
    backdrop-filter: blur(6px);
    padding: 28px 24px;
}

.tv-calc-price-cta {
    width: 100%;
    height: 72px;
    background: #fff;
    color: var(--tvc-text);
    border: none;
    border-radius: 14px;
    font: 700 24px/36px 'Manrope', sans-serif;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: transform 0.1s ease, box-shadow 0.2s ease;
}

.tv-calc-price-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.tv-calc-price-cta[disabled] {
    opacity: 0.5;
    cursor: wait;
    transform: none;
    box-shadow: none;
}

/* === Segmentinė: side-by-side two-field row (height + thickness) === */
.tv-calc-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

/* === Segmented button row (height_mm + thickness) === */
.tv-calc-seg-row {
    display: inline-flex;
    gap: 12px;
    flex-wrap: wrap;
}

.tv-calc-seg-btn {
    height: 45px;
    min-width: 114px;
    padding: 0 18px;
    background: #fdfdfd;
    color: var(--tvc-text);
    border: 1px solid #e9ebef;
    border-radius: 14px;
    font: 700 16px/22px 'Manrope', sans-serif;
    cursor: pointer;
    transition: background 0.1s ease, border-color 0.1s ease;
}

.tv-calc-seg-btn.is-active {
    background: var(--tvc-accent);
    border: 1px solid #565d6d;
}

/* === Komplektacija checkbox cards === */
.tv-calc-kompl-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.tv-calc-kompl-item {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    height: 50px;
    padding: 0 18px;
    background: #fdfdfd;
    border: 1px solid #e9ebef;
    border-radius: 14px;
    cursor: pointer;
    user-select: none;
    transition: border-color 0.1s ease;
}

.tv-calc-kompl-item.is-checked { border-color: #565d6d; }

.tv-calc-kompl-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.tv-calc-kompl-check {
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    border-radius: 3px;
    background: #fff;
    border: 1px solid #717478;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--tvc-accent-text);
}

.tv-calc-kompl-item.is-checked .tv-calc-kompl-check {
    background: var(--tvc-accent);
    border-color: #565d6d;
}

.tv-calc-kompl-label {
    font: 700 14px/14px 'Manrope', sans-serif;
    color: var(--tvc-text);
}

/* === Summary table (Komplektacijos suvestinė) === */
.tv-calc-summary {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tv-calc-summary-block {
    background: #fefefe;
    border: 1px solid #f1f1f2;
    border-radius: 14px;
    padding: 18px 24px;
    display: flex;
    flex-direction: column;
}

.tv-calc-summary-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 24px;
    padding: 8px 0;
    border-bottom: 1px solid #f3f3f4;
}

/* Label-only row variant (Rombas table) — collapses to a single column,
   no qty/total slots. The qty (if any) is rendered inline next to the label. */
.tv-calc-summary-row--label-only {
    grid-template-columns: 1fr;
    gap: 0;
}

.tv-calc-summary-qty-inline {
    color: var(--tvc-text-muted);
    font-weight: 400;
    margin-left: 6px;
    font-size: 13px;
}

.tv-calc-summary-row:last-child { border-bottom: none; }

.tv-calc-summary-label {
    font: 700 14px/16px 'Manrope', sans-serif;
    color: var(--tvc-text);
}

.tv-calc-summary-qty {
    font: 400 13px/17px 'Manrope', sans-serif;
    color: var(--tvc-text);
    text-align: right;
    min-width: 88px;
}

.tv-calc-summary-total {
    font: 400 13px/17px 'Manrope', sans-serif;
    color: var(--tvc-text);
    text-align: right;
    min-width: 60px;
}

.tv-calc-summary-empty {
    background: #fefefe;
    border: 1px dashed #e5e7eb;
    border-radius: 14px;
    padding: 24px;
    text-align: center;
    font: 400 14px/20px 'Inter', sans-serif;
    color: var(--tvc-text-muted);
}

/* === Step 4: Apmokėjimas (payment) ===
   Two columns: yellow-green summary card (left) + checkout form (right). */
.tv-calc-step--payment { padding-top: 80px; }

.tv-calc-pay-grid {
    display: grid;
    grid-template-columns: 434px 623px;
    gap: 95px;
    justify-content: center;
    align-items: start;
}

/* --- Left: order summary --- */
.tv-calc-pay-summary {
    background: #e7fe7d;
    border: 1px solid rgba(226, 126, 54, 0.1);
    border-radius: 28px;
    padding: 40px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.07);
    color: #1e1a15;
    position: sticky;
    top: 80px;
}

.tv-calc-pay-summary-title {
    margin: 0 0 24px;
    font: 500 24px/32px 'Inter', sans-serif;
    letter-spacing: -0.6px;
}

.tv-calc-pay-line {
    display: flex;
    gap: 20px;
}

.tv-calc-pay-thumb {
    position: relative;
    width: 96px;
    height: 96px;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(229, 224, 220, 0.5);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.07);
    flex-shrink: 0;
}

.tv-calc-pay-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tv-calc-pay-thumb-badge {
    position: absolute;
    top: 8px;
    left: 27px;
    height: 26px;
    padding: 0 9px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(229, 224, 220, 0.5);
    border-radius: 10px;
    backdrop-filter: blur(2px);
    font: 500 12px/26px 'Inter', sans-serif;
    color: #1e1a15;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.07);
}

.tv-calc-pay-line-body { flex: 1; }
.tv-calc-pay-line-name { margin: 0; font: 500 18px/23px 'Inter', sans-serif; color: #1e1a15; }
.tv-calc-pay-line-spec { margin: 6px 0 0; font: 400 14px/20px 'Inter', sans-serif; color: #9f9184; }
.tv-calc-pay-line-price { margin: 8px 0 0; font: 500 16px/24px 'Inter', sans-serif; color: #171a1f; }

.tv-calc-pay-divider {
    height: 1px;
    background: #1e1a15;
    opacity: 0.1;
    margin: 32px 0;
}

.tv-calc-pay-rows {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tv-calc-pay-row {
    display: flex;
    justify-content: space-between;
    font: 400 15px/23px 'Inter', sans-serif;
}

.tv-calc-pay-row > :first-child { color: #9f9184; }
.tv-calc-pay-row > :last-child  { color: #1e1a15; font-weight: 500; }

.tv-calc-pay-total {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.tv-calc-pay-total-label { margin: 0; font: 500 18px/28px 'Inter', sans-serif; color: #1e1a15; }
.tv-calc-pay-total-pvm   { margin: 0; font: 400 14px/20px 'Inter', sans-serif; color: #9f9184; }
.tv-calc-pay-total-amount {
    margin: 0;
    font: 700 42px/42px 'Inter', sans-serif;
    color: #1e1a15;
    text-align: right;
    letter-spacing: -1px;
}

.tv-calc-pay-secure {
    margin-top: 32px;
    padding: 14px 16px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(226, 126, 54, 0.05);
    border-radius: 14px;
}

.tv-calc-pay-secure svg { flex-shrink: 0; color: #1e1a15; }

.tv-calc-pay-secure p {
    margin: 0;
    font: 400 14px/23px 'Inter', sans-serif;
    color: #9f9184;
}

/* --- Right: form --- */
.tv-calc-pay-form {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.tv-calc-pay-title {
    margin: 0;
    font: 700 36px/40px 'Inter', sans-serif;
    color: #1e1a15;
    letter-spacing: -0.9px;
}

.tv-calc-pay-sub {
    margin: 0;
    font: 400 18px/28px 'Inter', sans-serif;
    color: #9f9184;
}

.tv-calc-pay-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tv-calc-pay-section-head {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tv-calc-pay-section-num {
    width: 24px;
    height: 24px;
    border-radius: 12px;
    background: rgba(231, 254, 125, 0.1);
    color: #1e1a15;
    font: 500 14px/24px 'Inter', sans-serif;
    text-align: center;
}

.tv-calc-pay-section-title {
    margin: 0;
    font: 500 20px/28px 'Inter', sans-serif;
    color: #1e1a15;
}

.tv-calc-pay-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tv-calc-pay-field-label {
    font: 500 14px/22px 'Inter', sans-serif;
    color: #1e1a15;
}

.tv-calc-pay-field-hint {
    color: #9f9184;
    font-weight: 400;
}

.tv-calc-pay-input {
    height: 48px;
    padding: 0 16px;
    background: rgba(251, 250, 249, 0.5);
    border: 1px solid #e5e0dc;
    border-radius: 14px;
    font: 400 14px/22px 'Inter', sans-serif;
    color: #1e1a15;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.1s, box-shadow 0.1s;
}

.tv-calc-pay-input::placeholder { color: #9f9184; }

.tv-calc-pay-input:focus {
    outline: none;
    border-color: #1e1a15;
    box-shadow: 0 0 0 3px rgba(231, 254, 125, 0.4);
}

.tv-calc-pay-select { appearance: none; padding-right: 36px; cursor: pointer; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231e1a15' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>"); background-repeat: no-repeat; background-position: right 14px center; background-size: 16px; }

.tv-calc-pay-row-two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.tv-calc-pay-error {
    margin: 4px 0 0;
    padding: 10px 14px;
    background: #fdecec;
    border: 1px solid #f3c4c4;
    color: #7a1f1f;
    border-radius: 10px;
    font: 500 14px/20px 'Inter', sans-serif;
    text-align: center;
}

/* === Step 4 field-level validation === */
.tv-calc-pay-req {
    color: #c63d3d;
    font-weight: 700;
    margin-left: 2px;
}

.tv-calc-pay-field.has-error .tv-calc-pay-input,
.tv-calc-pay-field.has-error .tv-calc-pay-select {
    border-color: #c63d3d;
    background: rgba(198, 61, 61, 0.04);
}

.tv-calc-pay-field.has-error .tv-calc-pay-input:focus,
.tv-calc-pay-field.has-error .tv-calc-pay-select:focus {
    box-shadow: 0 0 0 3px rgba(198, 61, 61, 0.18);
    border-color: #c63d3d;
}

.tv-calc-pay-field-error {
    margin: 6px 0 0;
    font: 500 12px/16px 'Inter', sans-serif;
    color: #c63d3d;
}

.tv-calc-pay-submit {
    height: 64px;
    background: var(--tvc-accent);
    color: #3a4838;
    border: none;
    border-radius: 14px;
    font: 500 20px/30px 'Inter', sans-serif;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 16px;
    box-shadow: 0 2px 4px rgba(226, 126, 54, 0.25);
    transition: transform 0.1s, box-shadow 0.2s;
}

.tv-calc-pay-submit:hover { transform: translateY(-1px); box-shadow: 0 8px 16px rgba(226, 126, 54, 0.2); }
.tv-calc-pay-submit[disabled] { opacity: 0.6; cursor: wait; transform: none; }

.tv-calc-pay-terms {
    margin: 0;
    text-align: center;
    font: 400 14px/22px 'Inter', sans-serif;
    color: #9f9184;
}

.tv-calc-pay-terms a {
    color: #3a4838;
    text-decoration: underline;
}

.tv-calc-pay-trust {
    display: flex;
    gap: 14px;
    justify-content: center;
    padding-top: 16px;
    border-top: 1px solid #e5e0dc;
    margin-top: 8px;
}

.tv-calc-pay-trust-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 34px;
    padding: 0 14px;
    background: #fbfaf9;
    border: 1px solid rgba(229, 224, 220, 0.5);
    border-radius: 10px;
    font: 500 14px/20px 'Inter', sans-serif;
    color: #9f9184;
}

.tv-calc-pay-trust-item svg { opacity: 0.8; }

/* === Step 5: Užsakymas priimtas (post-OPay success) === */
.tv-calc-step--success {
    position: relative;
    padding-top: 135px;
    padding-bottom: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Soft orange glow behind the card (matches Figma blur-100 disc at 5% opacity). */
.tv-calc-success-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: rgba(217, 119, 6, 0.05);
    filter: blur(100px);
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 0;
}

.tv-calc-success-card {
    position: relative;
    width: min(448px, 100% - 32px);
    background: #fff;
    border: 1px solid var(--tvc-card-border);
    border-radius: 14px;
    padding: 48px 48px 36px;
    text-align: center;
    z-index: 1;
    overflow: hidden;
}

.tv-calc-success-strip {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: var(--tvc-accent);
}

/* Concentric soft-rings + green check, centered above the headline. */
.tv-calc-success-check {
    position: relative;
    width: 144px;
    height: 144px;
    margin: 0 auto 24px;
}

.tv-calc-success-check-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.tv-calc-success-check-ring--outer {
    width: 144px;
    height: 144px;
    background: rgba(226, 255, 94, 0.1);
}

.tv-calc-success-check-ring--mid {
    width: 106px;
    height: 106px;
    background: rgba(156, 195, 89, 0.2);
}

.tv-calc-success-check-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 96px;
    height: 96px;
    transform: translate(-50%, -50%);
    background: rgba(231, 254, 125, 0.69);
    border: 1px solid rgba(231, 254, 125, 0.3);
    border-radius: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tvc-text);
}

.tv-calc-success-title {
    margin: 0;
    font-family: 'Manrope', sans-serif;
    font-weight: 800;
    font-size: 30px;
    line-height: 36px;
    letter-spacing: -0.75px;
    color: var(--tvc-text);
}

.tv-calc-success-sub {
    margin: 12px 0 32px;
    font: 400 18px/28px 'Inter', sans-serif;
    color: var(--tvc-text-muted);
}

.tv-calc-success-btn {
    width: 100%;
    height: 58px;
    background: #fff;
    border: 1px solid var(--tvc-card-border);
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 24px;
    color: var(--tvc-text);
    font: 500 16px/24px 'Inter', sans-serif;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.tv-calc-success-btn:hover:not([disabled]) {
    background: #f9fafb;
    border-color: #b8c0cc;
}

.tv-calc-success-btn[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
}

.tv-calc-success-btn svg:last-child {
    opacity: 0.6;
    margin-left: auto;
}

.tv-calc-success-back {
    margin-top: 16px;
    width: 100%;
    height: 48px;
    background: transparent;
    border: none;
    color: var(--tvc-text-muted);
    font: 500 16px/26px 'Inter', sans-serif;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tv-calc-success-back:hover { color: var(--tvc-text); }

.tv-calc-success-help {
    margin: 64px 0 0;
    font: 400 14px/22px 'Inter', sans-serif;
    color: rgba(86, 95, 113, 0.6);
    text-align: center;
}

@media (max-width: 560px) {
    .tv-calc-step--success { padding-top: 64px; padding-bottom: 80px; }
    .tv-calc-success-card { padding: 36px 28px 28px; }
    .tv-calc-success-title { font-size: 24px; line-height: 30px; }
    .tv-calc-success-sub { font-size: 16px; line-height: 24px; }
    .tv-calc-success-help { margin-top: 32px; }
}

/* Mobile: stack form + price card vertically */
@media (max-width: 1100px) {
    .tv-calc-params-grid { grid-template-columns: minmax(0, 748px); }
    .tv-calc-price-card { width: 100%; }

    .tv-calc-pay-grid { grid-template-columns: minmax(0, 623px); gap: 24px; }
    .tv-calc-pay-summary { position: static; }
}

@media (max-width: 720px) {
    .tv-calc-pay-grid { grid-template-columns: 1fr; }
    .tv-calc-pay-summary, .tv-calc-pay-form { padding: 0; }
    .tv-calc-pay-summary { padding: 28px; }
    .tv-calc-pay-row-two { grid-template-columns: 1fr; gap: 16px; }
    .tv-calc-pay-title { font-size: 28px; line-height: 32px; }
    .tv-calc-pay-total-amount { font-size: 32px; line-height: 36px; }
}

@media (max-width: 720px) {
    .tv-calc-pair { grid-template-columns: 1fr; gap: 16px; }
    .tv-calc-kompl-grid { grid-template-columns: 1fr 1fr; }
    .tv-calc-seg-row { gap: 8px; }
    .tv-calc-seg-btn { min-width: 0; flex: 1; }
}

@media (max-width: 720px) {
    .tv-calc-params-form { padding: 24px; border-radius: 20px; }
    .tv-calc-price-card-num { font-size: 56px; line-height: 56px; }
    .tv-calc-post-cards { grid-template-columns: 1fr; }
}

/* === Step-level action bar === */
.tv-calc-step-actions {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.tv-calc-cta--md {
    height: 64px;
    font-size: 20px;
    padding: 0 32px;
}

.tv-calc-cta[disabled] {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* === Responsive === */
@media (max-width: 960px) {
    .tv-calc-card,
    .tv-calc-card--wide { padding: 48px 24px; min-height: 0; width: calc(100% - 32px); }
    .tv-calc-h1, .tv-calc-h1-sub { font-size: 44px; line-height: 48px; }
    .tv-calc-lead { font-size: 18px; line-height: 26px; }
    .tv-calc-cta { height: 64px; font-size: 18px; padding: 0 24px; }
    .tv-calc-trust { flex-wrap: wrap; gap: 12px 18px; }
    .tv-calc-main { min-height: 0; padding-bottom: 120px; }
    .tv-calc-body--hero .tv-calc-steps { bottom: 24px; }
    .tv-calc-steps { margin: 24px auto 48px; }
    .tv-calc-types { grid-template-columns: repeat(2, 1fr); }
    .tv-calc-types--two { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
    .tv-calc-step-title { font-size: 26px; line-height: 32px; }
}

@media (max-width: 560px) {
    .tv-calc-types,
    .tv-calc-types--two { grid-template-columns: 1fr; }
    .tv-calc-types--two { max-width: 360px; margin-left: auto; margin-right: auto; }
}
