/* Add Study create wizard (feature/multi-step-modals) */

#addStudyModal .study-wizard-progress {
    margin-bottom: 1.25rem;
}

#addStudyModal .study-wizard-steps-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

#addStudyModal .study-wizard-step-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1 1 9rem;
    min-width: 0;
    color: #6c757d;
    font-size: 0.875rem;
}

#addStudyModal .study-wizard-step-indicator .step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    border: 1px solid currentColor;
    font-weight: 600;
    flex-shrink: 0;
}

#addStudyModal .study-wizard-step-indicator.is-active {
    color: var(--bs-primary, #0d6efd);
    font-weight: 600;
}

#addStudyModal .study-wizard-step-indicator.is-complete {
    color: #198754;
}

#addStudyModal .study-wizard-step-indicator.is-complete .step-number {
    background: #198754;
    border-color: #198754;
    color: #fff;
}

#addStudyModal .study-wizard-panels {
    position: relative;
    min-height: 12rem;
}

/*
 * Inactive steps must remain "visible" to jQuery (:visible) so UnifiedModalValidator
 * still validates them on final Create. Prefer visibility over display:none.
 */
#addStudyModal .study-wizard-step:not(.is-active) {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    width: 100%;
    visibility: hidden;
    pointer-events: none;
    z-index: -1;
}

#addStudyModal .study-wizard-step.is-active {
    position: relative;
    visibility: visible;
    pointer-events: auto;
    z-index: 1;
}

#addStudyModal .study-wizard-footer .study-wizard-actions {
    flex-wrap: wrap;
    gap: 0.25rem;
}

html[lang="fa"] #addStudyModal .study-wizard-steps-list,
html[dir="rtl"] #addStudyModal .study-wizard-steps-list,
#addStudyModal[dir="rtl"] .study-wizard-steps-list {
    flex-direction: row-reverse;
}

html[lang="fa"] #addStudyModal .study-wizard-step-indicator,
#addStudyModal[dir="rtl"] .study-wizard-step-indicator {
    direction: rtl;
}

html[lang="fa"] #addStudyModal [data-wizard-action="next"] .fa-arrow-right,
html[dir="rtl"] #addStudyModal [data-wizard-action="next"] .fa-arrow-right,
#addStudyModal[dir="rtl"] [data-wizard-action="next"] .fa-arrow-right,
html[lang="fa"] #addStudyModal [data-wizard-action="back"] .fa-arrow-left,
html[dir="rtl"] #addStudyModal [data-wizard-action="back"] .fa-arrow-left,
#addStudyModal[dir="rtl"] [data-wizard-action="back"] .fa-arrow-left {
    transform: scaleX(-1);
}