﻿.wizard-container {
    max-width: 600px;
    margin: 0 auto;
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,.08);
}
/* in wizard.css or overrides.css */
.wizard-footer {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

    .wizard-footer .btn {
        flex: 1 1 160px;
    }
.wizard-step {
    display: none;
}

    .wizard-step.active {
        display: block;
    }

.wizard-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    gap: 0.5rem;
}

    .wizard-buttons button {
        flex: 1;
        min-height: 44px;
    }

.wizard-progress {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 0.65rem;
    flex-wrap: nowrap;
}

    .wizard-progress span {
        flex: 1 1 0;
        min-width: 0;
        text-align: center;
        opacity: 0.4;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .wizard-progress .active {
        font-weight: 600;
        opacity: 1;
    }

.field-row {
    display: flex;
    gap: 0.75rem;
}

    .field-row > div {
        flex: 1;
    }

.field-group {
    margin-bottom: 0.75rem;
}

    .field-group label {
        display: block;
        font-size: 0.85rem;
        margin-bottom: 0.25rem;
    }

    .field-group input,
    .field-group select {
        width: 100%;
        padding: 0.45rem 0.5rem;
        border-radius: 4px;
        border: 1px solid #ccc;
        font-size: 0.9rem;
    }

/* =========================================================
   MOBILE IMPROVEMENTS
   ========================================================= */

/* Stack inputs on phones + better tap targets */
@media (max-width: 640px) {
    .wizard-container {
        padding: 1rem;
        border-radius: 10px;
    }

    .field-row {
        flex-direction: column;
        gap: 0.5rem;
    }

    .field-group input,
    .field-group select {
        padding: 0.6rem 0.65rem;
        font-size: 16px; /* prevents iOS zoom */
        border-radius: 8px;
    }

    .field-group label {
        font-size: 0.9rem;
    }

    .wizard-buttons {
        gap: 0.75rem;
    }

        .wizard-buttons button {
            font-size: 16px;
        }
}
/* Wizard error visibility (replaces style.display in JS) */
#wizard-error {
    display: none;
}

    #wizard-error.is-visible {
        display: block;
    }

/* Loader visibility (replaces style.display="flex" in JS) */
#processing-loader {
    display: none;
}

    #processing-loader.is-visible {
        display: flex;
    }

/* Busy state (replaces opacity/pointerEvents inline styles) */
.wizard-container.is-busy {
    opacity: 0.3;
    pointer-events: none;
}

/* Progress becomes scrollable "chips" instead of tiny ellipses */
@media (max-width: 520px) {
    .wizard-progress {
        justify-content: flex-start;
        gap: 8px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 6px;
        scrollbar-width: none;
        font-size: 0.75rem;
    }

        .wizard-progress::-webkit-scrollbar {
            display: none;
        }

        .wizard-progress span {
            flex: 0 0 auto;
            min-width: max-content;
            padding: 6px 10px;
            border-radius: 999px;
            background: rgba(0,0,0,0.04);
            opacity: 0.5;
            /* disable ellipsis mode for chips */
            overflow: visible;
            text-overflow: clip;
            white-space: nowrap;
        }

        .wizard-progress .active {
            opacity: 1;
            background: rgba(15, 138, 75, 0.12);
        }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}
