/**
 * PRISM Breadcrumb Navigation Styles
 *
 * Provides breadcrumb navigation in the header for settings and preview pages.
 * Uses the same design language as the episode dropdown.
 */

/* =============================================================================
   HEADER BREADCRUMB CONTAINER
   ============================================================================= */

.header-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: auto;  /* Push to left side */
}

/* =============================================================================
   BACK BUTTON (already exists, but ensure consistency)
   ============================================================================= */

.header-breadcrumb .header-back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.6);
    background: transparent;
    text-decoration: none;
    transition: color 0.15s, background 0.15s;
}

.header-breadcrumb .header-back-btn:hover {
    color: var(--color-cyan, #00d9ff);
    background: rgba(0, 217, 255, 0.1);
}

/* =============================================================================
   BREADCRUMB PATH
   ============================================================================= */

.breadcrumb-path {
    display: flex;
    align-items: center;
    gap: 6px;
}

.breadcrumb-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.15s ease;
}

.breadcrumb-item--link {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.breadcrumb-item--link:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

.breadcrumb-item--current {
    background: rgba(0, 217, 255, 0.08);
    border: 1px solid rgba(0, 217, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
}

.breadcrumb-icon {
    width: 14px;
    height: 14px;
    opacity: 0.6;
    flex-shrink: 0;
}

.breadcrumb-item--current .breadcrumb-icon {
    opacity: 0.8;
    color: var(--color-cyan, #00d9ff);
}

/* =============================================================================
   SEPARATOR
   ============================================================================= */

.breadcrumb-separator {
    color: rgba(255, 255, 255, 0.25);
    font-size: 12px;
    font-weight: 400;
}

/* =============================================================================
   SETTINGS BADGE (gear icon)
   ============================================================================= */

.breadcrumb-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.4);
}

.breadcrumb-badge svg {
    width: 12px;
    height: 12px;
}

/* =============================================================================
   RESPONSIVE
   ============================================================================= */

@media (max-width: 640px) {
    .header-breadcrumb {
        max-width: calc(100vw - 200px);
        overflow: hidden;
    }

    .breadcrumb-path {
        overflow: hidden;
    }

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

    /* Hide org name on very small screens, just show icon */
    .breadcrumb-item--link span:not(.breadcrumb-icon) {
        display: none;
    }

    .breadcrumb-item--link {
        padding: 6px;
    }
}

/* =============================================================================
   HEADER HIERARCHY CRUMBS (Preview Page)
   ============================================================================= */

.header-hierarchy-crumbs {
    display: flex;
    align-items: center;
    gap: 4px;
}

.header-crumb {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
    cursor: pointer;
}

.header-crumb:hover {
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.05);
}

.header-crumb-icon {
    width: 12px;
    height: 12px;
    opacity: 0.6;
}

.header-crumb-text {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.header-crumb-sep {
    color: rgba(255, 255, 255, 0.2);
    font-size: 11px;
}

.header-crumb-chevron {
    display: inline-flex;
    opacity: 0.4;
    margin-left: 2px;
    transition: opacity 0.15s;
}

.header-crumb:hover .header-crumb-chevron {
    opacity: 0.7;
}

.header-crumb-chevron svg {
    width: 10px;
    height: 10px;
}

/* =============================================================================
   HIERARCHY NAV DROPDOWN
   ============================================================================= */

.hn-dropdown {
    background: rgba(26, 26, 46, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    z-index: 10000;
    animation: hn-dropdown-in 0.15s ease;
    max-height: 400px;
    overflow-y: auto;
}

@keyframes hn-dropdown-in {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hn-dropdown-header {
    padding: 10px 12px;
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hn-dropdown-loading {
    padding: 12px;
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 12px;
}

.hn-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: background 0.1s;
}

.hn-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.hn-dropdown-item--current {
    background: rgba(0, 217, 255, 0.08);
}

.hn-dropdown-item--current:hover {
    background: rgba(0, 217, 255, 0.12);
}

.hn-dropdown-item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.6);
}

.hn-dropdown-item-icon svg {
    width: 14px;
    height: 14px;
}

.hn-dropdown-item-text {
    flex: 1;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hn-dropdown-item-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
}

.hn-dropdown-item-check {
    display: flex;
    color: var(--color-cyan, #00d9ff);
}

.hn-dropdown-item-check svg {
    width: 12px;
    height: 12px;
}

/* Responsive - collapse on mobile */
@media (max-width: 768px) {
    .header-hierarchy-crumbs {
        display: none;
    }
}

/* =============================================================================
   PRINT STYLES
   ============================================================================= */

@media print {
    .header-breadcrumb,
    .header-hierarchy-crumbs {
        display: none;
    }
}
