/* wwwroot/css/help-system.css - Complete mobile-optimized implementation */

/* Help System Overlay */
.help-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--glass-black-20);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.help-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}


@media (max-width: 768px) {
    body.help-active {
        overflow-y: auto !important;
        overflow-x: hidden !important;
    }
}

.help-backdrop-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    opacity: 0.3;
    z-index: 10001;
    pointer-events: none;
    user-select: none;
}

.help-backdrop-content i {
    font-size: var(--fs-5xl);
    margin-bottom: 1rem;
    opacity: 0.6;
}

.help-backdrop-content p {
    font-size: var(--fs-md);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.help-backdrop-content small {
    font-size: var(--fs-body);
    opacity: 0.5;
}

/* Help Panel - Desktop */
.help-panel {
    position: absolute;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 60px var(--glass-black-30);
    width: 380px;
    max-width: 90%;
    max-height: 600px;
    z-index: 10003;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.help-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Glide the panel between steps (desktop only — mobile uses fixed bottom sheet). */
@media (min-width: 769px) {
    .help-panel.active {
        transition:
            top 0.42s cubic-bezier(0.22, 0.61, 0.36, 1),
            left 0.42s cubic-bezier(0.22, 0.61, 0.36, 1),
            opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
            transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
            box-shadow 0.3s ease;
    }
}

/* Cross-fade step content so the swap isn't a hard cut. */
#help-title,
#help-content {
    transition: opacity 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

#help-title.help-fade-out,
#help-content.help-fade-out {
    opacity: 0;
}

/* Mobile help panel - Fixed positioning at bottom */
@media (max-width: 768px) {
    .help-panel {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        top: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        max-height: 400px !important;
        border-radius: 16px 16px 0 0 !important;
        transform: translateY(100%);
        margin: 0 !important;
    }

    .help-panel.active {
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .help-panel {
        max-height: 350px !important;
        border-radius: 12px 12px 0 0 !important;
    }
}

/* Panel Header */
.help-panel-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--bs-border-color);
    background: var(--bs-primary);
    color: white;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .help-panel-header {
        padding: 14px 16px 12px;
    }
}

@media (max-width: 480px) {
    .help-panel-header {
        padding: 12px 14px 10px;
    }
}

.help-header-content h5 {
    font-weight: 600;
    margin-bottom: 4px;
    font-size: var(--fs-lg);
    line-height: 1.3;
}

@media (max-width: 768px) {
    .help-header-content h5 {
        font-size: var(--fs-body-lg);
    }
}

.help-tour-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.help-tour-name {
    font-size: var(--fs-body);
    opacity: 0.9;
    font-weight: 500;
}

@media (max-width: 768px) {
    .help-tour-name {
        font-size: var(--fs-sm);
    }
}

.help-estimated-time {
    font-size: var(--fs-sm);
    opacity: 0.8;
}

.help-panel-header .btn-close {
    filter: invert(1);
    opacity: 0.8;
    transition: opacity 0.2s ease;
    margin-left: 16px;
    flex-shrink: 0;
}

.help-panel-header .btn-close:hover {
    opacity: 1;
}

/* Panel Body */
.help-panel-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

@media (max-width: 768px) {
    .help-panel-body {
        padding: 16px;
        max-height: 200px;
    }
}

@media (max-width: 480px) {
    .help-panel-body {
        padding: 12px;
        max-height: 180px;
        font-size: var(--fs-body);
    }
}

.help-content {
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: var(--fs-body-lg);
}

@media (max-width: 768px) {
    .help-content {
        font-size: var(--fs-body);
        line-height: 1.5;
        margin-bottom: 12px;
    }
}

.step-content {
    margin-bottom: 16px;
}

/* Collapsible content on mobile */
@media (max-width: 768px) {
    .step-content {
        max-height: 80px;
        overflow: hidden;
        position: relative;
        margin-bottom: 8px;
        transition: max-height 0.3s ease;
    }

    .step-content.expanded {
        max-height: none;
    }

    .step-content.collapsed::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 30px;
        background: linear-gradient(to bottom, transparent, var(--bs-body-bg));
        pointer-events: none;
    }

    .step-content.expanded::after {
        display: none;
    }
}

@media (max-width: 480px) {
    .step-content {
        max-height: 60px;
    }
}

.read-more-btn {
    display: none;
    color: var(--bs-primary);
    font-size: var(--fs-body-sm);
    font-weight: 500;
    cursor: pointer;
    margin-top: 4px;
    padding: 4px 0;
    border: none;
    background: none;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .read-more-btn {
        display: inline-block;
    }
}

.read-more-btn:hover {
    opacity: 0.8;
}

.help-action-hint {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    background: rgba(var(--bs-info-rgb), 0.1);
    border-left: 4px solid var(--bs-info);
    border-radius: var(--radius-md);
    margin-top: 16px;
    font-size: var(--fs-body-lg);
    color: var(--bs-info);
    font-weight: 500;
}

@media (max-width: 768px) {
    .help-action-hint {
        padding: 10px 12px;
        font-size: var(--fs-body-sm);
        margin-top: 10px;
    }
}

.help-action-hint i {
    margin-right: 10px;
    font-size: var(--fs-lg);
    flex-shrink: 0;
}

/* Progress Section */
.help-panel-progress {
    padding-top: 20px;
    border-top: 1px solid var(--bs-border-color);
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .help-panel-progress {
        padding-top: 12px;
    }
}

.help-panel-progress .progress {
    height: 6px;
    margin-bottom: 14px;
    background: rgba(var(--bs-primary-rgb), 0.1);
    border-radius: var(--radius-md);
    overflow: hidden;
}

@media (max-width: 768px) {
    .help-panel-progress .progress {
        height: 4px;
        margin-bottom: 10px;
    }
}

.help-panel-progress .progress-bar {
    background: var(--bs-primary);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: var(--radius-md);
}

.help-step-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--fs-body);
}

@media (max-width: 768px) {
    .help-step-info {
        font-size: var(--fs-sm);
    }
}

/* Panel Footer */
.help-panel-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px 20px;
    background: rgba(var(--bs-light-rgb), 0.5);
    border-top: 1px solid var(--bs-border-color);
    flex-shrink: 0;
    min-height: 80px;
}

@media (max-width: 768px) {
    .help-panel-footer {
        padding: 12px 16px 14px;
        min-height: 65px;
    }
}

@media (max-width: 480px) {
    .help-panel-footer {
        padding: 10px 12px 12px;
        min-height: 60px;
    }
}

.help-footer-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 10px;
}

/* Desktop Footer Center */
.help-footer-center {
    display: flex;
    gap: 8px;
    align-items: center;
}

.help-footer-center .btn {
    font-size: var(--fs-body);
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    font-weight: 500;
}

/* Mobile Footer - Single Row Layout */
.help-footer-mobile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 8px;
}

@media (max-width: 480px) {
    .help-footer-mobile {
        gap: 6px;
    }
}

/* Icon-only buttons */
.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: var(--fs-md);
    border: 2px solid currentColor;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .btn-icon {
        width: 44px;
        height: 44px;
        font-size: var(--fs-md);
    }
}

@media (max-width: 480px) {
    .btn-icon {
        width: 38px;
        height: 38px;
        font-size: var(--fs-body-lg);
    }
}

.btn-icon:hover:not(:disabled) {
    transform: scale(1.1);
}

.btn-icon:disabled {
    opacity: 0.3;
    transform: none;
    cursor: not-allowed;
}

.btn-icon i {
    margin: 0;
}

/* Hide mobile buttons on desktop, show desktop buttons */
@media (min-width: 769px) {
    .help-footer-mobile {
        display: none !important;
    }
}

/* Hide desktop buttons on mobile, show mobile buttons */
@media (max-width: 768px) {

    #help-prev,
    #help-next,
    .help-footer-center:not(.help-footer-mobile) {
        display: none !important;
    }
}

/* Scroll to panel button */
.help-scroll-to-panel {
    position: fixed;
    bottom: 420px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bs-primary);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 8px 16px;
    font-size: var(--fs-body);
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(var(--bs-primary-rgb), 0.3);
    z-index: 10004;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: none;
}

.help-scroll-to-panel.visible {
    opacity: 1;
    visibility: visible;
    display: block;
}

.help-scroll-to-panel:hover {
    background: var(--bs-primary);
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--bs-primary-rgb), 0.4);
}

@media (min-width: 769px) {
    .help-scroll-to-panel {
        display: none !important;
    }
}

/* Target Highlighting */
.help-target-focus {
    position: relative !important;
    z-index: 10002 !important;
    outline: 3px solid var(--bs-primary) !important;
    outline-offset: 4px !important;
    border-radius: 8px !important;
    background: rgba(var(--bs-primary-rgb), 0.08) !important;
    box-shadow: 0 0 0 2px rgba(var(--bs-primary-rgb), 0.3),
        0 4px 20px rgba(var(--bs-primary-rgb), 0.2) !important;
    animation: helpGlow 2s ease-in-out infinite alternate;
    transition: all 0.3s ease !important;
}

@keyframes helpGlow {
    0% {
        box-shadow: 0 0 0 2px rgba(var(--bs-primary-rgb), 0.3),
            0 4px 20px rgba(var(--bs-primary-rgb), 0.2);
        background: rgba(var(--bs-primary-rgb), 0.08);
    }

    100% {
        box-shadow: 0 0 0 4px rgba(var(--bs-primary-rgb), 0.5),
            0 6px 30px rgba(var(--bs-primary-rgb), 0.4);
        background: rgba(var(--bs-primary-rgb), 0.12);
    }
}

.help-target-form {
    border-color: var(--bs-primary) !important;
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.25) !important;
    background-color: rgba(var(--bs-primary-rgb), 0.05) !important;
}

.help-target-button {
    transform: scale(1.05) !important;
    box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb), 0.3) !important;
}

.help-highlight-click {
    cursor: pointer !important;
    animation: helpPulse 1.5s ease-in-out infinite;
}

@keyframes helpPulse {

    0%,
    100% {
        transform: scale(1.05);
    }

    50% {
        transform: scale(1.08);
    }
}

.help-highlight-hover {
    animation: helpHoverGlow 2s ease-in-out infinite alternate;
}

@keyframes helpHoverGlow {
    0% {
        box-shadow: 0 0 0 2px rgba(var(--bs-primary-rgb), 0.3),
            0 4px 20px rgba(var(--bs-primary-rgb), 0.2);
    }

    100% {
        box-shadow: 0 0 0 4px rgba(var(--bs-primary-rgb), 0.6),
            0 6px 25px rgba(var(--bs-primary-rgb), 0.4);
    }
}

.help-highlight-input {
    animation: helpInputGlow 2s ease-in-out infinite alternate;
}

@keyframes helpInputGlow {
    0% {
        box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.25);
        border-color: var(--bs-primary);
    }

    100% {
        box-shadow: 0 0 0 0.3rem rgba(var(--bs-primary-rgb), 0.4);
        border-color: var(--bs-primary);
    }
}

.help-click-indicator {
    position: absolute;
    width: 40px;
    height: 40px;
    pointer-events: none;
    z-index: 10004;
}

.help-click-ripple {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid var(--bs-primary);
    border-radius: var(--radius-full);
    animation: helpClickRipple 2s infinite;
}

.help-click-ripple:nth-child(2) {
    animation-delay: 0.5s;
}

.help-click-ripple:nth-child(3) {
    animation-delay: 1s;
}

@keyframes helpClickRipple {
    0% {
        transform: scale(0);
        opacity: 1;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* Help Toggle Button */
.help-toggle {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 40px;
    height: 40px;
    background: rgba(var(--bs-primary-rgb), 0.5);
    color: var(--bs-primary-text-emphasis);
    border: none;
    border-radius: var(--radius-full);
    font-size: var(--fs-lg);
    box-shadow: 0 2px 10px rgba(var(--bs-primary-rgb), 0.4);
    cursor: pointer;
    z-index: 9999;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.help-toggle:hover {
    background: var(--bs-primary);
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(var(--bs-primary-rgb), 0.6);
    color: white;
}

.help-toggle:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb), 0.3);
}

/* Help Suggestions */
.help-suggestion {
    position: fixed;
    bottom: 100px;
    right: 30px;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 30px var(--glass-black-15);
    padding: 16px 20px;
    max-width: 350px;
    z-index: 9998;
    animation: helpSuggestionSlideIn 0.5s ease-out;
}

@keyframes helpSuggestionSlideIn {
    0% {
        transform: translateX(100%);
        opacity: 0;
    }

    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

.help-suggestion-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.help-suggestion-content i {
    color: var(--bs-warning);
    font-size: 1.3rem;
    flex-shrink: 0;
}

.suggestion-message {
    flex: 1;
    font-weight: 500;
    font-size: var(--fs-body-lg);
    line-height: 1.4;
}

/* Loading & Completion */
.help-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10010;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader-content {
    text-align: center;
    color: white;
}

.loader-content i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--bs-primary);
}

.loader-content p {
    font-size: var(--fs-md);
    margin: 0;
}

.help-completion-toast {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-success);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 30px var(--glass-black-15);
    padding: 20px;
    max-width: 400px;
    z-index: 9999;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

.help-completion-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-content {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}

.toast-content i {
    font-size: var(--fs-2xl);
    margin-top: 2px;
    flex-shrink: 0;
}

.toast-text strong {
    display: block;
    font-size: var(--fs-md);
    margin-bottom: 4px;
    color: var(--bs-success);
}

.toast-text p {
    margin: 0;
    font-size: var(--fs-body-lg);
    line-height: 1.4;
}

/* Help Menu Modal Styles */
.help-category {
    border-bottom: 1px solid var(--bs-border-color);
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
}

.help-category:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.help-category-title {
    color: var(--bs-primary);
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: var(--fs-lg);
    display: flex;
    align-items: center;
}

.help-tour-item {
    padding: 16px;
    border: 1px solid var(--bs-border-color);
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--bs-body-bg);
}

.help-tour-item:hover {
    border-color: var(--bs-primary);
    box-shadow: 0 4px 15px rgba(var(--bs-primary-rgb), 0.1);
    transform: translateY(-2px);
}

.help-tour-item.completed {
    background: rgba(var(--bs-success-rgb), 0.05);
    border-color: var(--bs-success);
}

.help-tour-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 10px;
}

.help-tour-header h6 {
    margin: 0;
    font-size: var(--fs-md);
    font-weight: 600;
    flex: 1;
    line-height: 1.3;
}

.help-tour-header .badge {
    font-size: var(--fs-sm);
    padding: 4px 8px;
    margin-left: 10px;
    flex-shrink: 0;
}

.help-tour-item p {
    flex-grow: 1;
    margin-bottom: 14px;
    font-size: var(--fs-body-lg);
    line-height: 1.5;
    color: var(--bs-secondary-color);
}

.tour-meta {
    margin-bottom: 14px;
    padding-top: 10px;
    border-top: 1px solid rgba(var(--bs-border-color-rgb), 0.5);
}

.tour-actions {
    margin-top: auto;
}

.tour-actions .btn {
    font-size: var(--fs-body);
    padding: 6px 12px;
}

/* Statistics */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
}

.stat-item {
    text-align: center;
    padding: 16px;
    background: rgba(var(--bs-primary-rgb), 0.05);
    border-radius: var(--radius-md);
}

.stat-number {
    font-size: var(--fs-3xl);
    font-weight: 600;
    color: var(--bs-primary);
    line-height: 1;
}

.stat-label {
    font-size: var(--fs-body);
    color: var(--bs-secondary-color);
    margin-top: 4px;
}

.help-stats {
    padding: 0.25rem;
}

/* Search Tips */
.search-tips {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.tip-item {
    padding: 16px;
    background: rgba(var(--bs-light-rgb), 0.5);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--bs-primary);
}

.tip-item h6 {
    margin-bottom: 8px;
    font-size: var(--fs-body-lg);
    font-weight: 600;
}

.tip-item p {
    margin: 0;
    font-size: var(--fs-body-lg);
    line-height: 1.4;
    color: var(--bs-secondary-color);
}

/* Toast */
.help-toast {
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    box-shadow: 0 4px 20px var(--glass-black-10);
}

.toast-container {
    z-index: 9999;
}

/* Dark Mode */
[data-bs-theme="dark"] .help-overlay {
    background: rgba(0, 0, 0, 0.4);
}

[data-bs-theme="dark"] .help-target-focus {
    background: rgba(var(--bs-primary-rgb), 0.15) !important;
    outline-color: var(--bs-primary) !important;
}

[data-bs-theme="dark"] .help-panel {
    background: var(--bs-dark);
    border-color: var(--glass-white-20);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

[data-bs-theme="dark"] .help-panel-header {
    border-bottom-color: var(--glass-white-20);
}

[data-bs-theme="dark"] .help-panel-footer {
    background: var(--glass-white-5);
    border-top-color: var(--glass-white-20);
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {

    .help-target-focus,
    .help-highlight-click,
    .help-highlight-hover,
    .help-highlight-input,
    .help-click-ripple {
        animation: none !important;
    }

    .help-panel,
    .help-panel.active,
    .help-overlay,
    .help-toggle,
    .help-suggestion,
    .help-completion-toast,
    #help-title,
    #help-content {
        transition: none !important;
    }

    #help-title.help-fade-out,
    #help-content.help-fade-out {
        opacity: 1;
    }
}

@media (prefers-contrast: high) {
    .help-target-focus {
        outline-width: 4px !important;
        outline-style: solid !important;
    }

    .help-panel {
        border-width: 2px;
    }
}

/* Print */
@media print {

    .help-overlay,
    .help-panel,
    .help-toggle,
    .help-suggestion,
    .help-completion-toast,
    .help-target-focus,
    .help-click-indicator,
    .help-scroll-to-panel {
        display: none !important;
    }
}

/* Safe Area Support */
@supports (padding: env(safe-area-inset-bottom)) {
    @media (max-width: 768px) {
        .help-panel-footer {
            padding-bottom: calc(14px + env(safe-area-inset-bottom));
        }

        .help-toggle {
            bottom: calc(30px + env(safe-area-inset-bottom));
        }

        .help-completion-toast {
            bottom: calc(30px + env(safe-area-inset-bottom));
        }
    }
}

.nav-tabs-help .nav-link {
    padding: 8px 16px;
    font-size: var(--fs-body-lg);
    border-radius: 6px 6px 0 0;
}

.nav-tabs-help .nav-link.active {
    background-color: var(--bs-primary);
    color: white;
    border-color: var(--bs-primary);
}

.search-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--bs-border-color);
}

.search-result-item {
    padding: 1rem;
    border: 1px solid var(--bs-border-color);
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
    transition: all 0.2s ease;
}

.search-result-item:hover {
    border-color: var(--bs-primary);
    box-shadow: 0 2px 8px rgba(var(--bs-primary-rgb), 0.1);
}

.matched-steps {
    font-style: italic;
}

.loading-spinner {
    text-align: center;
    padding: 2rem;
    color: var(--bs-secondary-color);
}

.loading-spinner i {
    font-size: var(--fs-2xl);
    margin-bottom: 0.5rem;
}

/* CRITICAL FIX: Prevent layout issues */
body:not(.help-active) {
    overflow: visible !important;
}

body:not(.help-active) .help-overlay {
    display: none !important;
    position: fixed !important;
    width: 0 !important;
    height: 0 !important;
}

body:not(.help-active) .help-panel {
    display: none !important;
    position: fixed !important;
    width: 0 !important;
    height: 0 !important;
}

body:not(.help-active) .help-scroll-to-panel {
    display: none !important;
}

/* Ensure help toggle has zero layout impact */
.help-toggle {
    position: fixed !important;
    will-change: transform;
    contain: layout;
}

/* Remove any potential gaps */
.help-toggle::before,
.help-toggle::after {
    display: none !important;
}

/* Ensure no pseudo-elements create gaps */
body::after,
body::before {
    content: none !important;
}

/* Fix for any accidental margin/padding on body */
body {
    margin: 0 !important;
}

/* Ensure fixed elements don't create scrollbars */
html {
    overflow-x: hidden;
}

/* Remove gaps from help system elements when inactive */
.help-overlay:not(.active),
.help-panel:not(.active),
.help-scroll-to-panel:not(.visible),
.help-suggestion:not(.show),
.help-completion-toast:not(.show) {
    display: none !important;
    position: fixed !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}

/* Doc-page styles extracted to wwwroot/css/help-docs.css */
/* (Original: Scripts/legacy_help_docpage.css) */
