/**
 * TechnoBoost Estimation v8 — Immersive Full-Viewport UI
 * Full-screen split layout, dynamic visualizations, zero scroll
 */

/* ===== Variables ===== */
:root {
    --tb-primary: #006571;
    --tb-accent: #00e3fd;
    --tb-bg: #f5f7f9;
    --tb-white: #ffffff;
    --tb-text: #2c2f31;
    --tb-text2: #595c5e;
    --tb-muted: #abadaf;
    --tb-border: rgba(171,173,175,0.18);
    --tb-green: #10b981;
    --tb-cyan: #00e3fd;
    --tb-blue: #006571;
    --tb-indigo: #006571;
    --tb-glow: rgba(0,101,113,0.12);
    --tb-font: 'Inter', system-ui, sans-serif;
    --tb-font-h: 'Space Grotesk', sans-serif;
    --tb-r: 12px;
    --tb-r-lg: 20px;
}

/* Kill WP/Hestia chrome — aggressive approach */
body.admin-bar .tb-est-topbar { top: 0 !important; }
body.admin-bar .tb-est-app { top: 52px !important; }
#wpadminbar { display: none !important; visibility: hidden !important; height: 0 !important; overflow: hidden !important; }
html { margin-top: 0 !important; }
body {
    background: var(--tb-bg) !important;
    background-image: none !important;
    overflow: hidden !important;
    margin: 0 !important; padding: 0 !important;
}
/* Reset any Hestia/theme interference */
.tb-est-app *, .tb-est-topbar *, .tb-est-bottombar * {
    box-sizing: border-box;
    margin: 0; padding: 0;
    font-family: inherit;
}

/* ===== Top Bar ===== */
.tb-est-topbar {
    position: fixed !important; top: 0 !important; left: 0 !important; right: 0 !important; z-index: 99999 !important;
    height: 52px !important;
    display: flex !important; align-items: center !important; justify-content: space-between !important;
    padding: 0 24px !important;
    background: rgba(255,255,255,0.92) !important;
    backdrop-filter: blur(16px) !important; -webkit-backdrop-filter: blur(16px) !important;
    border-bottom: 1px solid var(--tb-border) !important;
    font-family: var(--tb-font) !important;
    box-sizing: border-box !important;
}
.tb-est-topbar-logo {
    font-family: var(--tb-font-h) !important; font-weight: 700 !important; font-size: 1.1rem !important;
    color: var(--tb-text) !important; text-decoration: none !important;
}
.tb-est-topbar-nav {
    display: flex !important; gap: 28px !important; list-style: none !important;
}
.tb-est-topbar-nav a {
    font-size: 0.82rem !important; font-weight: 500 !important; color: var(--tb-text2) !important;
    text-decoration: none !important; transition: color 0.2s !important;
}
.tb-est-topbar-nav a:hover, .tb-est-topbar-nav a.active { color: var(--tb-primary) !important; }
.tb-est-topbar-actions {
    display: flex !important; align-items: center !important; gap: 16px !important;
}
.tb-est-topbar-phone {
    display: inline-flex !important; align-items: center !important; gap: 6px !important;
    font-size: 0.8rem !important; font-weight: 600 !important; color: #fff !important;
    background: linear-gradient(135deg, var(--tb-primary), var(--tb-accent)) !important;
    padding: 6px 16px !important; border-radius: 100px !important; text-decoration: none !important;
}
.tb-est-topbar-phone .material-symbols-outlined { font-size: 16px !important; }
.tb-est-topbar-burger {
    display: none !important; flex-direction: column; gap: 4px; background: none !important; border: none !important; cursor: pointer; padding: 6px;
}
.tb-est-topbar-burger span {
    display: block !important; width: 20px !important; height: 2px !important; background: var(--tb-text) !important; border-radius: 2px; transition: 0.3s;
}
.tb-est-mobile-menu {
    position: fixed; top: 52px; left: 0; right: 0; z-index: 99;
    background: rgba(255,255,255,0.97); backdrop-filter: blur(12px);
    padding: 16px 24px; display: flex; flex-direction: column; gap: 8px;
    border-bottom: 1px solid var(--tb-border);
}
.tb-est-mobile-menu a {
    font-size: 0.9rem; font-weight: 500; color: var(--tb-text2);
    text-decoration: none; padding: 8px 0;
}
.tb-est-mobile-menu a.active { color: var(--tb-primary); }

/* ===== Lang Switcher ===== */
.tb-est-lang-switcher {
    position: relative !important; display: inline-flex !important; align-items: center !important;
    background: var(--tb-bg) !important; border: 1px solid var(--tb-border) !important;
    border-radius: 100px !important; padding: 2px !important; height: 28px !important;
    flex-shrink: 0 !important; width: auto !important;
}
.tb-est-lang-btn {
    position: relative !important; z-index: 2 !important; padding: 2px 10px !important;
    font-size: 0.7rem !important; font-weight: 700 !important; color: var(--tb-muted) !important;
    background: transparent !important; border: none !important; cursor: pointer !important; transition: color 0.3s !important;
    letter-spacing: 1px !important; line-height: 1 !important; white-space: nowrap !important;
}
.tb-est-lang-btn--active { color: #fff !important; }
.tb-est-lang-indicator {
    position: absolute; top: 2px; bottom: 2px; left: 2px;
    width: calc(50% - 2px);
    background: linear-gradient(135deg, var(--tb-primary), var(--tb-accent));
    border-radius: 100px; transition: transform 0.4s cubic-bezier(0.25,1.2,0.5,1); z-index: 1;
}
.tb-est-lang-switcher[data-active="en"] .tb-est-lang-indicator { transform: translateX(100%); }

/* ===== Bottom Bar ===== */
.tb-est-bottombar {
    position: fixed !important; bottom: 0 !important; left: 0 !important; right: 0 !important; z-index: 99999 !important;
    height: 32px !important;
    display: flex !important; align-items: center !important; justify-content: center !important; gap: 8px !important;
    font-size: 0.7rem !important; color: var(--tb-muted) !important;
    background: rgba(255,255,255,0.92) !important; backdrop-filter: blur(12px) !important;
    border-top: 1px solid var(--tb-border) !important;
    font-family: var(--tb-font) !important;
    box-sizing: border-box !important;
}
.tb-est-bottombar a { color: var(--tb-muted) !important; text-decoration: none !important; }
.tb-est-bottombar a:hover { color: var(--tb-primary) !important; }
.tb-est-bottombar-sep { opacity: 0.4; }

/* ===== App Container ===== */
.tb-est-app {
    position: fixed !important; top: 52px !important; left: 0 !important; right: 0 !important; bottom: 32px !important;
    font-family: var(--tb-font) !important; color: var(--tb-text) !important;
    overflow: hidden !important; background: var(--tb-bg) !important;
    z-index: 9999 !important;
}
.tb-est-app * { box-sizing: border-box !important; }

/* ===== Stages ===== */
.tb-est-stage {
    position: absolute !important; inset: 0 !important;
    opacity: 0; transform: translateY(12px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    pointer-events: none;
}
.tb-est-stage--active {
    opacity: 1 !important; transform: translateY(0) !important; pointer-events: all !important;
}

/* ===== HERO STAGE ===== */
.tb-est-hero {
    position: relative !important; width: 100% !important; height: 100% !important;
    display: flex !important; align-items: center !important; justify-content: center !important;
    overflow: hidden !important;
}
.tb-est-hero-bg {
    position: absolute; inset: 0; pointer-events: none;
}
.tb-est-hero-grid {
    position: absolute; inset: -50px;
    background-image:
        linear-gradient(rgba(0,101,113,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,101,113,0.04) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: gridDrift 20s linear infinite;
}
@keyframes gridDrift {
    0% { transform: translate(0,0); }
    100% { transform: translate(60px,60px); }
}
.tb-est-hero-orb {
    position: absolute; border-radius: 50%;
    filter: blur(80px); opacity: 0.15;
}
.tb-est-hero-orb--1 {
    width: 500px; height: 500px; background: var(--tb-primary);
    top: -100px; right: -100px;
    animation: orbFloat 12s ease-in-out infinite alternate;
}
.tb-est-hero-orb--2 {
    width: 350px; height: 350px; background: var(--tb-accent);
    bottom: -80px; left: -80px;
    animation: orbFloat 15s ease-in-out infinite alternate-reverse;
}
.tb-est-hero-orb--3 {
    width: 200px; height: 200px; background: var(--tb-primary);
    top: 40%; left: 50%;
    animation: orbFloat 18s ease-in-out infinite alternate;
}
@keyframes orbFloat {
    0% { transform: translate(0,0) scale(1); }
    100% { transform: translate(40px,-30px) scale(1.15); }
}
.tb-est-hero-inner {
    position: relative; z-index: 2; text-align: center;
    max-width: 680px; padding: 20px;
}
.tb-est-hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 18px; border-radius: 100px;
    background: rgba(0,101,113,0.06); border: 1px solid rgba(0,101,113,0.12);
    font-size: 0.75rem; font-weight: 600; color: var(--tb-primary);
    letter-spacing: 0.5px; margin-bottom: 24px;
}
.tb-est-hero-badge .material-symbols-outlined { font-size: 16px; }
.tb-est-hero-title {
    font-family: var(--tb-font-h); font-size: clamp(2rem, 4.5vw, 3.2rem);
    font-weight: 700; line-height: 1.1; letter-spacing: -0.03em;
    color: var(--tb-text); margin-bottom: 16px;
}
.tb-est-hero-sub {
    font-size: 1.05rem; color: var(--tb-text2); line-height: 1.6;
    margin-bottom: 36px;
}
.tb-est-hero-ctas { margin-bottom: 28px; }

/* Start Button */
.tb-est-btn-start {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 16px 40px; border-radius: 100px; border: none;
    background: linear-gradient(135deg, var(--tb-primary), var(--tb-accent));
    color: #fff; font-size: 1rem; font-weight: 600; font-family: var(--tb-font);
    cursor: pointer; transition: all 0.3s;
    box-shadow: 0 4px 20px rgba(0,101,113,0.3);
    animation: pulseGlow 3s infinite;
}
.tb-est-btn-start:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0,101,113,0.4);
}
.tb-est-btn-start .material-symbols-outlined { font-size: 20px; transition: transform 0.3s; }
.tb-est-btn-start:hover .material-symbols-outlined { transform: translateX(4px); }
@keyframes pulseGlow {
    0%,100% { box-shadow: 0 4px 20px rgba(0,101,113,0.3); }
    50% { box-shadow: 0 4px 30px rgba(0,101,113,0.5), 0 0 60px rgba(0,227,253,0.15); }
}

/* Mode Toggle on Hero */
.tb-est-hero-mode {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 8px 20px; border-radius: 100px;
    background: rgba(255,255,255,0.7); border: 1px solid var(--tb-border);
    backdrop-filter: blur(8px);
}
.tb-est-mode-label {
    font-size: 0.78rem; font-weight: 600; color: var(--tb-muted);
    cursor: pointer; transition: 0.3s; text-transform: uppercase; letter-spacing: 0.05em;
}
.tb-est-mode-label--active { color: var(--tb-primary); }
.tb-est-switch {
    position: relative; width: 40px; height: 22px;
    background: #dfe3e6; border-radius: 11px;
    cursor: pointer; transition: 0.3s; border: none;
}
.tb-est-switch-thumb {
    position: absolute; top: 2px; left: 2px;
    width: 18px; height: 18px; background: #fff;
    border-radius: 50%; transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}
.tb-est-switch--pro { background: var(--tb-primary); }
.tb-est-switch--pro .tb-est-switch-thumb { transform: translateX(18px); }

/* ===== SPLIT LAYOUT (Stage 2) ===== */
.tb-est-split {
    display: flex !important; width: 100% !important; height: 100% !important;
}

/* LEFT: Visual Panel — 50% on desktop for bigger wow factor */
.tb-est-viz {
    width: 50% !important; height: 100% !important; position: relative !important;
    background: linear-gradient(160deg, #003840 0%, #006571 40%, #004d5a 100%) !important;
    display: flex !important; flex-direction: column !important; align-items: center !important; justify-content: center !important;
    overflow: hidden !important;
}
.tb-est-viz-bg {
    position: absolute; inset: 0;
    background-image:
        radial-gradient(circle at 30% 20%, rgba(0,227,253,0.08) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(0,227,253,0.05) 0%, transparent 50%);
}
.tb-est-viz::before {
    content: ''; position: absolute; inset: -50px;
    background-image:
        linear-gradient(rgba(0,227,253,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,227,253,0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    animation: gridDrift 25s linear infinite;
}
.tb-est-viz-content {
    position: relative; z-index: 2;
    width: 100%; max-width: 560px; padding: 12px 28px 8px;
    text-align: center;
    display: flex; flex-direction: column; align-items: center;
}
.tb-est-viz-icon {
    width: 52px; height: 52px; margin-bottom: 12px;
    color: var(--tb-accent);
    background: rgba(0,227,253,0.1); border: 1px solid rgba(0,227,253,0.2);
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.5s;
}
.tb-est-viz-icon svg { width: 26px; height: 26px; }
.tb-est-viz-title {
    font-family: var(--tb-font-h); font-size: 1.3rem; font-weight: 700;
    color: #fff; margin-bottom: 6px;
    transition: all 0.4s;
}
.tb-est-viz-desc {
    font-size: 0.85rem; color: rgba(255,255,255,0.65); line-height: 1.5;
    margin-bottom: 14px; transition: all 0.4s;
}

/* Visualization Canvas — big, centered, animated */
.tb-est-viz-canvas {
    width: 100%; height: 0;
    padding-bottom: min(80%, 520px);
    position: relative;
    border-radius: 16px;
    background: rgba(0,0,0,0.15);
    border: 1px solid rgba(0,227,253,0.1);
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
}
.tb-est-viz-canvas svg {
    position: absolute; inset: 0; width: 100%; height: 100%;
}
@keyframes vizFadeIn {
    0% { opacity: 0; transform: translateY(8px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Live Price Overlay on viz panel — WOW glassmorphism */
.tb-est-viz-price {
    position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
    z-index: 5; pointer-events: none;
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 14px 36px 12px;
    background: rgba(0,20,30,0.55);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(0,227,253,0.2);
    border-radius: 20px;
    box-shadow: 0 0 40px rgba(0,227,253,0.1), 0 8px 32px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.05);
    animation: priceFloat 4s ease-in-out infinite;
}
@keyframes priceFloat {
    0%, 100% { transform: translateX(-50%) translateY(0); box-shadow: 0 0 40px rgba(0,227,253,0.1), 0 8px 32px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.05); }
    50% { transform: translateX(-50%) translateY(-3px); box-shadow: 0 0 60px rgba(0,227,253,0.18), 0 12px 40px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.08); }
}
.tb-est-viz-price-label {
    font-size: 0.6rem; font-weight: 700; color: rgba(0,227,253,0.6);
    text-transform: uppercase; letter-spacing: 2.5px; margin-bottom: 2px;
}
.tb-est-viz-price-amount {
    font-family: var(--tb-font-h); font-size: 2.4rem; font-weight: 800;
    background: linear-gradient(135deg, #00e3fd 0%, #ffffff 50%, #00e3fd 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: priceShimmer 3s ease-in-out infinite;
    filter: drop-shadow(0 0 12px rgba(0,227,253,0.3));
    line-height: 1.1;
}
@keyframes priceShimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}
.tb-est-live-delta {
    display: inline-block;
    background: rgba(16,185,129,0.2); border: 1px solid var(--tb-green);
    color: var(--tb-green); padding: 3px 12px; border-radius: 100px;
    font-weight: 700; font-size: 0.7rem;
    opacity: 0; transition: 0.3s; transform: translateY(4px);
    text-shadow: 0 0 8px rgba(16,185,129,0.4);
}
.tb-est-live-delta.down { background: rgba(239,68,68,0.15); border-color: #ef4444; color: #ef4444; }
.tb-est-live-delta.show { opacity: 1; transform: translateY(0); }

/* Step Dots */
.tb-est-viz-steps {
    position: absolute; bottom: 20px; left: 0; right: 0;
    display: flex; justify-content: center; gap: 8px; z-index: 5;
}
.tb-est-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: rgba(255,255,255,0.2); transition: all 0.4s;
}
.tb-est-dot.active {
    background: var(--tb-accent); width: 24px; border-radius: 4px;
    box-shadow: 0 0 10px rgba(0,227,253,0.4);
}

/* RIGHT: Form Panel — 50% */
.tb-est-form {
    width: 50% !important; height: 100% !important;
    display: flex !important; flex-direction: column !important;
    background: var(--tb-white) !important;
}
.tb-est-progress { height: 3px; background: var(--tb-bg); }
.tb-est-progress-bar {
    height: 100%; width: 0%;
    background: linear-gradient(90deg, var(--tb-primary), var(--tb-accent));
    transition: width 0.6s ease;
}
.tb-est-form-scroll {
    flex: 1; overflow-y: auto; padding: 36px 44px;
}
.tb-est-form-scroll::-webkit-scrollbar { width: 5px; }
.tb-est-form-scroll::-webkit-scrollbar-track { background: transparent; }
.tb-est-form-scroll::-webkit-scrollbar-thumb { background: #dfe3e6; border-radius: 3px; }
.tb-est-form-footer {
    display: flex; align-items: center; padding: 16px 44px;
    border-top: 1px solid var(--tb-border); background: var(--tb-white);
}

/* ===== Form Elements ===== */
.tb-est-group { width: 100%; display: none; }
.tb-est-group.active { display: block; animation: fadeSlide 0.4s ease forwards; }
@keyframes fadeSlide {
    0% { opacity: 0; transform: translateX(20px); }
    100% { opacity: 1; transform: translateX(0); }
}
.tb-est-group-title {
    font-family: var(--tb-font-h); font-size: 1.5rem; font-weight: 700;
    color: var(--tb-text); margin-bottom: 24px;
    padding-bottom: 12px; border-bottom: 1px solid var(--tb-border);
}
.tb-est-group-fields { display: flex; flex-direction: column; gap: 18px; }
.tb-est-field-wrapper { width: 100%; }
.tb-est-label {
    display: block; font-size: 0.82rem; font-weight: 600;
    color: var(--tb-text); margin-bottom: 8px;
}
.tb-est-label-sub { color: var(--tb-muted); font-weight: 400; font-size: 0.75rem; }

/* Number Input */
.tb-est-number-wrap {
    display: inline-flex; align-items: center;
    background: var(--tb-bg); border: 1px solid var(--tb-border);
    border-radius: var(--tb-r); overflow: hidden;
}
.tb-est-num-btn {
    width: 44px; height: 44px; background: transparent; border: none;
    color: var(--tb-primary); font-size: 1.2rem; cursor: pointer; transition: 0.2s;
    display: flex; align-items: center; justify-content: center;
}
.tb-est-num-btn:hover { background: rgba(0,101,113,0.06); }
.tb-est-input-num-clean {
    width: 64px; height: 44px; background: transparent; border: none;
    border-left: 1px solid var(--tb-border); border-right: 1px solid var(--tb-border);
    color: var(--tb-text); font-size: 1.05rem; font-weight: 600;
    text-align: center; font-family: var(--tb-font);
}
.tb-est-input-num-clean:focus { outline: none; }

/* Radio/Checkbox Cards */
.tb-est-grid-cards {
    display: grid; gap: 10px;
    grid-template-columns: repeat(var(--tb-cols, 2), 1fr);
}
.tb-est-card-radio { position: relative; cursor: pointer; display: block; }
.tb-est-card-radio input { position: absolute; opacity: 0; width: 0; height: 0; }
.tb-est-card-inner {
    display: flex; flex-direction: column; padding: 14px 16px;
    background: var(--tb-bg); border: 1.5px solid var(--tb-border);
    border-radius: var(--tb-r); transition: all 0.25s;
}
.tb-est-card-icon {
    width: 22px !important; height: 22px !important;
    min-width: 22px; min-height: 22px; max-width: 22px; max-height: 22px;
    color: var(--tb-muted); transition: color 0.3s; flex-shrink: 0; margin-bottom: 6px;
}
.tb-est-card-title { font-weight: 600; font-size: 0.85rem; color: var(--tb-text); margin-bottom: 2px; }
.tb-est-card-desc { font-size: 0.75rem; color: var(--tb-text2); line-height: 1.4; }

.tb-est-card-radio input:checked + .tb-est-card-inner {
    background: rgba(0,101,113,0.04); border-color: var(--tb-primary);
    box-shadow: 0 0 0 1px var(--tb-primary), 0 2px 8px rgba(0,101,113,0.08);
}
.tb-est-card-radio input:checked + .tb-est-card-inner .tb-est-card-icon { color: var(--tb-primary); }
.tb-est-card-radio input:checked + .tb-est-card-inner .tb-est-card-title { color: var(--tb-primary); }
.tb-est-card-radio:hover .tb-est-card-inner { border-color: rgba(0,101,113,0.3); }

/* Switch Field */
.tb-est-switch-field {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px; background: var(--tb-bg);
    border: 1.5px solid var(--tb-border); border-radius: var(--tb-r);
    cursor: pointer; transition: 0.3s;
}
.tb-est-switch-field:hover { border-color: rgba(0,101,113,0.3); }

/* Dense mode (Pro) */
.tb-est-group-fields.dense .tb-est-grid-cards[style*="--tb-cols: 1"] { grid-template-columns: repeat(2, 1fr) !important; }
.tb-est-group-fields.dense .tb-est-grid-cards[style*="--tb-cols: 2"] { grid-template-columns: repeat(3, 1fr) !important; }

/* Buttons */
.tb-est-btn-next {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 28px; border-radius: 100px; border: none;
    background: linear-gradient(135deg, var(--tb-primary), var(--tb-accent));
    color: #fff; font-size: 0.9rem; font-weight: 600; font-family: var(--tb-font);
    cursor: pointer; transition: all 0.3s;
    box-shadow: 0 2px 12px rgba(0,101,113,0.2);
}
.tb-est-btn-next:hover { transform: translateY(-2px); box-shadow: 0 4px 20px rgba(0,101,113,0.3); }
.tb-est-btn-next .material-symbols-outlined { font-size: 18px; }
.tb-est-btn-back {
    padding: 10px 20px; border-radius: 100px;
    background: var(--tb-bg); border: 1px solid var(--tb-border);
    color: var(--tb-text2); font-size: 0.85rem; font-weight: 500;
    font-family: var(--tb-font); cursor: pointer; transition: 0.2s;
}
.tb-est-btn-back:hover { background: #eef1f3; }

/* ===== Topology Visualizations (Dark panel) ===== */
.tb-anim-layer {
    position: absolute; inset: 0;
    display: none; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.5s;
}
.tb-anim-layer.active {
    display: flex; opacity: 1; z-index: 10;
    animation: vizPop 0.6s ease forwards;
}
@keyframes vizPop {
    0% { transform: scale(0.85); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* Workstation viz */
.tb-est-viz-canvas .tb-gfx-workstation { display: flex; align-items: flex-end; gap: 12px; }
.tb-est-viz-canvas .tb-iso-obj.laptop-mesh {
    width: 70px; height: 45px;
    background: rgba(0,227,253,0.1); border: 1.5px solid var(--tb-accent);
    border-radius: 4px; position: relative;
    box-shadow: 0 0 20px rgba(0,227,253,0.15);
    animation: floatGlow 3s ease-in-out infinite alternate;
}
.tb-est-viz-canvas .tb-iso-obj.laptop-mesh::before {
    content: ''; position: absolute; top: 100%; left: 0;
    width: 100%; height: 30px;
    background: rgba(0,227,253,0.04); border: 1px solid rgba(0,227,253,0.08);
    border-radius: 2px;
}
@keyframes floatGlow {
    0% { transform: translateY(0); box-shadow: 0 0 20px rgba(0,227,253,0.15); }
    100% { transform: translateY(-6px); box-shadow: 0 0 35px rgba(0,227,253,0.25); }
}

/* Screen objects */
.tb-est-viz-canvas .tb-iso-obj:not(.laptop-mesh) {
    background: rgba(0,227,253,0.06) !important;
    border: 1.5px solid var(--tb-accent) !important;
    border-radius: 4px !important;
    box-shadow: 0 0 15px rgba(0,227,253,0.12) !important;
    animation: screenPulse 2.5s ease-in-out infinite alternate;
}
@keyframes screenPulse {
    0% { box-shadow: 0 0 15px rgba(0,227,253,0.12); }
    100% { box-shadow: 0 0 25px rgba(0,227,253,0.25); }
}

/* WiFi waves */
.tb-est-viz-canvas .tb-gfx-wifi {
    position: relative; width: 160px; height: 160px;
    display: flex; align-items: center; justify-content: center;
}
.tb-est-viz-canvas .tb-gfx-wave {
    position: absolute; border: 2px solid var(--tb-accent);
    border-radius: 50%; opacity: 0;
    animation: wifiPulse 2.5s infinite linear;
}
.tb-est-viz-canvas .tb-gfx-wave:nth-child(1) { width: 50px; height: 50px; }
.tb-est-viz-canvas .tb-gfx-wave:nth-child(2) { width: 90px; height: 90px; animation-delay: 0.8s; }
.tb-est-viz-canvas .tb-gfx-wave:nth-child(3) { width: 130px; height: 130px; animation-delay: 1.6s; }
@keyframes wifiPulse {
    0% { transform: scale(0); opacity: 0.7; }
    100% { transform: scale(1.3); opacity: 0; }
}

/* Rack / Blades */
.tb-est-viz-canvas .tb-gfx-rack {
    width: 120px; padding: 10px;
    background: rgba(0,227,253,0.05); border: 1.5px solid rgba(0,227,253,0.2);
    border-radius: 10px; display: flex; flex-direction: column; gap: 6px;
    box-shadow: 0 0 30px rgba(0,227,253,0.08);
}
.tb-est-viz-canvas .tb-gfx-blade {
    width: 100%; height: 14px;
    background: rgba(0,227,253,0.08); border: 1px solid rgba(0,227,253,0.15);
    border-radius: 3px; position: relative;
    animation: bladeFlicker 2s infinite alternate;
}
.tb-est-viz-canvas .tb-gfx-blade:nth-child(odd) { animation-delay: 0.5s; }
@keyframes bladeFlicker {
    0% { opacity: 0.6; } 100% { opacity: 1; }
}

/* Datacenter cubes */
.tb-est-viz-canvas .tb-dc-cube {
    width: 60px; height: 60px;
    background: rgba(0,227,253,0.05) !important;
    border: 1.5px solid rgba(0,227,253,0.2) !important;
    border-radius: 8px; position: absolute;
    animation: cubeFloat 4s ease-in-out infinite alternate;
}
.tb-est-viz-canvas .tb-dc-cube.left { top: 40px; left: 30px; }
.tb-est-viz-canvas .tb-dc-cube.right { top: 80px; left: 130px; animation-delay: 1s; }
@keyframes cubeFloat {
    0% { transform: translateY(0); } 100% { transform: translateY(-8px); }
}
.tb-est-viz-canvas .tb-iso-scene.top-down {
    position: relative; width: 220px; height: 180px;
}

/* AI Neural */
.tb-est-viz-canvas .tb-gfx-ai {
    position: relative; width: 160px; height: 160px;
    display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px;
}
.tb-est-viz-canvas .tb-gfx-node {
    width: 18px; height: 18px;
    background: var(--tb-accent); border-radius: 50%;
    box-shadow: 0 0 12px rgba(0,227,253,0.5);
    animation: nodePulse 1.5s infinite alternate;
}
.tb-est-viz-canvas .tb-gfx-node:nth-child(odd) { animation-delay: 0.4s; }
.tb-est-viz-canvas .tb-gfx-node:nth-child(5) {
    width: 28px !important; height: 28px !important;
    background: #fff !important;
    box-shadow: 0 0 25px rgba(255,255,255,0.6) !important;
}
@keyframes nodePulse {
    0% { opacity: 0.4; transform: scale(0.9); }
    100% { opacity: 1; transform: scale(1.1); }
}

/* ===== RESULTS STAGE ===== */
.tb-est-results {
    width: 100%; height: 100%; overflow-y: auto;
    padding: 32px 40px;
}
.tb-est-res-header { text-align: center; margin-bottom: 28px; }
.tb-est-res-badge {
    display: inline-block; padding: 5px 16px;
    background: rgba(0,101,113,0.06); border: 1px solid var(--tb-primary);
    color: var(--tb-primary); font-weight: 700; font-size: 0.68rem;
    letter-spacing: 2px; border-radius: 100px; margin-bottom: 10px;
}
.tb-est-res-title {
    font-family: var(--tb-font-h); font-size: 1.8rem; font-weight: 700; color: var(--tb-text);
}
.tb-est-res-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 28px;
    max-width: 900px; margin-left: auto; margin-right: auto;
}
.tb-est-res-col { display: flex; flex-direction: column; gap: 16px; }
.tb-est-res-card {
    background: var(--tb-white); border: 1px solid var(--tb-border);
    border-radius: var(--tb-r-lg); padding: 24px; position: relative;
    box-shadow: 0 1px 3px rgba(44,47,49,0.04);
}
.tb-est-res-card h3 {
    font-size: 0.75rem; font-weight: 600; color: var(--tb-text2);
    text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px;
}
.tb-est-res-card--price {
    text-align: center; border-top: 3px solid var(--tb-primary);
}
.tb-est-res-amount {
    font-family: var(--tb-font-h); font-size: 2.6rem; font-weight: 700;
    color: var(--tb-text); line-height: 1; margin-bottom: 4px;
}
.tb-est-res-amount small { font-size: 1rem; color: var(--tb-muted); margin-left: 4px; }
.tb-est-res-max { font-size: 0.95rem; color: var(--tb-primary); opacity: 0.8; margin-bottom: 12px; }
.tb-est-res-disc { font-size: 0.72rem; color: var(--tb-muted); font-style: italic; }
.tb-est-res-delay {
    font-family: var(--tb-font-h); font-size: 1.2rem; font-weight: 700; color: var(--tb-text);
}
.tb-est-res-weekend {
    display: inline-flex; align-items: center;
    background: rgba(16,185,129,0.08); color: var(--tb-green);
    border: 1px solid rgba(16,185,129,0.2);
    padding: 3px 10px; border-radius: 100px;
    font-size: 0.72rem; font-weight: 600; margin-top: 6px;
}
.tb-est-res-pack {
    padding: 16px; background: var(--tb-bg); border-radius: var(--tb-r);
    border-left: 3px solid var(--tb-primary);
}
.tb-est-res-pack h4 {
    font-family: var(--tb-font-h); font-size: 1.05rem; font-weight: 700;
    color: var(--tb-text); margin-bottom: 4px;
}
.tb-est-res-pack p { font-size: 0.85rem; color: var(--tb-text2); line-height: 1.5; }
.tb-est-res-list { list-style: none; }
.tb-est-res-list li {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 0; border-bottom: 1px solid var(--tb-border); font-size: 0.85rem;
}
.tb-est-res-list li:last-child { border: none; }
.tb-est-res-list li span { color: var(--tb-text2); }
.tb-est-res-list li strong { color: var(--tb-text); }
.tb-est-sum-sub {
    display: block; font-size: 0.75rem; color: var(--tb-primary);
    text-align: right; padding-bottom: 4px;
}

/* ===== Lead Form ===== */
.tb-est-lead {
    max-width: 900px; margin: 0 auto;
    background: rgba(0,101,113,0.03); border: 1px solid rgba(0,101,113,0.1);
    border-radius: var(--tb-r-lg); padding: 28px; text-align: center;
}
.tb-est-lead h3 {
    font-family: var(--tb-font-h); font-size: 1.15rem; font-weight: 700;
    color: var(--tb-text); margin-bottom: 4px;
}
.tb-est-lead > p { color: var(--tb-text2); font-size: 0.85rem; margin-bottom: 20px; }
.tb-est-lead-form { text-align: left; }
.tb-est-lead-row {
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px;
}
.tb-est-lead-field { display: flex; flex-direction: column; }
.tb-est-lead-full { grid-column: 1 / -1; }
.tb-est-lead-field label {
    font-size: 0.75rem; font-weight: 600; color: var(--tb-text2);
    margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.02em;
}
.tb-est-lead-field input,
.tb-est-lead-field textarea {
    background: var(--tb-white); border: 1px solid var(--tb-border);
    border-radius: 8px; padding: 10px 12px;
    color: var(--tb-text); font-size: 0.9rem; font-family: var(--tb-font);
    transition: 0.3s;
}
.tb-est-lead-field input:focus,
.tb-est-lead-field textarea:focus {
    border-color: var(--tb-primary); outline: none;
    box-shadow: 0 0 0 3px rgba(0,101,113,0.08);
}
.tb-est-btn-submit {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; padding: 14px; border-radius: 100px; border: none;
    background: linear-gradient(135deg, var(--tb-primary), var(--tb-accent));
    color: #fff; font-size: 0.95rem; font-weight: 600; font-family: var(--tb-font);
    cursor: pointer; transition: 0.3s; margin-top: 12px;
    box-shadow: 0 2px 12px rgba(0,101,113,0.2);
}
.tb-est-btn-submit:hover { transform: translateY(-2px); box-shadow: 0 4px 20px rgba(0,101,113,0.3); }
.tb-est-loader {
    display: inline-block; width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff;
    border-radius: 50%; animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.tb-est-lead-feedback {
    text-align: center; margin-top: 10px; font-weight: 600;
    padding: 8px; border-radius: 8px; background: var(--tb-bg);
}

/* ===== Responsive — Tablet ===== */
@media (max-width: 900px) {
    /* Header: hide nav links, show burger */
    .tb-est-topbar-nav { display: none !important; }
    .tb-est-topbar-phone { display: none !important; }
    .tb-est-topbar-burger { display: flex !important; }
    .tb-est-topbar { padding: 0 16px !important; }

    /* Split layout: fixed height, no scroll needed */
    .tb-est-split { flex-direction: column !important; height: 100% !important; overflow: hidden !important; }
    .tb-est-viz {
        width: 100% !important; height: auto !important; min-height: unset !important;
        flex-shrink: 0 !important;
        padding: 0 !important;
    }
    .tb-est-form {
        width: 100% !important; flex: 1 1 0 !important; min-height: 0 !important;
        height: auto !important; overflow: hidden !important;
    }
    .tb-est-form-scroll { flex: 1 !important; overflow-y: auto !important; }

    /* Viz content: ultra-compact horizontal strip */
    .tb-est-viz-content {
        padding: 6px 12px 4px !important;
        max-width: 100% !important;
        display: flex !important; flex-direction: row !important; flex-wrap: wrap !important;
        align-items: center !important; justify-content: center !important;
        gap: 0 12px !important;
    }
    .tb-est-viz-icon { display: none !important; }
    .tb-est-viz-title { font-size: 0.85rem !important; margin-bottom: 0 !important; width: 100% !important; text-align: center !important; }
    .tb-est-viz-desc { display: none !important; }

    /* SVG canvas: small but visible */
    .tb-est-viz-canvas {
        padding-bottom: 0 !important;
        height: 120px !important;
        width: 85% !important;
        margin: 4px auto 0 !important;
        border-radius: 10px !important;
    }

    /* Price overlay: inline, compact, right after canvas */
    .tb-est-viz-price {
        position: relative !important;
        bottom: auto !important; left: auto !important;
        transform: none !important;
        margin: 4px auto 0 !important;
        padding: 4px 20px 3px !important;
        animation: none !important;
        border-radius: 12px !important;
    }
    .tb-est-viz-price-label { font-size: 0.45rem !important; letter-spacing: 1.5px !important; margin-bottom: 0 !important; }
    .tb-est-viz-price-amount { font-size: 1.2rem !important; line-height: 1 !important; }
    .tb-est-live-delta { font-size: 0.6rem !important; padding: 2px 8px !important; }

    /* Step dots: tiny, below price */
    .tb-est-viz-steps {
        position: relative !important; bottom: auto !important;
        margin-top: 3px !important; padding-bottom: 2px !important; gap: 5px !important;
    }
    .tb-est-dot { width: 6px !important; height: 6px !important; }
    .tb-est-dot.active { width: 16px !important; }

    /* Mode toggle: tiny, top-right */
    .tb-est-mode-float {
        top: 2px !important; right: 4px !important;
        padding: 2px 6px !important; gap: 4px !important;
    }
    .tb-est-mode-float .tb-est-mode-label { font-size: 0.55rem !important; }
    .tb-est-mode-float .tb-est-switch { width: 24px !important; height: 14px !important; border-radius: 7px !important; }
    .tb-est-mode-float .tb-est-switch-thumb { width: 10px !important; height: 10px !important; }
    .tb-est-mode-float .tb-est-switch--pro .tb-est-switch-thumb { transform: translateX(10px) !important; }

    /* Form panel */
    .tb-est-form-scroll { padding: 20px 16px !important; }
    .tb-est-form-footer { padding: 10px 16px !important; }
    .tb-est-group-title { font-size: 1.2rem !important; margin-bottom: 16px !important; }

    /* Results page */
    .tb-est-res-grid { grid-template-columns: 1fr !important; }
    .tb-est-lead-row { grid-template-columns: 1fr !important; }
    .tb-est-results { padding: 20px 16px !important; }
    .tb-est-res-title { font-size: 1.3rem !important; }
    .tb-est-res-amount { font-size: 2rem !important; }

    /* Hero adjustments */
    .tb-est-hero-floating-icon { font-size: 24px !important; opacity: 0.5 !important; }
    .tb-est-hero-title { font-size: 1.6rem !important; }
    .tb-est-hero-sub { font-size: 0.9rem !important; margin-bottom: 24px !important; }
    .tb-est-btn-start { padding: 14px 32px !important; font-size: 0.9rem !important; }
    .tb-est-hero-mode { padding: 6px 14px !important; gap: 8px !important; }

    /* App and stage: fixed viewport, form scrolls internally */
    .tb-est-app { overflow: hidden !important; }
    .tb-est-stage { position: absolute !important; inset: 0 !important; overflow: hidden !important; }
    #tb-est-stage-form { overflow: hidden !important; display: flex !important; flex-direction: column !important; height: 100% !important; }
    .tb-est-split { height: 100% !important; overflow: hidden !important; }
}

/* ===== Responsive — Small phones ===== */
@media (max-width: 480px) {
    .tb-est-grid-cards { grid-template-columns: 1fr !important; }
    .tb-est-group-fields.dense .tb-est-grid-cards { grid-template-columns: 1fr !important; }

    /* Even smaller viz on tiny screens */
    .tb-est-viz-canvas { height: 100px !important; width: 80% !important; }
    .tb-est-viz-title { font-size: 0.8rem !important; }
    .tb-est-viz-price-amount { font-size: 1rem !important; }
    .tb-est-viz-price { padding: 3px 14px 2px !important; border-radius: 10px !important; }
    .tb-est-viz-price-label { font-size: 0.4rem !important; }

    .tb-est-form-scroll { padding: 14px 12px !important; }
    .tb-est-group-title { font-size: 1rem !important; margin-bottom: 12px !important; }
    .tb-est-card-inner { padding: 10px 12px !important; }
    .tb-est-card-title { font-size: 0.8rem !important; }
    .tb-est-card-desc { font-size: 0.7rem !important; }
    .tb-est-form-footer { padding: 8px 12px !important; }

    .tb-est-hero-title { font-size: 1.4rem !important; }
    .tb-est-hero-sub { font-size: 0.82rem !important; }
    .tb-est-btn-start { padding: 12px 28px !important; font-size: 0.85rem !important; }
}

/* ===== Background Canvas (hidden) ===== */
.tb-est-bg-canvas, .tb-est-bg-glow, .tb-est-bg-grid { display: none; }

/* ===== Persistent Mode Toggle (during estimation) ===== */
.tb-est-mode-float {
    position: absolute; top: 12px; right: 12px; z-index: 20;
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 16px; border-radius: 100px;
    background: rgba(0,0,0,0.3); border: 1px solid rgba(0,227,253,0.15);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.tb-est-mode-float .tb-est-mode-label {
    font-size: 0.7rem; font-weight: 700; color: rgba(255,255,255,0.4);
    cursor: pointer; transition: 0.3s; text-transform: uppercase; letter-spacing: 0.05em;
}
.tb-est-mode-float .tb-est-mode-label--active { color: var(--tb-accent); }
.tb-est-mode-float .tb-est-switch {
    width: 34px; height: 18px; background: rgba(255,255,255,0.15); border-radius: 9px;
}
.tb-est-mode-float .tb-est-switch-thumb {
    width: 14px; height: 14px; top: 2px; left: 2px;
}
.tb-est-mode-float .tb-est-switch--pro { background: var(--tb-accent); }
.tb-est-mode-float .tb-est-switch--pro .tb-est-switch-thumb { transform: translateX(16px); }

/* ===== Hero Interactive Canvas ===== */
.tb-est-hero-canvas {
    position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background: radial-gradient(ellipse at center, rgba(0,40,50,0.06) 0%, transparent 70%);
}
.tb-est-hero-particle {
    position: absolute; border-radius: 50%;
    pointer-events: none; will-change: transform;
}
@keyframes heroParticleDrift {
    0% { transform: translate(0, 0) scale(1); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translate(var(--dx), var(--dy)) scale(0.3); opacity: 0; }
}
.tb-est-hero-mouse-glow {
    position: absolute; width: 400px; height: 400px;
    border-radius: 50%; pointer-events: none;
    background: radial-gradient(circle, rgba(0,227,253,0.08) 0%, rgba(0,101,113,0.04) 40%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: left 0.15s ease-out, top 0.15s ease-out;
    z-index: 1;
}
@keyframes heroFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-15px) rotate(2deg); }
    50% { transform: translateY(-5px) rotate(-1deg); }
    75% { transform: translateY(-20px) rotate(1deg); }
}
.tb-est-hero-floating-icon {
    position: absolute; pointer-events: none; z-index: 1;
    color: rgba(0,101,113,0.18); font-size: 36px;
    animation: heroFloat 8s ease-in-out infinite;
    opacity: 0.7;
}
.tb-est-hero-floating-icon:nth-child(2) { animation-duration: 10s; animation-delay: -3s; }
.tb-est-hero-floating-icon:nth-child(3) { animation-duration: 12s; animation-delay: -6s; }
.tb-est-hero-floating-icon:nth-child(4) { animation-duration: 9s; animation-delay: -1s; }
.tb-est-hero-floating-icon:nth-child(5) { animation-duration: 11s; animation-delay: -4s; }
.tb-est-hero-floating-icon:nth-child(6) { animation-duration: 13s; animation-delay: -7s; }
.tb-est-hero-floating-icon:nth-child(7) { animation-duration: 10s; animation-delay: -2s; }

/* ===== Large screen boost for viz ===== */
@media (min-width: 1400px) {
    .tb-est-viz-content { max-width: 640px; padding: 14px 36px 8px; }
    .tb-est-viz-title { font-size: 1.5rem; }
    .tb-est-viz-desc { font-size: 0.9rem; }
    .tb-est-viz-canvas { padding-bottom: min(85%, 580px); }
    .tb-est-viz-price-amount { font-size: 3rem; }
    .tb-est-viz-price { padding: 16px 44px 14px; }
}
@media (min-width: 1800px) {
    .tb-est-viz-content { max-width: 720px; }
    .tb-est-viz-canvas { padding-bottom: min(90%, 640px); }
    .tb-est-viz-price-amount { font-size: 3.4rem; }
}
