/* Sound Manager tab styles */

.sound-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 20px;
    min-height: 500px;
    width: 100%;
}

/* Sidebar */
.sound-sidebar {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    overflow-y: auto;
    max-height: 700px;
}

.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-muted);
    transition: all 0.15s;
}
.category-item:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.category-item.active { background: rgba(124, 131, 255, 0.15); color: var(--accent); }

.category-count {
    background: rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 2px 8px;
    font-size: 11px;
}

#tab-sound .main { max-width: none; }

/* Main panel */
.sound-main {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sound-toolbar {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.sound-toolbar select {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 8px 12px;
    color: var(--text);
    font-size: 13px;
}

.sound-stats {
    margin-left: auto;
    font-size: 13px;
    color: var(--text-dim);
}

/* Sound table */
.sound-table-wrap {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    max-height: 600px;
    overflow-y: auto;
}

.sound-table {
    width: 100%;
    border-collapse: collapse;
}

.sound-table th {
    position: sticky;
    top: 0;
    background: #161625;
    text-align: left;
    padding: 12px 16px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-dim);
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}
.sound-table th:first-child { width: 44px; cursor: default; }
.sound-table th:hover { color: var(--text-muted); }
.sound-table th .sort-arrow { font-size: 10px; margin-left: 4px; opacity: 0.5; }
.sound-table th.sorted .sort-arrow { opacity: 1; color: var(--accent); }

.sound-table td {
    padding: 10px 16px;
    font-size: 13px;
    border-bottom: 1px solid rgba(42, 42, 74, 0.4);
    white-space: nowrap;
    text-align: left;
}

.sound-table tr:hover td { background: rgba(255,255,255,0.02); }

.sound-type-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
}
.sound-type-badge.metasound { background: rgba(124,131,255,0.2); color: #a0a5ff; }
.sound-type-badge.soundcue { background: rgba(76,175,80,0.2); color: #81c784; }
.sound-type-badge.attenuation { background: rgba(255,152,0,0.2); color: #ffb74d; }
.sound-type-badge.soundscape { background: rgba(0,188,212,0.2); color: #4dd0e1; }
.sound-type-badge.other { background: rgba(255,255,255,0.08); color: var(--text-muted); }

.sound-era-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
}
.sound-era-badge.era-1609 { background: rgba(139,195,74,0.2); color: #aed581; }
.sound-era-badge.era-1660 { background: rgba(255,152,0,0.2); color: #ffb74d; }
.sound-era-badge.era-1776 { background: rgba(244,67,54,0.2); color: #ef9a9a; }
.sound-era-badge.era-all { background: rgba(255,255,255,0.05); color: var(--text-dim); }

.sound-path {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 11px;
    color: var(--text-dim);
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Play/stop button */
.sound-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid rgba(124, 131, 255, 0.4);
    background: rgba(124, 131, 255, 0.1);
    color: #a0a5ff;
    font-size: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    padding: 0;
    line-height: 1;
}
.sound-btn:hover {
    background: rgba(124, 131, 255, 0.25);
    border-color: rgba(124, 131, 255, 0.7);
    transform: scale(1.1);
}
.sound-btn.playing {
    background: rgba(239, 83, 80, 0.2);
    border-color: rgba(239, 83, 80, 0.5);
    color: #ef5350;
}
.sound-btn.playing:hover {
    background: rgba(239, 83, 80, 0.35);
    border-color: rgba(239, 83, 80, 0.8);
}

@media (max-width: 768px) {
    .sound-layout { grid-template-columns: 1fr; }
    .sound-sidebar { max-height: 200px; }
}
