/* ═══════════════════════════════════════════
   ORDER FORMS — Marquo.fr
   Multi-step wizard UI
   ═══════════════════════════════════════════ */

/* ─── WIZARD CONTAINER ─── */
.wizard {
    max-width: 820px;
    margin: 0 auto;
}

/* ─── PROGRESS STEPPER ─── */
.wizard__stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
    padding: 0 16px;
    counter-reset: step;
}

.wizard__step {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--gray-400);
    transition: color 0.3s;
    white-space: nowrap;
}

.wizard__step-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gray-100);
    border: 2px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--gray-400);
    transition: all 0.3s;
    flex-shrink: 0;
}

.wizard__step--active .wizard__step-dot {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.15);
}

.wizard__step--active {
    color: var(--primary);
    font-weight: 600;
}

.wizard__step--done .wizard__step-dot {
    background: var(--secondary);
    border-color: var(--secondary);
    color: var(--white);
}

.wizard__step--done {
    color: var(--secondary);
}

.wizard__step-line {
    width: 48px;
    height: 2px;
    background: var(--gray-200);
    margin: 0 8px;
    flex-shrink: 0;
    transition: background 0.3s;
}

.wizard__step--done + .wizard__step-line,
.wizard__step-line--done {
    background: var(--secondary);
}

/* ─── STEP PANELS ─── */
.wizard__panel {
    display: none;
    animation: wizardFadeIn 0.35s ease;
}

.wizard__panel--active {
    display: block;
}

@keyframes wizardFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ─── STEP CARD ─── */
.wizard__card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 36px 32px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-100);
}

.wizard__card-title {
    font-size: 1.375rem;
    font-weight: 800;
    color: var(--gray-900);
    margin: 0 0 6px;
    letter-spacing: -0.02em;
}

.wizard__card-subtitle {
    font-size: 0.9375rem;
    color: var(--gray-500);
    margin: 0 0 28px;
    line-height: 1.5;
}

/* ─── SERVICE TYPE SELECTOR ─── */
.service-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.service-option {
    position: relative;
    cursor: pointer;
}

.service-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.service-option__card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 28px 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    background: var(--white);
    transition: all 0.2s;
    text-align: center;
}

.service-option__card:hover {
    border-color: var(--gray-300);
    box-shadow: var(--shadow-sm);
}

.service-option input:checked + .service-option__card {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb), 0.03);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.service-option__icon {
    font-size: 2rem;
    line-height: 1;
}

.service-option__label {
    font-weight: 700;
    font-size: 0.9375rem;
    color: var(--gray-900);
}

.service-option__desc {
    font-size: 0.8125rem;
    color: var(--gray-500);
    line-height: 1.4;
}

/* ─── PLAN SELECTOR ─── */
.plan-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.plan-option {
    position: relative;
    cursor: pointer;
}

.plan-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.plan-option__card {
    padding: 28px 24px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    background: var(--white);
    transition: all 0.2s;
    position: relative;
    height: 100%;
}

.plan-option__card:hover {
    border-color: var(--gray-300);
    box-shadow: var(--shadow-sm);
}

.plan-option input:checked + .plan-option__card {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb), 0.02);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.plan-option__badge {
    position: absolute;
    top: -11px;
    right: 16px;
    background: var(--secondary);
    color: var(--white);
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.plan-option__name {
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.plan-option__price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 4px;
}

.plan-option__price-note {
    font-size: 0.8125rem;
    color: var(--gray-500);
    margin-bottom: 16px;
}

.plan-option__features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.plan-option__features li {
    font-size: 0.8125rem;
    color: var(--gray-600);
    padding: 5px 0;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.4;
}

.plan-option__features li::before {
    content: '✓';
    color: var(--secondary);
    font-weight: 700;
    flex-shrink: 0;
}

/* ─── NICE CLASS SELECTOR (in form) ─── */
.class-selector__search {
    position: relative;
    margin-bottom: 16px;
}

.class-selector__search input {
    width: 100%;
    padding: 12px 14px 12px 40px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    font-family: var(--font-body);
    color: var(--gray-900);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    box-sizing: border-box;
}

.class-selector__search input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.class-selector__search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    pointer-events: none;
}

.class-selector__selected {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    min-height: 0;
}

.class-selector__tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: rgba(var(--primary-rgb), 0.08);
    color: var(--primary);
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    font-weight: 600;
}

.class-selector__tag-remove {
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
    font-size: 1rem;
    line-height: 1;
}

.class-selector__tag-remove:hover {
    opacity: 1;
}

.class-selector__summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 0.875rem;
}

.class-selector__cost {
    font-weight: 700;
    color: var(--primary);
}

.class-selector__list {
    max-height: 360px;
    overflow-y: auto;
    border: 1px solid var(--gray-100);
    border-radius: var(--radius-sm);
}

.class-selector__item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--gray-100);
    cursor: pointer;
    transition: background 0.15s;
    user-select: none;
}

.class-selector__item:last-child {
    border-bottom: none;
}

.class-selector__item:hover {
    background: var(--gray-50);
}

.class-selector__item--selected {
    background: rgba(var(--primary-rgb), 0.04);
}

.class-selector__item-checkbox {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 2px solid var(--gray-300);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}

.class-selector__item--selected .class-selector__item-checkbox {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.class-selector__item-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8125rem;
    color: var(--gray-600);
    flex-shrink: 0;
}

.class-selector__item--selected .class-selector__item-num {
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
}

.class-selector__item-info {
    flex: 1;
    min-width: 0;
}

.class-selector__item-title {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--gray-800);
}

.class-selector__item-desc {
    font-size: 0.75rem;
    color: var(--gray-500);
    line-height: 1.4;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ─── FORM FIELDS IN WIZARD ─── */
.wizard__form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.wizard__form-group {
    margin-bottom: 20px;
}

.wizard__form-group label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 6px;
}

.wizard__form-group .form-input {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    font-family: var(--font-body);
    color: var(--gray-900);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    box-sizing: border-box;
}

.wizard__form-group .form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.wizard__form-group .form-input::placeholder {
    color: var(--gray-400);
}

.wizard__form-group textarea.form-input {
    resize: vertical;
    min-height: 80px;
}

.wizard__form-group .form-hint {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-top: 4px;
}

.wizard__form-group .form-label-opt {
    color: var(--gray-400);
    font-weight: 400;
}

/* File upload */
.wizard__upload {
    border: 2px dashed var(--gray-200);
    border-radius: var(--radius-sm);
    padding: 32px 24px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.wizard__upload:hover {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb), 0.02);
}

.wizard__upload-icon {
    font-size: 2rem;
    margin-bottom: 8px;
    color: var(--gray-400);
}

.wizard__upload-text {
    font-size: 0.875rem;
    color: var(--gray-600);
}

.wizard__upload-hint {
    font-size: 0.75rem;
    color: var(--gray-400);
    margin-top: 4px;
}

.wizard__upload-preview {
    margin-top: 12px;
    display: none;
}

.wizard__upload-preview img {
    max-width: 200px;
    max-height: 120px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--gray-200);
}

.wizard__upload-preview-name {
    font-size: 0.8125rem;
    color: var(--gray-600);
    margin-top: 6px;
}

/* ─── NAVIGATION BUTTONS ─── */
.wizard__nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 28px;
    gap: 16px;
}

.wizard__btn {
    padding: 13px 28px;
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.wizard__btn--prev {
    background: var(--white);
    color: var(--gray-600);
    border: 1.5px solid var(--gray-200);
}

.wizard__btn--prev:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
}

.wizard__btn--next {
    background: var(--primary);
    color: var(--white);
    margin-left: auto;
}

.wizard__btn--next:hover {
    background: var(--primary-light);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3);
    transform: translateY(-1px);
}

.wizard__btn--next:active {
    transform: translateY(0);
}

.wizard__btn--submit {
    background: var(--secondary);
    color: var(--white);
    margin-left: auto;
    padding: 14px 32px;
    font-size: 1rem;
}

.wizard__btn--submit:hover {
    background: var(--secondary-dark);
    box-shadow: 0 4px 12px rgba(var(--secondary-rgb), 0.3);
    transform: translateY(-1px);
}

/* ─── ORDER SUMMARY (side / bottom) ─── */
.wizard__summary {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 24px;
    margin-top: 28px;
}

.wizard__summary-title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gray-200);
}

.wizard__summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.wizard__summary-row--total {
    font-size: 1rem;
    font-weight: 800;
    color: var(--gray-900);
    padding-top: 12px;
    margin-top: 8px;
    border-top: 2px solid var(--gray-200);
}

.wizard__summary-value {
    font-weight: 600;
    color: var(--gray-800);
}

/* ─── DURATION / TERRITORY ─── */
.territory-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.territory-option {
    position: relative;
    cursor: pointer;
}

.territory-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.territory-option__card {
    padding: 20px 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    text-align: center;
    transition: all 0.2s;
}

.territory-option__card:hover {
    border-color: var(--gray-300);
}

.territory-option input:checked + .territory-option__card {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb), 0.03);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.territory-option__flag {
    font-size: 1.5rem;
    margin-bottom: 6px;
}

.territory-option__name {
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--gray-800);
}

.territory-option__detail {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-top: 2px;
}

/* ─── DURATION SELECTOR ─── */
.duration-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.duration-option {
    position: relative;
    cursor: pointer;
}

.duration-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.duration-option__card {
    padding: 18px 14px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    text-align: center;
    transition: all 0.2s;
}

.duration-option__card:hover {
    border-color: var(--gray-300);
}

.duration-option input:checked + .duration-option__card {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb), 0.03);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.duration-option__value {
    font-size: 1.375rem;
    font-weight: 800;
    color: var(--primary);
}

.duration-option__label {
    font-size: 0.8125rem;
    color: var(--gray-600);
    margin-top: 2px;
}

.duration-option__price {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-top: 6px;
}

/* ─── INFO NOTICE IN FORM ─── */
.wizard__info {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: var(--info-light);
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    color: #1e40af;
    margin-bottom: 20px;
    line-height: 1.5;
}

.wizard__info-icon {
    flex-shrink: 0;
    font-size: 1rem;
    margin-top: 1px;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
    .wizard__card {
        padding: 28px 20px;
    }

    .service-selector {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .service-option__card {
        flex-direction: row;
        padding: 18px 16px;
        text-align: left;
    }

    .plan-selector {
        grid-template-columns: 1fr;
    }

    .territory-selector,
    .duration-selector {
        grid-template-columns: 1fr;
    }

    .wizard__form-row {
        grid-template-columns: 1fr;
    }

    .wizard__stepper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        justify-content: flex-start;
        padding-bottom: 8px;
    }

    .wizard__step-label {
        display: none;
    }

    .wizard__step-line {
        width: 28px;
    }
}

@media (max-width: 480px) {
    .wizard__card {
        padding: 24px 16px;
    }

    .wizard__card-title {
        font-size: 1.25rem;
    }

    .wizard__nav {
        flex-direction: column;
    }

    .wizard__btn {
        width: 100%;
        justify-content: center;
    }

    .wizard__btn--next,
    .wizard__btn--submit {
        margin-left: 0;
        order: -1;
    }
}
