/* Onboarding Animation and Contextual Help Styles */
/* TRADELINE LISTINGS - Professional Onboarding Experience */

/* Onboarding Overlay */
.onboarding-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9998;
    display: none;
    transition: opacity 0.3s ease;
}

.onboarding-spotlight {
    position: absolute;
    background: transparent;
    border: 3px solid #58a6ff;
    border-radius: 8px;
    box-shadow: 
        0 0 0 9999px rgba(0, 0, 0, 0.7),
        0 0 20px rgba(88, 166, 255, 0.5),
        inset 0 0 20px rgba(88, 166, 255, 0.3);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    pointer-events: none;
}

/* Highlighted Elements */
.onboarding-highlight {
    position: relative;
    z-index: 9999;
    border-radius: 8px;
    animation: pulse-highlight 2s infinite;
}

@keyframes pulse-highlight {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(88, 166, 255, 0.4); 
    }
    50% { 
        box-shadow: 0 0 0 10px rgba(88, 166, 255, 0.1); 
    }
}

/* Onboarding Tooltip */
.onboarding-tooltip {
    position: fixed;
    z-index: 10000;
    background: var(--dark-secondary);
    border: 1px solid var(--dark-tertiary);
    border-radius: 12px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(88, 166, 255, 0.1);
    max-width: 350px;
    min-width: 280px;
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.onboarding-tooltip.show {
    opacity: 1;
    transform: translateY(0);
}

.tooltip-content {
    padding: 20px;
}

.tooltip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--dark-tertiary);
    padding-bottom: 15px;
}

.tooltip-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent-blue);
}

.tooltip-step {
    background: var(--accent-blue);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.tooltip-body {
    margin-bottom: 20px;
}

.tooltip-text {
    margin: 0;
    color: var(--text-primary);
    line-height: 1.5;
}

.tooltip-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.navigation-buttons {
    display: flex;
    gap: 8px;
}

.tooltip-arrow {
    position: absolute;
    width: 0;
    height: 0;
    border: 8px solid transparent;
}

.arrow-top {
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    border-bottom-color: var(--dark-secondary);
}

.arrow-bottom {
    bottom: -16px;
    left: 50%;
    transform: translateX(-50%);
    border-top-color: var(--dark-secondary);
}

.arrow-left {
    left: -16px;
    top: 50%;
    transform: translateY(-50%);
    border-right-color: var(--dark-secondary);
}

.arrow-right {
    right: -16px;
    top: 50%;
    transform: translateY(-50%);
    border-left-color: var(--dark-secondary);
}

/* Progress Bar */
.onboarding-progress {
    width: 100%;
    height: 4px;
    background: var(--dark-tertiary);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-green));
    transition: width 0.3s ease;
    border-radius: 2px;
}

/* Toast Notifications */
.toast-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--dark-secondary);
    border: 1px solid var(--dark-tertiary);
    border-radius: 8px;
    padding: 15px 20px;
    color: var(--text-primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 10001;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    min-width: 280px;
}

.toast-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-notification.success {
    border-left: 4px solid var(--accent-green);
}

.toast-notification.fade-out {
    opacity: 0;
    transform: translateX(100%);
}

/* Contextual Help Tooltips */
.quick-help-tooltip {
    position: absolute;
    background: rgba(13, 17, 23, 0.95);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    max-width: 200px;
    z-index: 9999;
    opacity: 0;
    transform: translateY(5px);
    transition: all 0.2s ease;
    pointer-events: none;
    border: 1px solid var(--accent-blue);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.quick-help-tooltip.show {
    opacity: 1;
    transform: translateY(0);
}

/* Floating Help Button */
.floating-help-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    background: var(--accent-blue);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 
        0 6px 20px rgba(88, 166, 255, 0.3),
        0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 9997;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-help-button:hover {
    background: var(--accent-green);
    transform: scale(1.1);
    box-shadow: 
        0 8px 25px rgba(57, 185, 80, 0.4),
        0 4px 12px rgba(0, 0, 0, 0.3);
}

.floating-help-button:active {
    transform: scale(0.95);
}

/* Help Menu Modal */
.help-menu-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.help-menu-content {
    background: var(--dark-secondary);
    border: 1px solid var(--dark-tertiary);
    border-radius: 12px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideInUp 0.3s ease;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.help-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px 15px;
    border-bottom: 1px solid var(--dark-tertiary);
}

.help-menu-header h4 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 600;
}

.close-help-menu {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.close-help-menu:hover {
    background: var(--dark-tertiary);
    color: var(--text-primary);
}

.help-menu-body {
    padding: 10px;
}

.help-option {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 5px;
}

.help-option:hover {
    background: var(--dark-tertiary);
}

.help-option i {
    font-size: 1.3rem;
    width: 24px;
    text-align: center;
}

.help-option div {
    flex: 1;
}

.help-option strong {
    display: block;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 2px;
}

.help-option small {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Keyboard Shortcuts Modal */
.keyboard-shortcuts-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.keyboard-shortcuts-modal .modal-content {
    background: var(--dark-secondary);
    border: 1px solid var(--dark-tertiary);
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideInUp 0.3s ease;
}

.keyboard-shortcuts-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px 15px;
    border-bottom: 1px solid var(--dark-tertiary);
}

.keyboard-shortcuts-modal h5 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 600;
}

.close-modal {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.close-modal:hover {
    background: var(--dark-tertiary);
    color: var(--text-primary);
}

.shortcut-grid {
    display: grid;
    gap: 15px;
    padding: 20px;
}

.shortcut-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--dark-tertiary);
}

.shortcut-item:last-child {
    border-bottom: none;
}

.shortcut-item kbd {
    background: var(--dark-tertiary);
    color: var(--text-primary);
    padding: 4px 8px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9rem;
    border: 1px solid var(--accent-blue);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.shortcut-item span {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Contextual Help for Elements */
.contextual-help-tooltip {
    position: absolute;
    background: var(--dark-secondary);
    border: 1px solid var(--accent-blue);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    max-width: 280px;
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.3s ease;
    animation: helpAppear 0.3s ease forwards;
}

@keyframes helpAppear {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.help-content {
    padding: 15px;
    position: relative;
}

.help-close {
    position: absolute;
    top: 8px;
    right: 10px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.help-close:hover {
    background: var(--dark-tertiary);
    color: var(--text-primary);
}

.help-text {
    color: var(--text-primary);
    font-size: 0.9rem;
    line-height: 1.4;
    margin-right: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .onboarding-tooltip {
        max-width: 90vw;
        min-width: 280px;
        margin: 0 20px;
    }
    
    .floating-help-button {
        bottom: 20px;
        right: 20px;
        width: 48px;
        height: 48px;
        font-size: 1.1rem;
    }
    
    .help-menu-content {
        margin: 0 10px;
    }
    
    .toast-notification {
        right: 10px;
        left: 10px;
        min-width: auto;
    }
    
    .quick-help-tooltip {
        max-width: 180px;
        font-size: 0.8rem;
    }
}

/* Light Theme Adaptations */
[data-bs-theme="light"] .onboarding-tooltip {
    background: #ffffff;
    border-color: var(--accent-blue);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.1),
        0 0 20px rgba(88, 166, 255, 0.1);
}

[data-bs-theme="light"] .help-menu-content {
    background: #ffffff;
    border-color: #e9ecef;
}

[data-bs-theme="light"] .toast-notification {
    background: #ffffff;
    border-color: #e9ecef;
}

[data-bs-theme="light"] .quick-help-tooltip {
    background: rgba(255, 255, 255, 0.95);
    border-color: var(--accent-blue);
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    .onboarding-tooltip,
    .toast-notification,
    .help-menu-content,
    .quick-help-tooltip,
    .contextual-help-tooltip {
        transition: none;
        animation: none;
    }
    
    .onboarding-highlight {
        animation: none;
    }
    
    .floating-help-button {
        transition: none;
    }
}

/* Focus States for Accessibility */
.onboarding-tooltip .btn:focus,
.help-option:focus,
.floating-help-button:focus {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
}

/* Smart Tooltip Styles */
.smart-tooltip-container {
    position: fixed;
    z-index: 10001;
    display: none;
    pointer-events: none;
}

.smart-tooltip {
    background: var(--dark-secondary);
    border: 1px solid var(--accent-blue);
    border-radius: 10px;
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.3),
        0 0 15px rgba(88, 166, 255, 0.2);
    max-width: 320px;
    min-width: 250px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    pointer-events: auto;
}

.smart-tooltip.show {
    opacity: 1;
    transform: translateY(0);
}

.smart-tooltip.pinned {
    border-color: var(--accent-green);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(57, 185, 80, 0.3);
}

.tooltip-header-smart {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 15px 10px;
    border-bottom: 1px solid var(--dark-tertiary);
}

.tooltip-icon {
    color: var(--accent-blue);
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.tooltip-title-smart {
    flex: 1;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.tooltip-pin {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.tooltip-pin:hover {
    background: var(--dark-tertiary);
    color: var(--accent-blue);
}

.tooltip-content-smart {
    padding: 0 15px 10px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
}

.tooltip-actions {
    display: flex;
    justify-content: space-between;
    padding: 10px 15px 15px;
    gap: 8px;
}

.btn-help-more,
.btn-help-dismiss {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-help-more {
    background: var(--accent-blue);
    color: white;
}

.btn-help-more:hover {
    background: var(--accent-green);
}

.btn-help-dismiss {
    background: var(--dark-tertiary);
    color: var(--text-secondary);
}

.btn-help-dismiss:hover {
    background: var(--accent-red);
    color: white;
}

.tooltip-arrow-smart {
    position: absolute;
    width: 0;
    height: 0;
    border: 8px solid transparent;
}

.tooltip-arrow-smart.arrow-top {
    top: -16px;
    border-bottom-color: var(--dark-secondary);
}

.tooltip-arrow-smart.arrow-bottom {
    bottom: -16px;
    border-top-color: var(--dark-secondary);
}

/* Help Mode Styles */
.help-mode-active .help-highlight {
    position: relative;
    outline: 2px dashed var(--accent-blue);
    outline-offset: 2px;
    border-radius: 6px;
    animation: help-pulse 2s infinite;
    background: rgba(88, 166, 255, 0.05);
}

@keyframes help-pulse {
    0%, 100% { 
        outline-color: var(--accent-blue);
        background: rgba(88, 166, 255, 0.05);
    }
    50% { 
        outline-color: var(--accent-green);
        background: rgba(57, 185, 80, 0.05);
    }
}

.help-indicator {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background: var(--accent-blue);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(88, 166, 255, 0.4);
    animation: help-indicator-bounce 1s infinite;
}

@keyframes help-indicator-bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.help-mode-instructions {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--dark-secondary);
    border: 1px solid var(--accent-blue);
    border-radius: 10px;
    padding: 20px;
    max-width: 400px;
    z-index: 10002;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.help-instructions-content h6 {
    margin: 0 0 10px;
    color: var(--accent-blue);
}

.help-instructions-content p {
    margin: 0 0 15px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.help-shortcuts {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 15px;
}

.help-shortcuts span {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.help-shortcuts kbd {
    background: var(--dark-tertiary);
    color: var(--text-primary);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.7rem;
    margin-right: 8px;
}

/* Contextual Help Elements */
.has-smart-help {
    position: relative;
}

.has-smart-help::after {
    content: '?';
    position: absolute;
    top: -5px;
    right: -5px;
    width: 16px;
    height: 16px;
    background: var(--accent-blue);
    color: white;
    border-radius: 50%;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.has-smart-help:hover::after {
    opacity: 1;
}

.suggested-help {
    animation: suggest-attention 1s ease-in-out;
    background: rgba(88, 166, 255, 0.1) !important;
    border: 1px solid rgba(88, 166, 255, 0.3) !important;
    border-radius: 6px;
}

@keyframes suggest-attention {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(88, 166, 255, 0.4);
    }
    50% { 
        box-shadow: 0 0 0 8px rgba(88, 166, 255, 0.1);
    }
}

/* Help Notifications */
.help-notification {
    position: fixed;
    bottom: 100px;
    right: 30px;
    background: var(--dark-secondary);
    border: 1px solid var(--accent-blue);
    border-radius: 10px;
    padding: 20px;
    max-width: 350px;
    z-index: 9998;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    animation: helpNotificationSlide 0.5s ease forwards;
}

@keyframes helpNotificationSlide {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.help-notification.orientation h6 {
    color: var(--accent-blue);
    margin: 0 0 10px;
}

.help-notification.orientation p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0 0 15px;
}

.help-notification.fade-out {
    opacity: 0;
    transform: translateX(100%);
}

/* Data Help Attributes */
[data-help] {
    cursor: help;
}

[data-help]:hover {
    position: relative;
}

[data-has-contextual-help="true"]:hover {
    background: rgba(88, 166, 255, 0.05);
    border-radius: 4px;
    transition: background 0.2s ease;
}

/* Light Theme Adaptations for Smart Tooltips */
[data-bs-theme="light"] .smart-tooltip {
    background: #ffffff;
    border-color: var(--accent-blue);
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.1),
        0 0 15px rgba(88, 166, 255, 0.1);
}

[data-bs-theme="light"] .help-mode-instructions {
    background: #ffffff;
    border-color: var(--accent-blue);
}

[data-bs-theme="light"] .help-notification {
    background: #ffffff;
    border-color: var(--accent-blue);
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .onboarding-spotlight {
        border-width: 4px;
        box-shadow: 
            0 0 0 9999px rgba(0, 0, 0, 0.9),
            0 0 30px rgba(88, 166, 255, 0.8);
    }
    
    .onboarding-tooltip,
    .smart-tooltip {
        border-width: 2px;
    }
    
    .help-highlight {
        outline-width: 3px;
    }
}

/* Responsive Smart Tooltips */
@media (max-width: 768px) {
    .smart-tooltip {
        max-width: 90vw;
        min-width: 250px;
        margin: 0 20px;
    }
    
    .help-mode-instructions {
        max-width: 90vw;
        margin: 0 20px;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .help-notification {
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(100%);
        bottom: 20px;
    }
    
    .help-notification.show {
        transform: translateY(0);
    }
    
    .help-indicator {
        width: 20px;
        height: 20px;
        font-size: 0.6rem;
    }
}