/* ==========================================================
   NCIC Report Wizard
   report-wizard.css
========================================================== */

/* ==========================================================
   Report Progress
========================================================== */

.report-progress {

    display: flex;

    justify-content: space-between;

    align-items: flex-start;

    gap: 1rem;

    margin: 0 0 3rem;

    padding: 0;

    position: relative;

}

.report-progress::before {

    content: "";

    position: absolute;

    top: 22px;

    left: 0;

    right: 0;

    height: 2px;

    background: var(--color-border, #d9d9d9);

    z-index: 0;

}

/* ==========================================================
   Progress Step
========================================================== */

.progress-step {

    position: relative;

    z-index: 1;

    flex: 1;

    text-align: center;

}

.progress-step span {

    display: flex;

    align-items: center;

    justify-content: center;

    width: 44px;

    height: 44px;

    margin: 0 auto 0.75rem;

    border-radius: 50%;

    background: #ffffff;

    border: 2px solid var(--color-border, #d9d9d9);

    color: #666666;

    font-weight: 700;

    transition: all .25s ease;

}

.progress-step p {

    margin: 0;

    font-size: .9rem;

    font-weight: 600;

    color: #666666;

}

/* ==========================================================
   Active Step
========================================================== */

.progress-step.active span {

    background: var(--color-primary, #003366);

    border-color: var(--color-primary, #003366);

    color: #ffffff;

}

.progress-step.active p {

    color: var(--color-primary, #003366);

}

/* ==========================================================
   Completed Step
========================================================== */

.progress-step.completed span {

    background: #2e7d32;

    border-color: #2e7d32;

    color: #ffffff;

}

.progress-step.completed p {

    color: #2e7d32;

}

/* ==========================================================
   Form Steps
========================================================== */

.form-step {

    display: none;

    animation: wizardFade .25s ease;

}

.form-step.active {

    display: block;

}

.form-step[hidden] {

    display: none !important;

}

/* ==========================================================
   Animation
========================================================== */

@keyframes wizardFade {

    from {

        opacity: 0;

        transform: translateY(10px);

    }

    to {

        opacity: 1;

        transform: translateY(0);

    }

}
/* ==========================================================
   Validation
========================================================== */

.form-group.has-error label {

    color: #b91c1c;

}

.is-invalid {

    border-color: #b91c1c !important;

    box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.12);

}

.is-invalid:focus {

    outline: none;

    border-color: #991b1b !important;

    box-shadow: 0 0 0 4px rgba(185, 28, 28, 0.18);

}

/* ==========================================================
   Form Actions
========================================================== */

.form-actions {

    display: flex;

    justify-content: space-between;

    align-items: center;

    flex-wrap: wrap;

    gap: 1rem;

    margin-top: 2.5rem;

}

/* ==========================================================
   Preview Card
========================================================== */

#reportPreview {

    margin-top: 2rem;

}

.preview-section {

    margin-bottom: 2rem;

}

.preview-section:last-child {

    margin-bottom: 0;

}

.preview-section h4 {

    margin-bottom: 1rem;

    padding-bottom: .5rem;

    border-bottom: 1px solid var(--color-border, #d9d9d9);

    color: var(--color-primary, #003366);

}

.preview-section dl {

    display: grid;

    grid-template-columns: 220px 1fr;

    gap: .75rem 1rem;

    margin: 0;

}

.preview-section dt {

    font-weight: 600;

    color: #333333;

}

.preview-section dd {

    margin: 0;

    color: #555555;

    word-break: break-word;

    white-space: pre-wrap;

}

/* ==========================================================
   Wizard Accessibility
========================================================== */

.progress-step span {

    user-select: none;

}

.progress-step.active span {

    box-shadow: 0 0 0 4px rgba(0, 51, 102, .15);

}

button:disabled {

    opacity: .5;

    cursor: not-allowed;

}

/* ==========================================================
   Mobile
========================================================== */

@media (max-width: 768px) {

    .report-progress {

        flex-direction: column;

        gap: 1.5rem;

    }

    .report-progress::before {

        display: none;

    }

    .progress-step {

        display: flex;

        align-items: center;

        text-align: left;

        gap: 1rem;

    }

    .progress-step span {

        margin: 0;

        flex-shrink: 0;

    }

    .progress-step p {

        margin: 0;

    }

    .preview-section dl {

        grid-template-columns: 1fr;

    }

    .preview-section dt {

        margin-top: .75rem;

    }

    .preview-section dd {

        margin-left: 0;

    }

    .form-actions {

        flex-direction: column;

        align-items: stretch;

    }

    .form-actions .btn {

        width: 100%;

    }

}

/* ==========================================================
   Reduced Motion
========================================================== */

@media (prefers-reduced-motion: reduce) {

    .form-step {

        animation: none;

    }

    .progress-step span {

        transition: none;

    }

}