/* Navigation History System Styles */

.navigation-history-group {
    position: relative;
}

.navigation-history-menu {
    min-width: 300px;
    max-width: 400px;
    max-height: 400px;
    overflow-y: auto;
}

.navigation-history-menu .dropdown-item {
    padding: 0.5rem 1rem;
    border-bottom: 1px solid #f1f3f4;
    white-space: normal;
}

.navigation-history-menu .dropdown-item:last-child {
    border-bottom: none;
}

.navigation-history-menu .dropdown-item:hover {
    background-color: #f8f9fa;
}

.navigation-history-menu .dropdown-item .text-truncate {
    font-weight: 500;
}

.navigation-history-menu .dropdown-item small {
    font-size: 0.75rem;
    display: block;
    margin-top: 0.25rem;
    color: #6c757d;
}

/* Back button enhancements */
.navigation-back-btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.navigation-back-btn:not(.disabled):hover {
    transform: translateX(-2px);
    transition: transform 0.2s ease;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .navigation-history-menu {
        min-width: 280px;
        max-width: 95vw;
    }

    .navigation-history-group .dropdown-toggle-split {
        padding-left: 0.25rem;
        padding-right: 0.25rem;
    }
}

/* Loading state */
.navigation-history-loading {
    text-align: center;
    padding: 1rem;
    color: #6c757d;
}

.navigation-history-loading::after {
    content: '...';
    animation: loading-dots 1.5s infinite;
}

@keyframes loading-dots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}

/* History item icons */
.navigation-history-menu .dropdown-item::before {
    content: '📄';
    margin-right: 0.5rem;
    opacity: 0.6;
}

/* Special icons for different page types */
.navigation-history-menu .dropdown-item[data-page-type="dashboard"]::before {
    content: '🏠';
}

.navigation-history-menu .dropdown-item[data-page-type="analytics"]::before {
    content: '📊';
}

.navigation-history-menu .dropdown-item[data-page-type="settings"]::before {
    content: '⚙️';
}

.navigation-history-menu .dropdown-item[data-page-type="reports"]::before {
    content: '📋';
}

/* Dark theme support */
@media (prefers-color-scheme: dark) {
    .navigation-history-menu {
        background-color: #2d3748;
        border-color: #4a5568;
    }

    .navigation-history-menu .dropdown-item {
        color: #e2e8f0;
        border-color: #4a5568;
    }

    .navigation-history-menu .dropdown-item:hover {
        background-color: #4a5568;
    }
}