/* ═══════════════════════════════════════════════════════════
   FLYTT-KALKYLATOR  –  Modern, clean CSS
   ═══════════════════════════════════════════════════════════ */

/* ── Reset & Custom Properties ────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --c-primary: #2563eb;
    --c-primary-dark: #1d4ed8;
    --c-primary-light: #dbeafe;
    --c-accent: #f59e0b;
    --c-accent-dark: #d97706;
    --c-success: #16a34a;
    --c-danger: #dc2626;
    --c-bg: #f1f5f9;
    --c-surface: #ffffff;
    --c-text: #1e293b;
    --c-text-light: #64748b;
    --c-border: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
    --shadow-md: 0 4px 20px rgba(0,0,0,.08);
    --shadow-lg: 0 10px 40px rgba(0,0,0,.12);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: .25s cubic-bezier(.4,0,.2,1);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    color: var(--c-text);
    background: var(--c-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ── HERO ─────────────────────────────────────────────────── */
.hero {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 50%, #3b82f6 100%);
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(245,158,11,.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(59,130,246,.3) 0%, transparent 50%);
}

.hero-content {
    position: relative;
    text-align: center;
    padding: 2rem;
    max-width: 600px;
    animation: fadeUp .8s ease-out;
}

.hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 800;
    color: #fff;
    margin-bottom: .75rem;
    letter-spacing: -.02em;
    line-height: 1.15;
}

.hero-sub {
    font-size: 1.15rem;
    color: rgba(255,255,255,.85);
    margin-bottom: 2rem;
    font-weight: 300;
}

.btn-hero {
    font-size: 1.1rem;
    padding: .9rem 2.5rem;
    background: var(--c-accent);
    color: #1e293b;
    border: none;
    border-radius: 999px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 20px rgba(245,158,11,.35);
}

.btn-hero:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(245,158,11,.45);
    background: #fbbf24;
}

/* ── WIZARD WRAPPER ───────────────────────────────────────── */
.wizard-wrapper {
    display: none;
    max-width: 760px;
    margin: 0 auto;
    padding: 2rem 1rem 4rem;
    animation: fadeUp .5s ease-out;
}

.wizard-wrapper.visible {
    display: block;
}

/* ── PROGRESS BAR ─────────────────────────────────────────── */
.progress-bar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--c-bg);
    padding: 1rem 0 .5rem;
    margin-bottom: 1.5rem;
}

.progress-track {
    height: 4px;
    background: var(--c-border);
    border-radius: 99px;
    overflow: hidden;
    margin-bottom: .75rem;
}

.progress-fill {
    height: 100%;
    width: 14.28%;
    background: linear-gradient(90deg, var(--c-primary), var(--c-accent));
    border-radius: 99px;
    transition: width .4s ease;
}

.steps-indicator {
    display: flex;
    justify-content: space-between;
}

.step-dot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    opacity: .4;
    transition: var(--transition);
    cursor: default;
}

.step-dot.clickable {
    cursor: pointer;
}

.step-dot.clickable:hover span {
    transform: scale(1.15);
    box-shadow: 0 2px 10px rgba(0,0,0,.15);
}

.step-dot.active,
.step-dot.done {
    opacity: 1;
}

.step-dot span {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    font-weight: 700;
    background: var(--c-border);
    color: var(--c-text-light);
    transition: var(--transition);
}

.step-dot.active span {
    background: var(--c-primary);
    color: #fff;
    box-shadow: 0 2px 10px rgba(37,99,235,.35);
}

.step-dot.done span {
    background: var(--c-success);
    color: #fff;
}

.step-dot small {
    font-size: .65rem;
    color: var(--c-text-light);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .04em;
}

/* ── STEPS ────────────────────────────────────────────────── */
.step {
    display: none;
    animation: fadeUp .4s ease-out;
}

.step.active {
    display: block;
}

.step-card {
    background: var(--c-surface);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    max-width: 560px;
    margin: 0 auto;
}

.step-card-wide {
    max-width: 700px;
}

.step-header {
    text-align: center;
    margin-bottom: 1.75rem;
}

.step-icon {
    font-size: 2.5rem;
    margin-bottom: .5rem;
}

.step-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: .35rem;
    letter-spacing: -.01em;
}

.step-header h2 em {
    color: var(--c-primary);
    font-style: normal;
    text-decoration: underline;
    text-decoration-color: var(--c-primary-light);
    text-underline-offset: 3px;
}

.step-desc {
    color: var(--c-text-light);
    font-size: .95rem;
}

/* ── FORM ELEMENTS ────────────────────────────────────────── */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: .9rem;
    margin-bottom: .4rem;
    color: var(--c-text);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: .7rem .9rem;
    border: 2px solid var(--c-border);
    border-radius: var(--radius-sm);
    font-size: .95rem;
    font-family: var(--font);
    color: var(--c-text);
    background: var(--c-surface);
    transition: var(--transition);
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--c-primary);
    box-shadow: 0 0 0 3px var(--c-primary-light);
}

.form-group textarea {
    resize: vertical;
}

.field-hint {
    font-size: .8rem;
    color: var(--c-text-light);
    margin-top: .3rem;
    line-height: 1.4;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* ── TOGGLE BUTTONS ───────────────────────────────────────── */
.toggle-group {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.toggle-btn {
    padding: .55rem 1rem;
    border: 2px solid var(--c-border);
    border-radius: 999px;
    background: var(--c-surface);
    font-size: .85rem;
    font-family: var(--font);
    font-weight: 500;
    color: var(--c-text-light);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.toggle-btn:hover {
    border-color: var(--c-primary);
    color: var(--c-primary);
}

.toggle-btn.active {
    background: var(--c-primary);
    border-color: var(--c-primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(37,99,235,.25);
}

/* ── ADDRESS COLUMNS ──────────────────────────────────────── */
.address-columns {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1rem;
    align-items: start;
}

.address-col h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--c-text-light);
}

.address-col h3 em {
    color: var(--c-primary);
    font-style: normal;
}

.address-divider {
    display: flex;
    align-items: center;
    padding-top: 2.5rem;
}

.arrow-icon {
    width: 40px;
    height: 40px;
    background: var(--c-primary-light);
    color: var(--c-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
}

@media (max-width: 640px) {
    .address-columns {
        grid-template-columns: 1fr;
    }
    .address-divider {
        justify-content: center;
        padding: .5rem 0;
    }
    .arrow-icon {
        transform: rotate(90deg);
    }
}

/* ── COUNTER CONTROLS ─────────────────────────────────────── */
.section-divider {
    border: none;
    border-top: 1px solid var(--c-border);
    margin: 1.5rem 0;
}

.section-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.counter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
}

@media (max-width: 500px) {
    .counter-grid {
        grid-template-columns: 1fr;
    }
}

.counter-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .6rem .8rem;
    background: #f8fafc;
    border-radius: var(--radius-sm);
    border: 1px solid var(--c-border);
}

.counter-label {
    font-size: .85rem;
    font-weight: 500;
}

.counter-label small {
    display: block;
    font-size: .72rem;
    color: var(--c-text-light);
    font-weight: 400;
}

.counter-controls {
    display: flex;
    align-items: center;
    gap: .25rem;
}

.counter-btn {
    width: 32px;
    height: 32px;
    border: 2px solid var(--c-border);
    border-radius: 50%;
    background: var(--c-surface);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--c-text-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-family: var(--font);
    line-height: 1;
}

.counter-btn:hover {
    border-color: var(--c-primary);
    color: var(--c-primary);
}

.counter-btn:active {
    transform: scale(.92);
}

.counter-input {
    width: 40px;
    text-align: center;
    border: none;
    background: transparent;
    font-size: .95rem;
    font-weight: 600;
    font-family: var(--font);
    color: var(--c-text);
    -moz-appearance: textfield;
}

.counter-input::-webkit-inner-spin-button,
.counter-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
}

/* Highlight non-zero counters */
.counter-item.has-value {
    border-color: var(--c-primary);
    background: var(--c-primary-light);
}

/* ── SPECIAL ITEMS GRID ───────────────────────────────────── */
.special-items-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .75rem;
    margin-bottom: .5rem;
}

@media (max-width: 500px) {
    .special-items-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.special-card {
    cursor: pointer;
}

.special-card input {
    display: none;
}

.special-card-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .4rem;
    padding: 1rem .5rem;
    border: 2px solid var(--c-border);
    border-radius: var(--radius);
    transition: var(--transition);
    text-align: center;
}

.special-card-inner:hover {
    border-color: var(--c-primary);
}

.special-card input:checked + .special-card-inner {
    border-color: var(--c-primary);
    background: var(--c-primary-light);
    box-shadow: 0 2px 10px rgba(37,99,235,.15);
}

.special-icon {
    font-size: 1.6rem;
}

.special-name {
    font-size: .78rem;
    font-weight: 600;
    color: var(--c-text);
    line-height: 1.3;
}

/* ── ESTIMATE PANEL ───────────────────────────────────────── */
.estimate-panel {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 2px solid var(--c-primary-light);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin: 1rem 0;
}

.estimate-panel h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: center;
}

.estimate-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
}

.estimate-item {
    background: var(--c-surface);
    border-radius: var(--radius-sm);
    padding: .75rem 1rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.estimate-label {
    display: block;
    font-size: .75rem;
    color: var(--c-text-light);
    font-weight: 500;
    margin-bottom: .25rem;
}

.estimate-value {
    display: block;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--c-primary);
}

.estimate-disclaimer {
    font-size: .75rem;
    color: var(--c-text-light);
    text-align: center;
    margin-top: .75rem;
    font-style: italic;
}

/* ── SUMMARY ──────────────────────────────────────────────── */
.summary-details {
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.summary-details summary {
    padding: .75rem 1rem;
    font-weight: 600;
    font-size: .9rem;
    cursor: pointer;
    background: #f8fafc;
    list-style: none;
}

.summary-details summary::before {
    content: '▸ ';
}

.summary-details[open] summary::before {
    content: '▾ ';
}

.summary-content {
    padding: 1rem;
    font-size: .85rem;
    line-height: 1.7;
}

.summary-content .summary-section {
    margin-bottom: .75rem;
}

.summary-content .summary-section h4 {
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--c-primary);
    margin-bottom: .25rem;
}

.summary-content .summary-row {
    display: flex;
    justify-content: space-between;
    padding: .15rem 0;
    border-bottom: 1px dashed var(--c-border);
}

.summary-content .summary-row span:last-child {
    font-weight: 600;
}

/* ── CHECKBOX ─────────────────────────────────────────────── */
.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    font-size: .85rem;
    cursor: pointer;
    line-height: 1.5;
}

.checkbox-label input {
    margin-top: .25rem;
    accent-color: var(--c-primary);
}

/* ── NAVIGATION BUTTONS ───────────────────────────────────── */
.wizard-nav {
    display: flex;
    justify-content: space-between;
    max-width: 560px;
    margin: 1.5rem auto 0;
    padding: 0 .5rem;
}

.btn {
    padding: .7rem 1.5rem;
    border: none;
    border-radius: 999px;
    font-family: var(--font);
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: var(--c-primary);
    color: #fff;
    box-shadow: 0 2px 10px rgba(37,99,235,.25);
}

.btn-primary:hover {
    background: var(--c-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(37,99,235,.35);
}

.btn-secondary {
    background: transparent;
    color: var(--c-text-light);
    border: 2px solid var(--c-border);
}

.btn-secondary:hover {
    border-color: var(--c-text-light);
    color: var(--c-text);
}

.btn-submit {
    background: linear-gradient(135deg, var(--c-success), #15803d);
    color: #fff;
    font-size: 1rem;
    padding: .8rem 2rem;
    box-shadow: 0 4px 16px rgba(22,163,74,.3);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(22,163,74,.4);
}

.btn:disabled {
    opacity: .4;
    pointer-events: none;
}

/* ── SUCCESS CARD ─────────────────────────────────────────── */
.success-card {
    text-align: center;
    padding: 3rem 2rem;
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: pop .5s ease-out;
}

.success-card h2 {
    font-size: 1.8rem;
    margin-bottom: .75rem;
}

.success-card p {
    color: var(--c-text-light);
    margin-bottom: .5rem;
}

.success-ref {
    margin: 1rem 0 1.5rem;
    font-size: .9rem;
}

.success-ref strong {
    color: var(--c-primary);
    font-size: 1.1rem;
}

/* ── FOOTER ───────────────────────────────────────────────── */
.site-footer {
    text-align: center;
    padding: 2rem;
    color: var(--c-text-light);
    font-size: .8rem;
}

/* ── ANIMATIONS ───────────────────────────────────────────── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes pop {
    0%   { transform: scale(0); }
    70%  { transform: scale(1.15); }
    100% { transform: scale(1); }
}

/* ── SHAKE ANIMATION (validation) ─────────────────────────── */
.shake {
    animation: shake .4s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%      { transform: translateX(-8px); }
    40%      { transform: translateX(8px); }
    60%      { transform: translateX(-6px); }
    80%      { transform: translateX(6px); }
}

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 640px) {
    .hero {
        min-height: 50vh;
    }
    .hero h1 {
        font-size: 2rem;
    }
    .step-card {
        padding: 1.25rem;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
    .estimate-grid {
        grid-template-columns: 1fr;
    }
    .wizard-nav {
        padding: 0;
    }
    .step-dot small {
        display: none;
    }
}

/* ── DISTANCE PANEL ───────────────────────────────────────── */
.distance-panel {
    margin-top: 1.5rem;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 2px solid #bbf7d0;
    border-radius: var(--radius);
    padding: 1.25rem;
    animation: fadeUp .4s ease-out;
}

.distance-result {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
}

.distance-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .25rem;
    padding: .75rem;
    background: var(--c-surface);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}

.distance-icon {
    font-size: 1.4rem;
}

.distance-label {
    font-size: .75rem;
    color: var(--c-text-light);
    font-weight: 500;
}

.distance-value {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--c-success);
}

.distance-loading {
    margin-top: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    padding: 1rem;
    color: var(--c-text-light);
    font-size: .9rem;
    font-weight: 500;
}

.spinner {
    width: 22px;
    height: 22px;
    border: 3px solid var(--c-border);
    border-top-color: var(--c-primary);
    border-radius: 50%;
    animation: spin .7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 500px) {
    .distance-result {
        grid-template-columns: 1fr;
    }
}

/* ── VALIDATION HIGHLIGHTS ────────────────────────────────── */
.input-error {
    border-color: var(--c-danger) !important;
    box-shadow: 0 0 0 3px rgba(220,38,38,.15) !important;
}

/* ── TOOLTIP / INFO POPOVER ───────────────────────────────── */
.info-tip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--c-primary-light);
    color: var(--c-primary);
    font-size: .7rem;
    font-weight: 700;
    cursor: help;
    position: relative;
    vertical-align: middle;
    margin-left: .25rem;
}

.info-tip::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--c-text);
    color: #fff;
    font-size: .75rem;
    font-weight: 400;
    padding: .5rem .75rem;
    border-radius: var(--radius-sm);
    white-space: normal;
    width: 220px;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s;
    z-index: 10;
    line-height: 1.4;
}

.info-tip:hover::after {
    opacity: 1;
}

/* ── MAPS SECTION ─────────────────────────────────────────── */
.maps-section {
    margin-top: 2rem;
}

.maps-section h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--c-text);
    margin-bottom: 1rem;
}

.maps-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

@media (max-width: 600px) {
    .maps-grid {
        grid-template-columns: 1fr;
    }
}

.map-card {
    background: var(--c-bg);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.map-card h4 {
    font-size: .95rem;
    font-weight: 700;
    color: var(--c-text);
    margin: 0;
}

.map-address {
    font-size: .85rem;
    color: var(--c-text-light);
    line-height: 1.4;
}

.map-buttons {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}

.map-link-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .5rem 1rem;
    font-size: .82rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid transparent;
}

.map-link-btn.satellite {
    background: #e0f2fe;
    color: #0369a1;
    border-color: #bae6fd;
}

.map-link-btn.satellite:hover {
    background: #bae6fd;
    color: #075985;
}

.map-link-btn.streetview {
    background: #fef3c7;
    color: #92400e;
    border-color: #fde68a;
}

.map-link-btn.streetview:hover {
    background: #fde68a;
    color: #78350f;
}

.map-unavailable {
    font-size: .82rem;
    color: var(--c-text-light);
    font-style: italic;
    padding: .25rem 0;
}

/* ── DEBUG TOOLBAR ────────────────────────────────────────── */
.debug-toolbar {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    display: flex;
    gap: .5rem;
    z-index: 9999;
    opacity: .55;
    transition: opacity .2s;
}

.debug-toolbar:hover {
    opacity: 1;
}

.debug-btn {
    padding: .45rem .9rem;
    font-size: .75rem;
    font-weight: 600;
    border: 1px solid #94a3b8;
    border-radius: 6px;
    background: #fff;
    color: #475569;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.debug-btn:hover {
    background: #f1f5f9;
    border-color: #64748b;
    color: #1e293b;
}

/* ── FILE UPLOAD ──────────────────────────────────────────── */
.upload-zone {
    border: 2px dashed var(--c-border);
    border-radius: var(--radius);
    padding: 2rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--c-bg);
}

.upload-zone:hover,
.upload-zone.drag-over {
    border-color: var(--c-primary);
    background: var(--c-primary-light);
}

.upload-prompt {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .4rem;
}

.upload-icon {
    font-size: 2rem;
}

.upload-prompt p {
    font-size: .9rem;
    color: var(--c-text-light);
    margin: 0;
}

.upload-browse {
    color: var(--c-primary);
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
}

.upload-hint {
    font-size: .78rem !important;
    color: var(--c-text-light);
}

.upload-preview {
    margin-top: .75rem;
}

.upload-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: .75rem;
}

.upload-thumb {
    position: relative;
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--c-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: .5rem;
    gap: .25rem;
}

.upload-thumb-img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

.upload-thumb-video {
    width: 100%;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: #1e293b;
    border-radius: 4px;
    color: #fff;
}

.upload-thumb-name {
    font-size: .7rem;
    color: var(--c-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    text-align: center;
}

.upload-thumb-size {
    font-size: .65rem;
    color: var(--c-text-light);
}

.upload-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 50%;
    background: var(--c-danger);
    color: #fff;
    font-size: .7rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    opacity: .8;
    transition: opacity .15s;
}

.upload-remove:hover {
    opacity: 1;
}

.upload-count {
    font-size: .8rem;
    color: var(--c-text-light);
    margin-top: .5rem;
    text-align: center;
}

/* ── Hero Retrieve Link ────────────────────────────────────── */
.hero-retrieve {
    margin-top: 1rem;
    font-size: .95rem;
    color: var(--c-text-light);
}

.hero-retrieve a {
    color: var(--c-accent);
    cursor: pointer;
    text-decoration: underline;
    transition: color .2s;
}

.hero-retrieve a:hover {
    color: var(--c-primary);
}

/* ── Retrieve Modal ────────────────────────────────────────── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, .55);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-card {
    background: var(--c-bg);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    max-width: 440px;
    width: 100%;
    position: relative;
    box-shadow: var(--shadow-lg);
    animation: modalIn .3s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-card h3 {
    margin-bottom: .5rem;
    font-size: 1.3rem;
}

.modal-card p {
    color: var(--c-text-light);
    margin-bottom: 1.5rem;
    font-size: .95rem;
}

.modal-card .form-field {
    margin-bottom: 1rem;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--c-text-light);
    line-height: 1;
    padding: .25rem;
    transition: color .2s;
}

.modal-close:hover {
    color: var(--c-text);
}

.modal-status {
    font-size: .9rem;
    margin-top: .75rem;
    min-height: 1.2em;
}

.modal-status.error {
    color: var(--c-danger, #e74c3c);
}

.modal-status.success {
    color: var(--c-success, #27ae60);
}

/* ── Success Screen Extras ─────────────────────────────────── */
.success-hint {
    margin-top: 1rem;
    font-size: .9rem;
    color: var(--c-text-light);
    font-style: italic;
}

.success-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.success-actions .btn {
    min-width: 200px;
}

/* ── Special item detail fields ────────────────────────────── */
.special-detail {
    margin-top: .5rem;
    padding-left: 1.5rem;
}

.special-detail textarea {
    font-size: .9rem;
    min-height: 60px;
}

/* ── TV Size Inputs ────────────────────────────────────────── */
.tv-size-inputs {
    margin-top: .75rem;
    padding: 1rem 1.25rem;
    background: var(--c-surface);
    border-radius: var(--radius);
    border: 1px solid var(--c-border);
}

.tv-size-row {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: .5rem;
}

.tv-size-row:last-child {
    margin-bottom: 0;
}

.tv-size-row label {
    min-width: 3.5rem;
    font-weight: 600;
    font-size: .9rem;
    color: var(--c-text-light);
}

.tv-size-field {
    flex: 1;
    padding: .5rem .75rem;
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    font-size: .9rem;
    transition: border-color .2s;
}

.tv-size-field:focus {
    outline: none;
    border-color: var(--c-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .1);
}

/* ── Embedded / iframe mode ────────────────────────────────── */
body.embedded {
    background: #fff;
}

body.embedded .hero {
    display: none !important;
}

body.embedded footer {
    display: none !important;
}

body.embedded .debug-toolbar {
    display: none !important;
}

body.embedded .wizard-wrapper {
    padding: .25rem .5rem 1rem;
}

body.embedded .wizard-wrapper .container {
    max-width: 100%;
    padding: 0 .75rem;
}

/* Progress bar – compact */
body.embedded .progress-bar {
    padding: .5rem 0 .25rem;
    margin-bottom: .75rem;
}

body.embedded .step-dot span {
    width: 24px;
    height: 24px;
    font-size: .7rem;
}

body.embedded .step-dot small {
    font-size: .55rem;
}

/* Step cards – compact */
body.embedded .step-card {
    padding: 1rem 1.25rem;
}

body.embedded .step-header {
    margin-bottom: 1rem;
}

body.embedded .step-icon {
    font-size: 1.8rem;
    margin-bottom: .25rem;
}

body.embedded .step-header h2 {
    font-size: 1.2rem;
    margin-bottom: .2rem;
}

body.embedded .step-desc {
    font-size: .85rem;
}

/* Form elements – compact */
body.embedded .form-group {
    margin-bottom: .75rem;
}

body.embedded .form-group label {
    font-size: .85rem;
    margin-bottom: .25rem;
}

body.embedded .form-group input[type="text"],
body.embedded .form-group input[type="email"],
body.embedded .form-group input[type="tel"],
body.embedded .form-group input[type="number"],
body.embedded .form-group input[type="date"],
body.embedded .form-group select,
body.embedded .form-group textarea {
    padding: .5rem .7rem;
    font-size: .9rem;
}

body.embedded .field-hint {
    font-size: .75rem;
    margin-top: .2rem;
}

/* Counter rows – compact */
body.embedded .counter-row {
    padding: .4rem 0;
}

body.embedded .counter-label {
    font-size: .85rem;
}

/* Toggle buttons – compact */
body.embedded .toggle-btn {
    padding: .4rem .8rem;
    font-size: .8rem;
}

/* Navigation – compact */
body.embedded .wizard-nav {
    margin: .75rem auto 0;
}

body.embedded .btn {
    padding: .55rem 1.2rem;
    font-size: .9rem;
}

/* Success card – compact */
body.embedded .success-card {
    padding: 1.5rem 1rem;
}

body.embedded .success-icon {
    font-size: 2.5rem;
    margin-bottom: .5rem;
}

body.embedded .success-card h2 {
    font-size: 1.4rem;
}

/* Checkbox labels – compact */
body.embedded .checkbox-label {
    font-size: .85rem;
    padding: .4rem .6rem;
}

/* Section headers inside steps */
body.embedded h3 {
    font-size: 1rem;
    margin-top: .75rem;
    margin-bottom: .5rem;
}

/* Summary step – compact */
body.embedded .summary-block {
    padding: .75rem;
    margin-bottom: .5rem;
}

body.embedded .summary-block h4 {
    font-size: .85rem;
    margin-bottom: .35rem;
}

body.embedded .summary-row {
    font-size: .85rem;
    padding: .2rem 0;
}
