/* =========================================================
   Wizard Horizontal Top Navigation — wizard-horizontal.css
   Replaces the left sidebar with a responsive top step bar.
   ========================================================= */

/* ---- Card layout adjustment ---- */
.wizard-card {
    height: auto !important;
    display: flex;
    flex-direction: column;
}

.wizard-card-body {
    padding: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* ---- Progress bar area ---- */
.wizard-progress {
    padding: 1.25rem 2rem 0.75rem;
    margin-bottom: 0;
}

.wizard-progress .progress {
    height: 8px;
    border-radius: 4px;
}

/* ---- Horizontal step nav bar ---- */
.wizard-steps-topbar {
    width: 100%;
    background: #f8f9fa;
    border-bottom: 1px solid #e3e6ea;
    padding: 0 1.5rem;
    overflow-x: auto;
    overflow-y: hidden;
    /* Show a thin scrollbar so users know they can scroll */
    scrollbar-width: thin;
    scrollbar-color: #c5ccd5 transparent;
}

.wizard-steps-topbar::-webkit-scrollbar {
    height: 4px;
}

.wizard-steps-topbar::-webkit-scrollbar-track {
    background: transparent;
}

.wizard-steps-topbar::-webkit-scrollbar-thumb {
    background-color: #c5ccd5;
    border-radius: 4px;
}

.wizard-steps-topbar::-webkit-scrollbar-thumb:hover {
    background-color: #a0aab4;
}

.wizard-steps-topbar .nav {
    flex-direction: row !important;
    flex-wrap: nowrap;
    gap: 0;
    min-width: max-content;
}

/* ---- Individual step item (horizontal) ---- */
.wizard-steps-topbar .step-item {
    display: inline-flex;
    align-items: center;
    padding: 1rem 1.4rem;
    border-radius: 0;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
    /* sit exactly on the border */
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none !important;
    color: #6c757d !important;
    font-size: 0.88rem;
    font-weight: 500;
    transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.wizard-steps-topbar .step-item i {
    margin-right: 0.45rem;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.wizard-steps-topbar .step-item .number {
    font-weight: 700;
    margin-right: 0.3rem;
    font-size: 0.88rem;
}

.wizard-steps-topbar .step-item:hover {
    color: var(--theme-color, #1a3c5e) !important;
    background: #eef1f4;
    border-bottom-color: #c9d0d8;
}

/* Active step */
.wizard-steps-topbar .step-item.active {
    color: var(--theme-color, #1a3c5e) !important;
    border-bottom-color: var(--theme-color, #1a3c5e);
    background: #fff;
}

/* Completed step */
.wizard-steps-topbar .step-item.completed {
    color: #28a745 !important;
}

.wizard-steps-topbar .step-item.active.completed {
    color: var(--theme-color, #1a3c5e) !important;
    border-bottom-color: var(--theme-color, #1a3c5e);
}

/* Check icon inside step */
.wizard-steps-topbar .step-item .mdi-check-circle {
    margin-left: 0.4rem;
    font-size: 1rem;
    color: #28a745;
}

/* ---- Content area ---- */
.wizard-content-area {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    overflow-x: hidden;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.wizard-content-area::-webkit-scrollbar {
    display: none;
}

/* ---- Step form animations ---- */
.step-form {
    display: none;
    animation: wizardFadeIn 0.4s ease;
}

.step-form.active {
    display: block;
}

@keyframes wizardFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---- Button row ---- */
.btn-next,
.btn-finish {
    min-width: 110px;
}

/* ---- Disabled (future) steps ---- */
.wizard-steps-topbar .step-item[style*="pointer-events: none"] {
    opacity: 0.45;
}

/* =========================================================
   Responsive Breakpoints
   ========================================================= */

/* Tablet */
@media (max-width: 992px) {
    .wizard-progress {
        padding: 1rem 1.25rem 0.6rem;
    }

    .wizard-steps-topbar {
        padding: 0 0.75rem;
    }

    .wizard-steps-topbar .step-item {
        padding: 0.8rem 1rem;
        font-size: 0.83rem;
    }

    .wizard-content-area {
        padding: 1.25rem;
    }
}

/* Mobile */
@media (max-width: 576px) {
    .wizard-progress {
        padding: 0.75rem 1rem 0.5rem;
    }

    .wizard-steps-topbar {
        padding: 0 0.5rem;
    }

    .wizard-steps-topbar .step-item {
        padding: 0.65rem 0.75rem;
        font-size: 0.78rem;
        gap: 0;
    }

    .wizard-steps-topbar .step-item .number {
        display: none;
        /* hide "1." numbering on very small screens to save space */
    }

    .wizard-steps-topbar .step-item i {
        font-size: 1.05rem;
        margin-right: 0.3rem;
    }

    .wizard-content-area {
        padding: 1rem;
    }

    .mt-4.border-top.pt-3.text-right {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: center;
        text-align: center;
    }

    .mt-4.border-top.pt-3.text-right .btn {
        margin-left: 0 !important;
        flex: 1 1 auto;
        min-width: 90px;
        max-width: 140px;
    }
}