/* audio-player.css */

html, body {
    height: 100vh;
    margin: 0;
    overflow: hidden; 
}

body {
    display: flex;
    flex-direction: column;
}

header {
    flex: 0 0 auto;
    z-index: 100;
}

.custom-audio-player {
    flex: 0 0 auto; 
    width: 100%; /* Sicherstellen, dass der Container breit ist */
    box-sizing: border-box; /* Padding inklusive */
    background: rgba(0,0,0,0.85);
    border-bottom: 2px solid #ff7700;
    padding: 10px;
    z-index: 99;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #ff7700;
}

.player-controls {
    display: flex;
    align-items: center;
    justify-content: space-between; /* Buttons außen, Player mitte */
    width: 100%;
    gap: 0;
    margin: 0;
}

.player-controls button {
    flex: 0 0 auto; /* Buttons dürfen nicht schrumpfen */
    background: #ff7700;
    border: none;
    color: white;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.2rem;
}

.player-controls button:hover {
    background: white;
    color: #ff7700;
}

.player-controls audio {
    flex-grow: 1; /* Nimm den ganzen restlichen Platz */
    width: auto;  /* Reset fixed width */
    max-width: none; /* Keine Begrenzung mehr */
    height: 40px;
}

#current-track-title {
    font-family: Verdana, sans-serif;
    font-style: italic;
    font-size: 0.9rem;
    margin-bottom: 5px;
    color: white;
}

.playlist-scroll-container {
    flex: 1 1 auto; 
    overflow-y: auto; 
    padding: 10px;
    background: rgba(0,0,0,0.5);
    scrollbar-width: thin;
    scrollbar-color: #ff7700 #333;
}

.playlist-table {
    width: 100%;
    border-collapse: collapse;
}

/* Header Styling für Sortierung */
.playlist-table th {
    background: rgba(0,0,0,0.8);
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 10px;
    cursor: pointer;
    color: #ff7700;
    border-bottom: 2px solid #ff7700;
    text-align: left;
}

.playlist-table th:hover {
    background: rgba(255,119,0,0.2);
    color: white;
}

.playlist-table tr {
    border-bottom: 1px solid rgba(255,119,0,0.3);
    cursor: pointer;
    transition: background 0.2s;
}

.playlist-table tr:hover {
    background: rgba(255,119,0,0.2);
}

.playlist-table tr.active-track {
    background: rgba(255,119,0,0.6);
    color: white;
}

.playlist-table td {
    padding: 8px;
    font-size: 0.9rem;
}

footer {
    flex: 0 0 auto;
    z-index: 100;
    margin: 0 !important; 
}

/* Loading Indicator für HTMX */
.htmx-indicator {
    opacity: 0;
    transition: opacity 200ms ease-in;
}
.htmx-request .htmx-indicator{
    opacity: 1;
}
.htmx-request.htmx-indicator{
    opacity: 1;
}
