/* Sidebar stepper menu */
.stepper-nav {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    height: 100%;
}

.stepper-header {
    padding: 0 1.5rem;
}

.stepper-search {
    position: relative;
}

.stepper-search-field {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 0.9rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

body.dark .stepper-search-field {
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(148, 163, 184, 0.4);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.32);
    color: #e2e8f0;
}

.stepper-search-field:focus-within {
    border-color: rgba(59, 130, 246, 0.65);
    box-shadow: 0 12px 34px rgba(59, 130, 246, 0.25);
}

.stepper-search-icon {
    font-size: 0.95rem;
    color: rgba(51, 65, 85, 0.55);
}

body.dark .stepper-search-icon {
    color: rgba(148, 163, 184, 0.7);
}

.stepper-search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 0.95rem;
    color: inherit;
    padding: 0;
    outline: none;
}

.stepper-search-input::placeholder {
    color: rgba(148, 163, 184, 0.75);
}

body.dark .stepper-search-input::placeholder {
    color: rgba(148, 163, 184, 0.6);
}

.stepper-search-clear {
    border: none;
    background: rgba(148, 163, 184, 0.15);
    color: rgba(51, 65, 85, 0.65);
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.stepper-search-clear:hover {
    background: rgba(59, 130, 246, 0.15);
    color: #1d4ed8;
}

body.dark .stepper-search-clear {
    background: rgba(71, 85, 105, 0.35);
    color: rgba(226, 232, 240, 0.8);
}

body.dark .stepper-search-clear:hover {
    background: rgba(59, 130, 246, 0.35);
    color: #bfdbfe;
}

.stepper-list {
    list-style: none;
    margin: 0;
    padding: 0 1.5rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.stepper-item {
    position: relative;
    padding-left: 0;
}

.stepper-item::before {
    content: "";
    position: absolute;
    left: 1.35rem;
    top: 3rem;
    width: 2px;
    height: calc(100% - 3rem);
    background: linear-gradient(to bottom, rgba(148, 163, 184, 0.35), rgba(148, 163, 184, 0));
}

.stepper-item:last-child::before {
    display: none;
}

.stepper-details {
    margin: 0;
    padding: 0;
    border: none;
}

.stepper-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.8rem 1rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(241, 245, 249, 0.6);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

body.dark .stepper-summary {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(71, 85, 105, 0.5);
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.32);
    color: #e2e8f0;
}

.stepper-summary:hover {
    transform: translateX(4px);
    box-shadow: 0 14px 36px rgba(59, 130, 246, 0.18);
    border-color: rgba(59, 130, 246, 0.35);
}

.stepper-summary-main {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex: 1;
    min-width: 0;
}

.stepper-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 0.9rem;
    font-weight: 600;
    font-size: 0.9rem;
    background: linear-gradient(135deg, rgba(191, 219, 254, 0.95), rgba(147, 197, 253, 0.95));
    color: #1d4ed8;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75), 0 6px 16px rgba(59, 130, 246, 0.25);
    flex-shrink: 0;
}

body.dark .stepper-index {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.85), rgba(37, 99, 235, 0.85));
    color: #e2e8f0;
    box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.35), 0 8px 20px rgba(59, 130, 246, 0.4);
}

.stepper-title {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: inherit;
    min-width: 0;
}

.stepper-title span {
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.stepper-title-icon,
.stepper-link-icon {
    font-size: 1rem;
    color: rgba(30, 64, 175, 0.95);
}

body.dark .stepper-title-icon,
body.dark .stepper-link-icon {
    color: #93c5fd;
}

.stepper-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.12);
    color: rgba(51, 65, 85, 0.6);
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.stepper-details[open] .stepper-chevron {
    transform: rotate(90deg);
    background: rgba(59, 130, 246, 0.2);
    color: #1d4ed8;
}

.stepper-links {
    list-style: none;
    margin: 0;
    padding: 0.65rem 0 0.5rem 3.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stepper-link-anchor,
.stepper-single-anchor {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.6rem 0.85rem;
    border-radius: 0.9rem;
    border: 1px solid transparent;
    text-decoration: none;
    color: inherit;
    background: rgba(59, 130, 246, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

body.dark .stepper-link-anchor,
body.dark .stepper-single-anchor {
    background: rgba(59, 130, 246, 0.12);
    color: #e2e8f0;
}

.stepper-link-anchor:hover,
.stepper-single-anchor:hover {
    transform: translateX(4px);
    background: rgba(59, 130, 246, 0.18);
    border-color: rgba(59, 130, 246, 0.35);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.2);
}

.stepper-link-content {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-weight: 500;
    min-width: 0;
}

.stepper-link-content span {
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.stepper-link-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(59, 130, 246, 0.18);
    color: #1d4ed8;
}

body.dark .stepper-link-badge {
    background: rgba(147, 197, 253, 0.2);
    color: #bfdbfe;
}

.stepper-item.is-active .stepper-summary {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.95), rgba(59, 130, 246, 0.95));
    color: #f8fafc;
    border-color: rgba(59, 130, 246, 0.6);
    box-shadow: 0 15px 40px rgba(37, 99, 235, 0.35);
}

.stepper-item.is-active .stepper-index {
    background: rgba(248, 250, 252, 0.2);
    color: #f8fafc;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.stepper-link.is-active .stepper-link-anchor,
.stepper-single-anchor.is-active {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.95), rgba(29, 78, 216, 0.95));
    color: #f8fafc;
    border-color: rgba(29, 78, 216, 0.55);
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.3);
}

.stepper-item.stepper-item--single::before {
    top: 2.6rem;
    height: calc(100% - 2.6rem);
}

.stepper-single-anchor {
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(241, 245, 249, 0.6);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

body.dark .stepper-single-anchor {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(71, 85, 105, 0.5);
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.32);
}

.stepper-single-anchor:hover {
    transform: translateX(4px);
    border-color: rgba(59, 130, 246, 0.35);
    box-shadow: 0 14px 36px rgba(59, 130, 246, 0.2);
}

.stepper-item.is-search-hidden {
    display: none !important;
}

.stepper-link.is-search-hidden {
    display: none !important;
}

.stepper-summary::-webkit-details-marker {
    display: none;
}

@media (max-width: 1024px) {
    .stepper-nav {
        gap: 1rem;
    }

    .stepper-header {
        padding: 0 1rem;
    }

    .stepper-list {
        padding: 0 1rem 1.5rem;
        gap: 1rem;
    }

    .stepper-links {
        padding-left: 3.25rem;
    }
}
