/* 
 * PowerOn | Multi-Agent Service - Navigation CSS
 * Modern bright theme for navigation components
 * CSS Variables sind in styles_variables.css definiert
 */

/* ===== NAVIGATION COMPONENTS ===== */

/* Sidebar */
.sidebar {
    width: 250px;
    background-color: var(--color-background-soft-alt);
    color: var(--color-text);
    box-shadow: inset 0 0 0 1px rgba(199,197,178,.15), 0 0 10px rgba(0, 0, 0, 0.1);
    border-right: 1px solid var(--color-primary);
    padding: 0;
    flex-shrink: 0;
    font-size: 0.875rem;
    height: 100vh;
    overflow-y: auto;
    position: relative;
    z-index: 1000;
    font-family: var(--font-family);
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-background-soft);
    pointer-events: none;
    z-index: 0;
}

.sidebar > * {
    position: relative;
    z-index: 1;
}

.sidebar-header {
    padding: 1.5rem 1rem;
    margin-bottom: 0;
    border-bottom: 1px solid var(--color-primary);
    background-color: var(--color-bg);
    font-family: var(--font-family);
}

.sidebar-header h2 {
    color: var(--color-blue);
    margin-bottom: 1rem;
    font-size: 1.4rem;
    font-weight: 600;
    font-family: var(--font-family);
}

.sidebar-header .logo-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.sidebar-header .logo {
    max-width: 80%;
    height: auto;
    margin-bottom: 0;
    display: block;
}

.sidebar-header .youtube-icon-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #FF0000;
    color: white;
    text-decoration: none;
    transition: all 0.2s;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sidebar-header .youtube-icon-link:hover {
    background: #cc0000;
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.sidebar-header .youtube-icon-link i {
    font-size: 1.1rem;
}

/* Navigation Container */
.nav-container {
    border-radius: 15px;
    padding: 8px;
    box-shadow: inset 0 0 0 1px rgba(199,197,178,.15), 0 0 10px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 1001;
}

.nav-container ul {
    list-style: none;
    padding: 0;
    margin: 0;
    background-color: transparent;
}

/* Navigation Items */
.nav-item {
    list-style: none;
    margin: 4px 0;
    border-radius: 15px;
    transition: all 0.2s ease;
}

.nav-item a, .nav-item button {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    color: var(--color-text);
    text-decoration: none;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    cursor: pointer;
    border-radius: 15px;
    transition: all 0.2s cubic-bezier(.4,0,.2,1);
    font-size: 0.84rem;
    position: relative;
    z-index: 1;
    font-family: var(--font-family);
}

.nav-item a:hover, .nav-item button:hover {
    background-color: var(--color-blue-disabled);
    color: var(--color-blue);
    box-shadow: none;
    border-left: 4px solid var(--color-blue);
}

.nav-item.active a, .nav-item.active button {
    background-color: var(--color-blue);
    color: var(--color-bg);
    font-weight: bold;
    border-left: 4px solid var(--color-blue);
    box-shadow: none;
    border-top-right-radius: 25px;
    border-bottom-right-radius: 25px;
}

.nav-item a:active, .nav-item button:active {
    background-color: var(--color-blue-hover);
    color: var(--color-bg);
}

.nav-item i {
    margin-right: 10px;
    width: 17px;
    text-align: center;
    color: var(--color-gray);
    font-size: 0.9rem;
}

.nav-item.active i {
    color: var(--color-bg);
}

/* Folder Headers */
.folder-header {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    color: var(--color-text);
    text-decoration: none;
    border-radius: 15px;
    transition: all 0.2s ease;
    font-family: var(--font-family);
}

.folder-header:hover {
    background-color: var(--color-highlight-gray);
}

.folder-header.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

.toggle-icon {
    margin-left: auto;
    transition: transform 0.2s ease;
}

/* Dropdowns */
.dropdown {
    position: relative;
    z-index: 1002;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    color: var(--color-text);
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    border-radius: 15px;
    transition: all 0.2s ease;
    font-family: var(--font-family);
}

.dropdown-toggle:hover {
    background-color: var(--color-highlight-gray);
    color: var(--color-blue);
}

.dropdown-content {
    position: absolute;
    background-color: var(--color-bg);
    min-width: 180px;
    box-shadow: inset 0 0 0 1px rgba(199,197,178,.15), 0 0 10px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(199,197,178,.15);
    border-radius: 25px;
    padding: 8px 0;
    z-index: 1002;
    left: 0;
    top: 100%;
    margin-top: 4px;
}

.dropdown-content a {
    display: block;
    padding: 8px 16px;
    color: var(--color-text);
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-family: var(--font-family);
}

.dropdown-content a:hover {
    background-color: var(--color-highlight-gray);
    color: var(--color-blue);
}

/* Action Buttons */
.nav-action-btn {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    color: var(--color-text);
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    border-radius: 15px;
    transition: all 0.2s ease;
    font-family: var(--font-family);
}

.nav-action-btn:hover {
    background-color: var(--color-highlight-gray);
    color: var(--color-blue);
}

.nav-action-btn i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
}

/* Current Workspace */
.current-workspace {
    padding: 0.75rem 1rem;
    margin: 0;
    font-weight: 500;
    color: var(--color-text);
    background-color: var(--color-highlight-gray);
    border-radius: 15px;
    border-left: 4px solid var(--color-blue);
    font-family: var(--font-family);
}

/* Current User */
.current-user {
    padding: 0.5rem 1rem;
    color: var(--color-gray);
    font-size: 0.8rem;
    font-family: var(--font-family);
}

/* Environment Info */
.environment-info {
    padding: 0.25rem 1rem;
    color: var(--color-gray);
    font-size: 0.7rem;
    font-style: italic;
    border-top: 1px solid var(--color-medium-gray);
    margin-top: 0.25rem;
    font-family: var(--font-family);
}

/* TTS Control */
.tts-control {
    padding: 0.5rem 1rem;
    border-top: 1px solid #f0f0f0;
    margin-top: 0.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tts-language-selector {
    width: 100%;
}

.tts-control-language-select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--color-gray-disabled);
    border-radius: 25px;
    background: var(--color-bg);
    font-size: 0.75rem;
    color: var(--color-text);
    cursor: pointer;
    font-weight: 500;
    font-family: var(--font-family);
}

.tts-control-language-select:hover:not(:disabled) {
    border-color: var(--color-blue);
}

.tts-control-language-select:focus {
    outline: none;
    border-color: var(--color-blue);
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.1);
}

.tts-control-language-select:disabled {
    background: var(--color-surface);
    color: var(--color-gray);
    cursor: not-allowed;
}

.tts-control-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.5rem;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.75rem;
    color: #333;
    position: relative;
}

.tts-control-btn:hover:not(.playing) {
    background: #e9ecef;
    border-color: #cbd5e1;
}

.tts-control-btn.playing {
    background: #fee2e2;
    border-color: #f87171;
    color: #dc2626;
    cursor: default;
}

.tts-control-btn.playing:hover {
    background: #fee2e2;
    border-color: #f87171;
}

.tts-control-btn.playing #tts-control-icon {
    color: #dc2626;
}

.tts-control-btn.preparing {
    background: #fef3c7;
    border-color: #fbbf24;
    color: #d97706;
    cursor: default;
    animation: tts-preparing-pulse-nav 1.5s ease-in-out infinite;
}

.tts-control-btn.preparing:hover {
    background: #fde68a;
    border-color: #fbbf24;
}

.tts-control-btn.preparing #tts-control-icon {
    color: #d97706;
}

@keyframes tts-preparing-pulse-nav {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(217, 119, 6, 0.4);
    }
    50% {
        opacity: 0.8;
        box-shadow: 0 0 0 4px rgba(217, 119, 6, 0);
    }
}

.tts-control-btn i {
    font-size: 0.875rem;
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}

.tts-control-voice-select {
    flex: 1;
    padding: 0.25rem 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 3px;
    background: white;
    font-size: 0.75rem;
    color: #333;
    cursor: pointer;
    min-width: 0;
    font-weight: 500;
}

.tts-control-voice-select:hover:not(:disabled) {
    border-color: #9ca3af;
}

.tts-control-voice-select:focus {
    outline: none;
    border-color: #2196f3;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.1);
}

.tts-control-voice-select:disabled {
    background: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
}

.tts-control-btn.playing .tts-control-voice-select {
    background: #fee2e2;
    border-color: #f87171;
    color: #dc2626;
    cursor: not-allowed;
}

/* Section Headers */
.nav-section-header {
    padding: 0.75rem 1rem;
    margin-top: 1rem;
    color: #007bff;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    border-bottom: 1px solid #e5e7eb;
}

/* Workspace List */
.workspace-list {
    margin-bottom: 1rem;
    max-height: 200px;
    overflow-y: auto;
    background-color: #f8f9fa;
    border-radius: 6px;
}

.workspace-item, .sidebar-item {
    padding: 0.5rem 1rem;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    cursor: pointer;
    color: #333;
    transition: all 0.2s ease;
    border-left: 4px solid transparent;
}

.workspace-item:hover, .sidebar-item:hover {
    background-color: #f0f0f0;
    border-left-color: #007bff;
}

.workspace-item.active, .sidebar-item.active {
    background-color: #e3f2fd;
    border-left-color: #007bff;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
    }
    
    .nav-item a, .nav-item button,
    .folder-header,
    .dropdown-toggle {
        padding: 8px 12px;
    }
}