/* v2026-08-02 15:47 UTC */
/* ============================================================
 * StepWizard — Reusable step/tab wizard component
 * /common/css/wizard.css
 *
 * Works with /common/js/wizard.js
 * Uses CSS variables for theming — override in your page.
 * ============================================================ */

:root {
    --wiz-active: #1e293b;
    --wiz-done: #1e293b;
    --wiz-pending: #e2e8f0;
    --wiz-text: #94a3b8;
    --wiz-text-active: #1e293b;
    --wiz-line: #e2e8f0;
    --wiz-line-done: #1e293b;
    --wiz-card-bg: #fff;
    --wiz-card-border: #e2e8f0;
    --wiz-card-radius: 12px;
    --wiz-btn-bg: #006994;
    --wiz-btn-hover: #004f70;
    --wiz-btn-text: #fff;
    --wiz-max-width: 720px;
}

.wizard {
    max-width: var(--wiz-max-width);
    margin: 32px auto;
    padding: 0 16px 48px;
}

/* ── Step indicators ── */
.wiz-steps {
    display: flex;
    margin-bottom: 32px;
    position: relative;
    user-select: none;
}

.wiz-steps::before {
    content: '';
    position: absolute;
    top: 16px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--wiz-line);
    z-index: 0;
}

.wiz-steps .wiz-progress-line {
    position: absolute;
    top: 16px;
    left: 0;
    height: 2px;
    background: var(--wiz-line-done);
    z-index: 1;
    transition: width 0.3s ease;
}

.wiz-step {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 2;
}

.wiz-step-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--wiz-pending);
    background: var(--wiz-card-bg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--wiz-text);
    margin-bottom: 6px;
    transition: all 0.3s ease;
}

.wiz-step.active .wiz-step-num {
    background: var(--wiz-active);
    border-color: var(--wiz-active);
    color: var(--wiz-btn-text);
    transform: scale(1.1);
}

.wiz-step.done .wiz-step-num {
    background: var(--wiz-done);
    border-color: var(--wiz-done);
    color: var(--wiz-btn-text);
}

.wiz-step.done .wiz-step-num::after {
    content: '✓';
    font-size: 14px;
}

.wiz-step.done .wiz-step-num span {
    display: none;
}

.wiz-step.clickable {
    cursor: pointer;
}

.wiz-step-label {
    font-size: 11px;
    color: var(--wiz-text);
    display: block;
    transition: all 0.2s;
}

.wiz-step.active .wiz-step-label {
    color: var(--wiz-text-active);
    font-weight: 700;
}

.wiz-step.done .wiz-step-label {
    color: var(--wiz-text-active);
}

/* ── Step content panels ── */
.wiz-panel {
    display: none;
    animation: wizFadeIn 0.3s ease;
}

.wiz-panel.active {
    display: block;
}

@keyframes wizFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Card styling (optional — applied to panels) ── */
.wiz-card {
    background: var(--wiz-card-bg);
    border: 1px solid var(--wiz-card-border);
    border-radius: var(--wiz-card-radius);
    padding: 24px;
    margin-bottom: 16px;
}

.wiz-card-title {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--wiz-text-active);
}

/* ── Navigation buttons ── */
.wiz-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    gap: 12px;
}

.wiz-btn {
    padding: 12px 28px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.wiz-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.wiz-btn-next {
    background: var(--wiz-btn-bg);
    color: var(--wiz-btn-text);
    margin-left: auto;
}

.wiz-btn-next:hover:not(:disabled) {
    background: var(--wiz-btn-hover);
}

.wiz-btn-back {
    background: transparent;
    color: var(--wiz-text-active);
    border: 2px solid var(--wiz-card-border);
}

.wiz-btn-back:hover:not(:disabled) {
    border-color: var(--wiz-text-active);
}

.wiz-btn-submit {
    background: #16a34a;
    color: white;
    margin-left: auto;
}

.wiz-btn-submit:hover:not(:disabled) {
    background: #15803d;
}

/* ── Mobile ── */
@media (max-width: 640px) {
    .wizard { padding: 0 10px 32px; margin: 20px auto; }
    .wiz-step-label { font-size: 10px; }
    .wiz-step-num { width: 28px; height: 28px; font-size: 12px; }
    .wiz-steps::before { top: 14px; }
    .wiz-steps .wiz-progress-line { top: 14px; }
    .wiz-card { padding: 16px; }
    .wiz-btn { padding: 10px 20px; font-size: 14px; }
}