/* Breadcrumb Navigation Styles */

.breadcrumb-nav {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.875rem;
    min-height: 2.5rem;
}

.breadcrumb-nav.floating {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 0.5rem 1rem;
    max-width: 80vw;
}

.breadcrumb-nav-inner {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.breadcrumb-separator {
    color: #9ca3af;
    margin: 0 0.5rem;
    font-weight: 400;
    user-select: none;
}

.breadcrumb-button {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.5rem;
    border: none;
    background: transparent;
    color: #2563eb; /* default blue */
    text-decoration: none;
    border-radius: 0.375rem;
    transition: all 0.15s ease;
    cursor: pointer;
    font-size: inherit;
    font-family: inherit;
    line-height: 1.5;
}

.breadcrumb-button:hover,
.breadcrumb-button.hover {
    background: #eff6ff; /* blue hover bg */
    color: #1d4ed8; /* darker blue */
}

.breadcrumb-button.current {
    color: #1d4ed8;
    font-weight: 500;
    cursor: default;
    background: #f9fafb;
}

.breadcrumb-button.current:hover {
    background: #eff6ff;
    color: #1d4ed8;
}

.breadcrumb-icon {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    line-height: 1;
}

.breadcrumb-text {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.modified-indicator {
    color: #f59e0b;
    font-size: 0.75rem;
    margin-left: 0.25rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Focus indicators for accessibility */
.breadcrumb-button:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Dark theme support */
.dark-theme .breadcrumb-nav {
    background: rgba(31, 41, 55, 0.95);
    border-bottom-color: #374151;
}

.dark-theme .breadcrumb-nav.floating {
    background: rgba(31, 41, 55, 0.95);
    border-color: #374151;
}

.dark-theme .breadcrumb-separator {
    color: #6b7280;
}

.dark-theme .breadcrumb-button {
    color: #9ca3af;
}

.dark-theme .breadcrumb-button:hover,
.dark-theme .breadcrumb-button.hover {
    background: #374151;
    color: #d1d5db;
}

.dark-theme .breadcrumb-button.current {
    color: #f9fafb;
    background: #374151;
}

.dark-theme .breadcrumb-button.current:hover {
    background: #374151;
    color: #f9fafb;
}

/* Responsive design */
@media (max-width: 768px) {
    .breadcrumb-nav {
        padding: 0.375rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .breadcrumb-nav.floating {
        left: 1rem;
        right: 1rem;
        transform: none;
        max-width: none;
    }
    
    .breadcrumb-text {
        max-width: 100px;
    }
    
    .breadcrumb-separator {
        margin: 0 0.25rem;
    }
    
    .breadcrumb-button {
        padding: 0.25rem 0.375rem;
        gap: 0.25rem;
    }
}

/* Truncate long paths on mobile */
@media (max-width: 640px) {
    .breadcrumb-nav-inner {
        max-width: 100%;
        overflow: hidden;
    }
    
    .breadcrumb-item:not(:last-child):not(:first-child) {
        display: none;
    }
    
    .breadcrumb-item:nth-last-child(2) {
        display: flex;
    }
    
    .breadcrumb-item:nth-last-child(2) .breadcrumb-text::before {
        content: '...';
        color: #9ca3af;
        margin-right: 0.25rem;
    }
}

/* Animation for updates */
.breadcrumb-nav {
    transition: all 0.2s ease;
}

.breadcrumb-item {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Context indicator */
.breadcrumb-button.context-galaxy {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.breadcrumb-button.context-world {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.breadcrumb-button.context-recipe {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: #333;
}

/* Hover tooltips */
.breadcrumb-button[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    white-space: nowrap;
    margin-bottom: 0.25rem;
    z-index: 10;
    pointer-events: none;
}

.breadcrumb-button[title]:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: #1f2937;
    z-index: 10;
    pointer-events: none;
}