/*
 * MTMS shared step-wizard styling.
 * ---------------------------------------------------------------------------
 * Used by any form marked up per wwwroot/js/wizard.js's contract:
 * a progress bar of numbered steps, one step panel visible at a time, and a
 * Back/Next/Save navigation bar. Reads the page's own --primary custom
 * property when one is set (Signup has its own purple theme) and otherwise
 * falls back to the main app's blue.
 */

.wizard-steps {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .5rem;
    margin-bottom: 2rem;
    counter-reset: wizard-step;
}

.wizard-step-dot {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    cursor: default;
}

/* The connecting line runs behind every dot except the first. */
.wizard-step-dot:not(:first-child)::before {
    content: "";
    position: absolute;
    top: 17px;
    right: 50%;
    width: 100%;
    height: 2px;
    background: var(--bs-border-color, #dee2e6);
    z-index: 0;
}

.wizard-step-dot.is-done:not(:first-child)::before,
.wizard-step-dot.is-active:not(:first-child)::before {
    background: var(--primary, #2563eb);
}

.wizard-step-circle {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .95rem;
    background: #fff;
    border: 2px solid var(--bs-border-color, #dee2e6);
    color: #6b7280;
    position: relative;
    z-index: 1;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.wizard-step-label {
    margin-top: .4rem;
    font-size: .78rem;
    font-weight: 600;
    color: #6b7280;
    max-width: 9rem;
}

.wizard-step-dot.is-active .wizard-step-circle {
    background: var(--primary, #2563eb);
    border-color: var(--primary, #2563eb);
    color: #fff;
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary, #2563eb) 18%, transparent);
}

.wizard-step-dot.is-active .wizard-step-label {
    color: var(--primary, #2563eb);
}

.wizard-step-dot.is-done .wizard-step-circle {
    background: var(--primary, #2563eb);
    border-color: var(--primary, #2563eb);
    color: #fff;
}

.wizard-step-dot.is-done .wizard-step-circle::after {
    content: "\2713";
}

.wizard-step-dot.is-done .wizard-step-circle {
    font-size: 0;
}

.wizard-step-dot.is-done .wizard-step-circle::after {
    font-size: 1rem;
}

.wizard-step-dot.is-done {
    cursor: pointer;
}

/* Step panels */
[data-wizard-step] {
    animation: wizard-fade-in .18s ease;
}

@keyframes wizard-fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Navigation bar */
[data-wizard-nav] {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--bs-border-color, #eef0f4);
}

[data-wizard-nav] .wizard-nav-spacer {
    flex: 1 1 auto;
}

/* Mandatory-field highlighting */
.form-label.required::after,
label.req::after {
    content: " *";
    color: var(--bs-danger, #dc3545);
    font-weight: 700;
}

.wizard-required-hint {
    font-size: .78rem;
    color: #6b7280;
}

.wizard-required-hint .req-mark {
    color: var(--bs-danger, #dc3545);
    font-weight: 700;
}

/* A field the wizard blocked Next/Submit on - stronger than Bootstrap's
   default is-invalid so it's obvious which field needs attention even in a
   long step. */
.is-invalid {
    background-color: rgba(220, 53, 69, 0.03);
}

/* Address confirmation modal (built by location-editor.js) */
.mtms-address-confirm .address-option {
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-radius: 10px;
    padding: .9rem 1rem;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}

.mtms-address-confirm .address-option:hover {
    border-color: var(--primary, #2563eb);
    background: color-mix(in srgb, var(--primary, #2563eb) 5%, transparent);
}

.mtms-address-confirm .address-option .label {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    color: #6b7280;
    text-transform: uppercase;
}
