/* v18 — Sidebar: content animation, sidebar states, responsive stack */

/* Bootstrap .d-flex !important перебивает [hidden] на шагах с flex-grow-1 / d-flex */
.sidebar-rail-wizard .sidebar-rail-wizard__pane[hidden],
.sidebar-rail-wizard .sidebar-rail-wizard__toolbar[hidden],
.sidebar-rail-wizard button.sidebar-rail-wizard__retreat[hidden],
.sidebar-rail-wizard button.sidebar-rail-wizard__commit[hidden],
.sidebar-rail-wizard p.sidebar-rail-wizard__alert[hidden] {
    display: none !important;
}

/* Анимация только у видимого шага — иначе fill-mode "both" даёт opacity:1 у всех */
.sidebar-rail-wizard__pane:not([hidden]) {
    animation: sidebar-rail-wizard-pane-reveal-kf 0.35s ease both;
}

@keyframes sidebar-rail-wizard-pane-reveal-kf {
    from { opacity: 0; transform: translateX(12px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* Sidebar step item transitions */
.sidebar-rail-wizard__rail-entry {
    transition: background-color 0.25s ease, opacity 0.25s ease;
}

.sidebar-rail-wizard__rail-entry--current {
    opacity: 1;
}

.sidebar-rail-wizard__rail-entry--completed {
    opacity: 1;
}

.sidebar-rail-wizard__rail-entry--pending {
    opacity: 0.5;
}

/* Active sidebar icon bounce */
.sidebar-rail-wizard__rail-entry--current .fa-solid {
    animation: sidebar-rail-wizard-icon-bounce-kf 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes sidebar-rail-wizard-icon-bounce-kf {
    from { transform: scale(0.6); }
    to   { transform: scale(1); }
}

/* Progress bar */
.sidebar-rail-wizard__meter {
    transition: width 0.5s ease;
}

/* Responsive: sidebar becomes top row on mobile */
@media (max-width: 639px) {
    .sidebar-rail-wizard {
        flex-direction: column;
    }
    .sidebar-rail-wizard__rail {
        width: 100% !important;
        flex-direction: row !important;
        padding: 0.75rem;
        gap: 0.5rem;
    }
    .sidebar-rail-wizard__rail > p {
        display: none;
    }
    .sidebar-rail-wizard__rail > div {
        flex-direction: row;
    }
    .sidebar-rail-wizard__rail > .mt-auto {
        display: none;
    }
}

.contact-us-flex__min {
    min-width: 0;
}

.contact-us-media__cover {
    object-fit: cover;
}

/* wizard progress segment - framework-agnostic sizing + UA button reset */
.steps-wizard__segment {
    height: 0.375rem;
    padding: 0;
    border: 0;
    transition: transform 200ms ease, background-color 200ms ease;
    cursor: pointer;
    background-color: var(--bs-tertiary-bg, rgb(100 116 139 / 0.3));
}

.steps-wizard__segment.is-active {
    transform: scaleY(1.6);
    background-color: var(--bs-primary, rgb(37 99 235 / 1)) !important;
}

.steps-wizard__panel {
    animation: steps-wizard-fade-in 250ms ease;
}

/* wizard stage panel - fixed min-height across both frameworks */
.guide-flow__stage {
    min-height: 16rem;
}

/* wizard step icon badge - fixed circular size across both frameworks */
.guide-flow__badge {
    width: 4rem;
    height: 4rem;
}

@keyframes steps-wizard-fade-in {
    from {
        opacity: 0;
        transform: translateY(0.5rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

