/* Shared multi-step form wizard — matches ShikshaPilot admission popup */

.ss-wizard-overlay {
    position: fixed;
    inset: 0;
    z-index: 180000;
    background: rgba(2, 6, 23, 0.6);
    display: none;
    align-items: stretch;
    justify-content: center;
    padding: 12px 12px 12px;
    overflow: hidden;
    pointer-events: none;
}

.ss-wizard-overlay.is-open {
    display: flex;
    pointer-events: auto;
}

.ss-wizard-modal {
    position: relative;
    width: min(720px, 100%);
    max-height: 100%;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 22px 48px rgba(15, 23, 42, 0.28);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ss-wizard-head {
    background: linear-gradient(90deg, #0f766e 0%, #14b8a6 50%, #2563eb 100%);
    color: #fff;
    padding: 16px 16px 14px;
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.ss-wizard-head-copy {
    min-width: 0;
}

.ss-wizard-step-label {
    display: block;
    font-size: 11px;
    letter-spacing: 0.04em;
    color: #ccfbf1;
    margin-bottom: 2px;
}

.ss-wizard-title {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.2;
}

.ss-wizard-subtitle {
    margin: 4px 0 0;
    font-size: 12px;
    color: #99f6e4;
    line-height: 1.4;
}

.ss-wizard-close {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.33);
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
}

.ss-wizard-dots {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    padding: 10px 16px 0;
}

.ss-wizard-dot {
    height: 4px;
    border-radius: 2px;
    background: #e2e8f0;
}

.ss-wizard-dot.is-active {
    background: #14b8a6;
}

.ss-wizard-chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 10px 16px 6px;
    -webkit-overflow-scrolling: touch;
}

.ss-wizard-chip {
    background: #ecfdf5;
    border-radius: 14px;
    padding: 8px 10px;
    min-width: 96px;
    flex-shrink: 0;
}

.ss-wizard-chip.is-session { background: #eef2ff; }
.ss-wizard-chip.is-father { background: #fef3c7; }
.ss-wizard-chip.is-class { background: #dbeafe; }
.ss-wizard-chip.is-code { background: #f3e8ff; }
.ss-wizard-chip.is-mobile { background: #fff7ed; }

.ss-wizard-chip span {
    display: block;
    font-size: 10px;
    color: #64748b;
}

.ss-wizard-chip strong {
    display: block;
    font-size: 13px;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
}

.ss-wizard-body {
    flex: 1;
    overflow-y: auto;
    padding: 8px 16px 12px;
}

.ss-wizard-error {
    display: none;
    color: #dc2626;
    font-size: 13px;
    margin-bottom: 8px;
}

.ss-wizard-error.is-visible {
    display: block;
}

.ss-wizard-step {
    display: none;
}

.ss-wizard-step.is-active {
    display: block;
}

.ss-wizard-gate-error {
    display: none;
    width: 100%;
    margin: 0 0 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    font-size: 13px;
    font-weight: 600;
}

.ss-wizard-invalid {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

.ss-wizard-foot {
    display: flex;
    gap: 10px;
    padding: 8px 16px 16px;
}

.ss-wizard-foot .ss-btn-institute-secondary,
.ss-wizard-back {
    background: #f1f5f9;
    color: #1e293b;
    border: 0;
    font-weight: 700;
    border-radius: 14px;
    height: 50px;
    padding: 0 18px;
    cursor: pointer;
}

.ss-wizard-foot .ss-btn-institute-primary,
.ss-wizard-next,
.ss-wizard-submit {
    flex: 1;
    height: 50px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 16px;
}

.ss-wizard-submit:disabled,
.ss-wizard-back:disabled,
.ss-wizard-close:disabled,
.ss-wizard-next:disabled {
    opacity: 0.7;
    cursor: wait;
    pointer-events: none;
}

.ss-wizard-busy {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 30;
    background: rgba(255, 255, 255, 0.9);
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.ss-wizard-overlay.is-submitting .ss-wizard-busy {
    display: flex;
}

.ss-wizard-busy-card {
    width: min(280px, 100%);
    text-align: center;
}

.ss-wizard-busy-spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 12px;
    border: 3px solid #e2e8f0;
    border-top-color: #0f766e;
    border-radius: 50%;
    animation: ss-wizard-spin 0.8s linear infinite;
}

.ss-wizard-busy-title {
    display: block;
    font-size: 16px;
    color: #0f172a;
}

.ss-wizard-busy-text {
    margin: 6px 0 14px;
    font-size: 13px;
    color: #64748b;
}

.ss-wizard-progress {
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.ss-wizard-progress span {
    display: block;
    height: 100%;
    width: 42%;
    border-radius: 999px;
    background: linear-gradient(90deg, #0f766e, #14b8a6, #2563eb);
    animation: ss-wizard-progress-slide 1.1s ease-in-out infinite;
}

@keyframes ss-wizard-spin {
    to { transform: rotate(360deg); }
}

@keyframes ss-wizard-progress-slide {
    0% { transform: translateX(-120%); }
    100% { transform: translateX(280%); }
}

.ss-wizard-preview {
    background: #f8fafc;
    border-radius: 16px;
    padding: 8px 12px;
}

.ss-wizard-preview-row {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
}

.ss-wizard-preview-row:last-child {
    border-bottom: 0;
}

.ss-wizard-preview-row span {
    font-size: 12px;
    color: #64748b;
}

.ss-wizard-preview-row strong {
    font-size: 13px;
    color: #0f172a;
    word-break: break-word;
}

.ss-wizard-closed-card {
    background: #fff;
    border-radius: 20px;
    padding: 28px 22px;
    text-align: center;
    box-shadow: 0 10px 36px rgba(11, 61, 92, 0.1);
    max-width: 520px;
    margin: 0 auto 2rem;
}

.ss-wizard-closed-card .ss-wizard-closed-icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fef3c7;
    color: #d97706;
    font-size: 28px;
}

.ss-wizard-closed-card h3 {
    margin: 0 0 8px;
    font-weight: 800;
    color: #0f172a;
}

.ss-wizard-closed-card p {
    margin: 0 0 18px;
    color: #64748b;
    font-size: 15px;
}

body.ss-wizard-locked {
    overflow: hidden;
}

@media (max-width: 576px) {
    .ss-wizard-preview-row {
        grid-template-columns: 1fr;
        gap: 2px;
    }
}
