/* ═══════════════════════════════════════════════════════
   HÖRERCHARTS v2.0 - ADAPTIVE STYLING MIT CSS VARIABLES
   ═══════════════════════════════════════════════════════ */

/* CSS-Variables werden dynamisch von PHP gesetzt */
:root {
    /* Diese Werte werden von hoerercharts.php überschrieben */
    --hc-primary: #007bff;
    --hc-success: #28a745;
    --hc-warning: #ffc107;
    --hc-danger: #dc3545;
    --hc-dark: #343a40;
    --hc-light: #f8f9fa;
    --hc-text: #212529;
    --hc-text-muted: #6c757d;
    --hc-radius: 8px;
}

/* Hörercharts Container - betrifft NUR die Charts, nicht die ganze Seite */
.hoerercharts-wrapper {
    background: var(--hc-light);
    color: var(--hc-text);
    padding: 20px;
    border-radius: var(--hc-radius);
}

/* ════════════════════════════════════════════════════════
   TAB NAVIGATION (eigene Klassen, kein Bootstrap)
   ════════════════════════════════════════════════════════ */
.hc-tab-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.hc-tab-button {
    flex: 1;
    min-width: 150px;
    background: var(--hc-light);
    border: 2px solid var(--hc-dark);
    color: var(--hc-text-muted);
    padding: 14px 20px;
    border-radius: var(--hc-radius);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.hc-tab-button i {
    font-size: 18px;
}

.hc-tab-button:hover {
    background: var(--hc-dark);
    border-color: var(--hc-primary);
    color: var(--hc-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
}

.hc-tab-button.active {
    background: var(--hc-primary);
    border-color: var(--hc-primary);
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.4);
}

.hc-tab-button.active:hover {
    transform: translateY(-2px);
}

/* Responsive Tab-Buttons */
@media (max-width: 768px) {
    .hc-tab-nav {
        flex-direction: column;
    }
    
    .hc-tab-button {
        width: 100%;
        min-width: auto;
    }
}

/* ════════════════════════════════════════════════════════
   VOTING STATUS BOX
   ════════════════════════════════════════════════════════ */
.hc-voting-status {
    margin-bottom: 25px;
}

.hoerercharts-wrapper .hc-voting-status .alert,
.hoerercharts-wrapper .alert {
    border-radius: var(--hc-radius);
    border-width: 2px;
    padding: 15px 20px;
}

.hoerercharts-wrapper .hc-voting-status .alert-success,
.hoerercharts-wrapper .alert-success {
    background: var(--hc-light) !important;
    color: var(--hc-success) !important;
    border-color: var(--hc-success) !important;
}

.hoerercharts-wrapper .hc-voting-status .alert-danger,
.hoerercharts-wrapper .alert-danger {
    background: var(--hc-light) !important;
    color: var(--hc-danger) !important;
    border-color: var(--hc-danger) !important;
}

.hoerercharts-wrapper .hc-voting-status .alert-info,
.hoerercharts-wrapper .alert-info {
    background: var(--hc-light) !important;
    color: var(--hc-primary) !important;
    border-color: var(--hc-primary) !important;
}

.hoerercharts-wrapper .hc-voting-status .alert-warning,
.hoerercharts-wrapper .alert-warning {
    background: var(--hc-light) !important;
    color: var(--hc-warning) !important;
    border-color: var(--hc-warning) !important;
}

.hc-voting-status .alert strong {
    font-weight: 700;
}

/* Thema-Box */
.hc-theme-box {
    background: var(--hc-light);
    border: 2px solid var(--hc-primary);
    border-radius: var(--hc-radius);
    padding: 20px;
    margin-top: 15px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.hc-theme-icon {
    font-size: 32px;
    color: var(--hc-primary);
    flex-shrink: 0;
}

.hc-theme-content {
    flex: 1;
}

.hc-theme-label {
    color: var(--hc-primary);
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.hc-theme-text {
    color: var(--hc-text);
    font-size: 16px;
    line-height: 1.6;
}

.hc-theme-none {
    justify-content: center;
    background: var(--hc-light);
    border-color: var(--hc-text-muted);
    color: var(--hc-text-muted);
    font-style: italic;
}

/* Labels */
.label-success {
    background: var(--hc-success) !important;
    color: #fff !important;
}

.label-danger {
    background: var(--hc-danger) !important;
    color: #fff !important;
}

.label-warning {
    background: var(--hc-warning) !important;
    color: var(--hc-dark) !important;
}

/* ════════════════════════════════════════════════════════
   SONG CARDS
   ════════════════════════════════════════════════════════ */
.hc-song-card {
    position: relative;
    background: var(--hc-light);
    border: 2px solid var(--hc-dark);
    border-radius: var(--hc-radius);
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.hc-song-card:hover {
    transform: translateY(-5px);
    border-color: var(--hc-primary);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.15);
}

.hc-song-position {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--hc-primary);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    color: #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    border: 2px solid var(--hc-primary);
}

/* YouTube Button */
.hc-youtube-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #ff0000;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: var(--hc-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.3s ease;
    z-index: 10;
    text-decoration: none;
}

.hc-youtube-btn:hover {
    background: #cc0000;
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.4);
    color: #fff;
}

.hc-song-content {
    margin-left: 70px;
    margin-right: 50px;
    flex: 1;
}

.hc-song-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--hc-text);
    margin-bottom: 8px;
}

.hc-song-artist {
    font-size: 14px;
    color: var(--hc-text-muted);
    margin-bottom: 15px;
}

/* Song Begründung */
.hc-song-reason-wrapper {
    margin-bottom: 15px;
}

.hc-reason-toggle {
    background: var(--hc-light);
    border: 1px solid var(--hc-primary);
    color: var(--hc-primary);
    padding: 8px 16px;
    border-radius: var(--hc-radius);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.hc-reason-toggle:hover {
    background: var(--hc-primary);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
}

.hc-reason-toggle i {
    font-size: 14px;
}

.hc-song-reason {
    margin-top: 12px;
    padding: 15px;
    background: var(--hc-light);
    border-left: 3px solid var(--hc-primary);
    border-radius: var(--hc-radius);
    color: var(--hc-text);
    font-size: 14px;
    line-height: 1.7;
    font-style: italic;
}

.hc-song-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.hc-votes-badge {
    background: var(--hc-success);
    color: #fff;
    padding: 8px 15px;
    border-radius: var(--hc-radius);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

/* Buttons */
.hc-btn-fav,
.hc-btn-vote {
    padding: 10px 18px;
    border-radius: var(--hc-radius);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.hc-btn-fav {
    background: var(--hc-text-muted);
    color: #fff;
}

.hc-btn-fav.active {
    background: var(--hc-danger);
}

.hc-btn-fav:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.hc-btn-vote {
    background: var(--hc-success);
    color: #fff;
}

.hc-btn-vote:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}

.hc-btn-vote:disabled,
.hc-btn-fav:disabled {
    background: var(--hc-text-muted);
    cursor: not-allowed;
    opacity: 0.6;
}

.hc-btn-vote:disabled:hover,
.hc-btn-fav:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Top 3 Hervorhebung */
.hc-song-card.rank-1 {
    border-color: var(--hc-primary);
}

.hc-song-card.rank-1 .hc-song-position {
    background: var(--hc-primary);
    border-color: var(--hc-primary);
}

.hc-song-card.rank-1 .hc-votes-badge {
    background: var(--hc-primary);
}

.hc-song-card.rank-2 .hc-song-position {
    background: var(--hc-text-muted);
}

.hc-song-card.rank-3 .hc-song-position {
    background: var(--hc-warning);
    color: var(--hc-dark);
}

/* ════════════════════════════════════════════════════════
   SUBMIT FORM
   ════════════════════════════════════════════════════════ */
.hoerercharts-wrapper .hc-submit-form {
    background: var(--hc-dark);
    padding: 30px;
    border-radius: var(--hc-radius);
    border: 2px solid var(--hc-primary);
}

.hoerercharts-wrapper .hc-submit-form .form-control {
    background: var(--hc-light) !important;
    color: var(--hc-text) !important;
    border-color: var(--hc-dark) !important;
}

.hoerercharts-wrapper .hc-submit-form .form-control:focus {
    border-color: var(--hc-primary) !important;
    background: var(--hc-light) !important;
}

.hoerercharts-wrapper .hc-submit-form label {
    color: var(--hc-text) !important;
}

.hc-submit-btn {
    background: var(--hc-primary);
    color: #fff;
    border: none;
    padding: 15px 40px;
    border-radius: var(--hc-radius);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hc-submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.3);
}

/* ════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .hc-song-position {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .hc-song-content {
        margin-left: 50px;
    }
    
    .hc-song-meta {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .hc-btn-fav,
    .hc-btn-vote {
        width: 100%;
        justify-content: center;
    }
}
