/* ===== Variables (matching roof-configurator palette) ===== */
:root {
    --bg: #384001;
    --surface: #FFFFFF;
    --surface-alt: #EAE6DF;
    --border: #D4CFC6;
    --border-active: #2D5A3D;
    --text: #FFFFFF;
    --text-dark: #000000;
    --text-muted: #6B6860;
    --accent: #ff6400;
    --accent-hover: #e55a00;
    --accent-light: rgba(255,100,0,0.08);
    --accent-lighter: rgba(255,100,0,0.04);
    --accent-green: #B1C805;
    --accent-green-hover: #96AA04;
    --danger: #C0392B;
    --radius: 6px;
    --radius-lg: 10px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
}

/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ===== Step Indicator — centered header ===== */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    background: transparent;
    border-bottom: 1px solid var(--border);
    padding: 16px 40px 0;
    height: 64px;
    box-shadow: none;
    max-width: 1320px;
    margin: 0 auto;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 24px;
    height: 100%;
    position: relative;
}

    .step-item.active::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 2px;
        background: var(--accent);
    }

.step-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 12px;
    flex-shrink: 0;
    color: var(--text);
    transition: all 0.25s;
}

    .step-number.active {
        background: var(--accent);
        border-color: var(--accent);
        color: #fff;
    }

.step-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
}

    .step-label.active {
        color: var(--text);
        font-weight: 600;
    }

.step-separator {
    color: var(--text-muted);
    font-size: 18px;
    margin: 0 4px;
}

/* ===== Wizard Container — content area between header and footer ===== */
.wizard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
}

.page-content {
    padding: 32px 40px 32px;
    max-width: 1320px;
    margin: 0 auto;
}

/* ===== Page Subtitle ===== */
.page-subtitle {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--text);
}

/* ===== Three Column Layout ===== */
.three-col {
    display: grid;
    grid-template-columns: 340px 1fr 260px;
    gap: 24px;
    min-height: 450px;
}

/* ===== Content Cards (left, center, right columns) ===== */
.col-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
}

/* ===== Column Headers ===== */
.col-header {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

/* ===== Left Column - Tree Selection ===== */
.tree-list {
    list-style: none;
}

    .tree-list li {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 10px 8px;
        cursor: pointer;
        border-bottom: 1px solid var(--surface-alt);
        transition: background 0.15s;
        border-radius: var(--radius);
    }

        .tree-list li:hover {
            background: var(--accent-lighter);
        }

        .tree-list li.selected {
            background: var(--accent-light);
        }

/* Toggle switch */
.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

    .toggle-switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--border);
    border-radius: 24px;
    transition: 0.3s;
}

    .toggle-slider::before {
        content: '';
        position: absolute;
        height: 18px;
        width: 18px;
        left: 3px;
        bottom: 3px;
        background: white;
        border-radius: 50%;
        transition: 0.3s;
    }

.toggle-switch input:checked + .toggle-slider {
    background: var(--accent);
}

    .toggle-switch input:checked + .toggle-slider::before {
        transform: translateX(20px);
    }

.tree-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
}

/* ===== Center Column ===== */
.center-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.tree-preview-img {
    max-width: 100%;
    max-height: 300px;
    margin-bottom: 20px;
    border-radius: 8px;
}

.height-options {
    width: 100%;
}

.height-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--surface-alt);
}

.height-label {
    font-size: 14px;
    font-weight: 500;
    min-width: 80px;
    color: var(--text-dark);
}

.height-price {
    font-size: 13px;
    color: var(--text-muted);
    min-width: 80px;
}

.qty-input {
    width: 60px;
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    text-align: center;
    background: var(--surface-alt);
}

    .qty-input:focus {
        outline: none;
        border-color: var(--accent);
        background: var(--surface);
    }

.add-btn {
    padding: 6px 16px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.2s;
}

    .add-btn:hover {
        background: var(--accent-hover);
    }

/* ===== Right Column - Price Summary ===== */
.price-summary {
}

.price-row {
    display: grid;
    grid-template-columns: 1fr 15px 70px auto;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    font-size: 14px;
    border-bottom: 1px solid var(--surface-alt);
}

    .price-row .item-name {
        font-weight: 500;
        color: var(--text-dark);
        white-space: normal;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .price-row .item-qty {
        text-align: center;
        color: var(--text-muted);
    }

    .price-row .item-price {
        text-align: right;
        font-weight: 500;
        color: var(--text-dark);
    }

    .price-row .remove-btn {
        background: none;
        border: none;
        color: var(--danger);
        cursor: pointer;
        font-size: 16px;
        margin-left: 8px;
        padding: 0 4px;
        border-radius: 4px;
        transition: background 0.15s;
    }

        .price-row .remove-btn:hover {
            background: rgba(192,57,43,0.08);
        }

.price-total {
    display: flex;
    justify-content: space-between;
    padding: 14px 0;
    font-size: 16px;
    font-weight: 700;
    border-top: 2px solid var(--border);
    margin-top: 8px;
    color: var(--text-dark);
}

/* ===== Navigation Buttons — centered footer ===== */
.nav-buttons {
    display: flex;
    justify-content: space-between;
    background: transparent;
    border-top: 1px solid var(--border);
    padding: 16px 40px;
    box-shadow: none;
    max-width: 1320px;
    margin: 0 auto;
}

.nav-buttons .btn-next {
    margin-left: auto;
}

.btn-back, .btn-next, .btn-submit {
    padding: 10px 28px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--border);
    transition: all 0.2s;
    font-family: inherit;
}

.btn-back {
    border-color: var(--accent-green);
    color: var(--text);
    background: var(--accent-green);
}

    .btn-back:hover {
        background: var(--accent-green-hover);
    }

.btn-next {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

    .btn-next:hover {
        background: var(--accent-hover);
    }

.btn-submit {
    background: var(--accent-green);
    color: #fff;
    border-color: var(--accent-green);
}

    .btn-submit:hover {
        background: var(--accent-green-hover);
    }

/* ===== Page 2 - Canvas ===== */
.upload-section {
}

    .upload-section h3 {
        font-size: 13px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.4px;
        color: var(--accent);
        margin-bottom: 10px;
    }

.file-input-wrapper {
    margin-bottom: 16px;
}

.file-input-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-name {
    font-size: 13px;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.upload-btn {
    padding: 8px 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s;
}

    .upload-btn:hover {
        border-color: var(--accent);
        color: var(--text-dark);
        background: var(--accent-light);
    }

.tree-palette h3 {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--accent);
    margin-bottom: 10px;
    margin-top: 20px;
}

.tree-palette-list {
    list-style: none;
}

.tree-palette-item {
    position: relative;
    cursor: pointer;
    border-radius: var(--radius);
    overflow: hidden;
    min-height: 60px;
    margin-bottom: 6px;
    background-color: var(--surface-alt);
    transition: transform 0.15s, box-shadow 0.15s;
}

    .tree-palette-item:hover {
        transform: translateY(-1px);
        box-shadow: var(--shadow-md);
    }

.palette-overlay {
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-height: 60px;
    justify-content: center;
}

.palette-name {
    font-size: 14px;
    font-weight: 600;
}

.palette-height {
    font-size: 13px;
    opacity: 0.85;
}

.tree-palette-list li .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #333;
    flex-shrink: 0;
}

.canvas-wrapper {
    background: #FAFAF7;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* ===== Page 3 - Summary ===== */
.contact-form label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-muted);
    margin-bottom: 6px;
    margin-top: 8px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    font-family: inherit;
    background: var(--surface-alt);
    transition: border 0.15s;
}

    .contact-form input:focus,
    .contact-form textarea:focus {
        outline: none;
        border-color: var(--accent);
        background: var(--surface);
    }

.contact-form textarea {
    height: 70px;
    resize: vertical;
}

.contact-form .required {
    color: #e74c3c;
}

.contact-form input.input-error,
.contact-form textarea.input-error {
    border-color: #e74c3c;
}

.contact-form .field-error {
    color: #e74c3c;
    font-size: 11px;
    margin-top: 2px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.quote-code {
    margin-top: 20px;
    font-size: 13px;
    color: var(--text-muted);
}

    .quote-code strong {
        font-family: monospace;
        font-size: 14px;
        color: var(--text);
    }

.btn-pdf {
    padding: 10px 24px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    float: right;
    margin-bottom: 16px;
    transition: background 0.2s;
}

    .btn-pdf:hover {
        background: var(--accent-hover);
    }

.drawings-section {
    text-align: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
}

    .drawings-section img {
        max-width: 100%;
        border-radius: var(--radius);
        border: 1px solid var(--border);
    }

/* ===== Empty states ===== */
.empty-state {
    color: var(--text-muted);
    font-style: italic;
    font-size: 14px;
    padding: 20px 0;
    text-align: center;
}

/* ===== Toast Notifications ===== */
.toast-container {
    position: fixed;
    top: 80px;
    right: 24px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
    pointer-events: auto;
    opacity: 0;
    transform: translateX(40px);
    animation: toast-in 0.3s ease forwards;
    max-width: 360px;
}

    .toast.toast-success {
        border-left-color: var(--accent-green);
    }

    .toast.toast-error {
        border-left-color: var(--danger);
    }

    .toast.toast-info {
        border-left-color: var(--text-muted);
    }

    .toast.toast-out {
        animation: toast-out 0.25s ease forwards;
    }

.toast-icon {
    font-size: 16px;
    flex-shrink: 0;
    line-height: 1;
}

.toast-success .toast-icon {
    color: var(--accent-green);
}

.toast-error .toast-icon {
    color: var(--danger);
}

.toast-info .toast-icon {
    color: var(--text-muted);
}

.toast-message {
    flex: 1;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 16px;
    padding: 0 2px;
    line-height: 1;
    transition: color 0.15s;
}

    .toast-close:hover {
        color: var(--text);
    }

@keyframes toast-in {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toast-out {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(40px);
    }
}

/* ===== Utility ===== */
.hidden {
    display: none !important;
}

/* ===== Canvas delete button ===== */
.canvas-controls {
    margin-top: 10px;
    text-align: center;
}

    .canvas-controls button {
        padding: 6px 16px;
        background: transparent;
        color: var(--danger);
        border: 1px solid transparent;
        border-radius: var(--radius);
        cursor: pointer;
        font-size: 13px;
        font-weight: 500;
        transition: all 0.15s;
    }

        .canvas-controls button:hover {
            background: rgba(192,57,43,0.08);
            border-color: var(--danger);
        }

/* ===== Tree icon SVG placeholder ===== */
.tree-icon {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
}

/* ===== Thank You ===== */
.thank-you {
    max-width: 640px;
    margin: 80px auto;
    padding: 48px 40px;
    text-align: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    color: var(--text-dark);
}

.thank-you h1 {
    margin-bottom: 16px;
    color: var(--accent-green);
    font-size: 28px;
}

.thank-you p {
    font-size: 16px;
    line-height: 1.5;
}

.thank-you .download-pdf {
    display: inline-block;
    margin-top: 24px;
    padding: 12px 28px;
    background: var(--accent);
    color: #fff;
    border-radius: var(--radius);
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}

.thank-you .download-pdf:hover {
    background: var(--accent-hover);
}

/* ===== Responsive: Tablet (<=1024px) ===== */
@media (max-width: 1024px) {
    .step-indicator {
        padding: 0 20px;
    }

    .page-content {
        padding: 24px 20px 24px;
    }

    .three-col {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        min-height: auto;
    }

        .three-col > :nth-child(3) {
            grid-column: 1 / -1;
        }

    .step-item {
        padding: 0 16px;
    }

    .step-label {
        font-size: 12px;
    }

    .step-number {
        width: 26px;
        height: 26px;
        font-size: 11px;
    }

    .canvas-wrapper {
        width: 100%;
    }

    .nav-buttons {
        padding: 14px 20px;
    }
}

/* ===== Responsive: Mobile (<=640px) ===== */
@media (max-width: 640px) {
    .step-indicator {
        padding: 0 14px;
        height: 54px;
    }

    .page-content {
        padding: 16px 14px 16px;
    }

    .step-number {
        width: 24px;
        height: 24px;
        font-size: 10px;
    }

    .step-label {
        font-size: 11px;
    }

    .step-item {
        padding: 0 10px;
    }

    .step-separator {
        font-size: 14px;
    }

    .page-subtitle {
        font-size: 14px;
        margin-bottom: 16px;
    }

    .three-col {
        grid-template-columns: 1fr;
        gap: 16px;
    }

        .three-col > :nth-child(3) {
            grid-column: auto;
        }

    .col-header {
        font-size: 13px;
        margin-bottom: 12px;
    }

    .height-row {
        flex-wrap: wrap;
        gap: 8px;
    }

    .height-label {
        min-width: 60px;
        font-size: 14px;
    }

    .height-price {
        min-width: 60px;
        font-size: 13px;
    }

    .canvas-wrapper {
        width: 100%;
        overflow-x: auto;
    }

    .nav-buttons {
        padding: 12px 14px;
    }

    .btn-back, .btn-next, .btn-submit {
        padding: 10px 20px;
        font-size: 14px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .btn-pdf {
        float: none;
        width: 100%;
        margin-bottom: 16px;
    }

    .price-row {
        font-size: 13px;
        grid-template-columns: 1fr 28px 70px auto;
        gap: 4px;
    }

    .col-card {
        padding: 16px;
    }

    .center-col {
        padding: 16px;
    }
}
