/**
 * Twitch Statusbar Plugin Styles
 * 
 * @package TwitchStatusbar
 * @since 1.0.0
 */

/* Basis-Styles für die Statusleiste */
.twitch-statusbar {
    background: #9146FF;
    color: white;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.4;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    border-radius: 0;
    overflow: hidden;
}

/* Container für den Inhalt */
.twitch-statusbar__container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    max-width: 1200px;
    margin: 0 auto;
    gap: 20px;
}

/* Hauptinhalt der Statusleiste */
.twitch-statusbar__content {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
    min-width: 0; /* Verhindert Überlauf */
}

/* Live-Indikator */
.twitch-statusbar__live-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    white-space: nowrap;
    flex-shrink: 0;
}

.twitch-statusbar__live-dot {
    width: 10px;
    height: 10px;
    background: #ff0000;
    border-radius: 50%;
    animation: twitch-statusbar-pulse 2s infinite;
    box-shadow: 0 0 8px rgba(255, 0, 0, 0.5);
}

@keyframes twitch-statusbar-pulse {
    0% { 
        opacity: 1; 
        transform: scale(1);
    }
    50% { 
        opacity: 0.6; 
        transform: scale(1.1);
    }
    100% { 
        opacity: 1; 
        transform: scale(1);
    }
}

/* Stream-Informationen */
.twitch-statusbar__stream-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.twitch-statusbar__title {
    font-weight: 600;
    font-size: 15px;
    line-height: 1.3;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.twitch-statusbar__game {
    font-size: 13px;
    opacity: 0.85;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Statistiken */
.twitch-statusbar__stats {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.twitch-statusbar__viewers {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

.twitch-statusbar__viewer-icon {
    font-size: 16px;
    opacity: 0.9;
}

.twitch-statusbar__viewer-count {
    font-weight: 600;
}

/* Aktionsbereich */
.twitch-statusbar__action {
    flex-shrink: 0;
}

.twitch-statusbar__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: white;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    padding: 8px 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 6px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.twitch-statusbar__link:hover,
.twitch-statusbar__link:focus {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.6);
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.twitch-statusbar__link:active {
    transform: translateY(0);
}

.twitch-statusbar__external-icon {
    font-size: 12px;
    opacity: 0.8;
}

/* Offline-Status */
.twitch-statusbar--offline {
    background: #6c5ce7;
}

.twitch-statusbar--offline .twitch-statusbar__offline-message {
    font-size: 15px;
    opacity: 0.9;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .twitch-statusbar__container {
        padding: 10px 16px;
        gap: 16px;
    }
    
    .twitch-statusbar__content {
        gap: 16px;
    }
    
    .twitch-statusbar__title {
        font-size: 14px;
    }
    
    .twitch-statusbar__game {
        font-size: 12px;
    }
}

@media (max-width: 768px) {
    .twitch-statusbar__container {
        padding: 8px 12px;
        gap: 12px;
    }
    
    .twitch-statusbar__content {
        gap: 12px;
    }
    
    .twitch-statusbar__live-indicator {
        font-size: 11px;
        gap: 6px;
    }
    
    .twitch-statusbar__live-dot {
        width: 8px;
        height: 8px;
    }
    
    .twitch-statusbar__title {
        font-size: 13px;
    }
    
    .twitch-statusbar__game {
        font-size: 11px;
    }
    
    .twitch-statusbar__viewers {
        font-size: 12px;
        gap: 4px;
    }
    
    .twitch-statusbar__viewer-icon {
        font-size: 14px;
    }
    
    .twitch-statusbar__link {
        font-size: 12px;
        padding: 6px 12px;
        gap: 6px;
    }
}

@media (max-width: 600px) {
    .twitch-statusbar__container {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 10px 12px;
    }
    
    .twitch-statusbar__content {
        justify-content: center;
        text-align: center;
    }
    
    .twitch-statusbar__action {
        text-align: center;
    }
    
    .twitch-statusbar__link {
        justify-content: center;
        width: 100%;
        max-width: 200px;
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .twitch-statusbar__game {
        display: none;
    }
    
    .twitch-statusbar__viewers {
        display: none;
    }
    
    .twitch-statusbar__title {
        font-size: 12px;
    }
    
    .twitch-statusbar__live-indicator {
        font-size: 10px;
    }
}

/* Dark Mode Unterstützung */
@media (prefers-color-scheme: dark) {
    .twitch-statusbar {
        box-shadow: 0 2px 12px rgba(0,0,0,0.3);
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .twitch-statusbar {
        border: 2px solid #ffffff;
    }
    
    .twitch-statusbar__link {
        border-width: 3px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .twitch-statusbar__live-dot {
        animation: none;
    }
    
    .twitch-statusbar__link:hover {
        transform: none;
    }
}

/* Print Styles */
@media print {
    .twitch-statusbar {
        display: none;
    }
}

/* Accessibility Verbesserungen */
.twitch-statusbar__link:focus {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

.twitch-statusbar__live-dot::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid #ff0000;
    border-radius: 50%;
    opacity: 0.3;
    animation: twitch-statusbar-pulse 2s infinite;
}

/* Hover-Effekte für bessere Interaktivität */
.twitch-statusbar:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

/* Smooth Transitions */
.twitch-statusbar * {
    transition: all 0.2s ease;
}

/* Custom Properties für einfache Anpassungen */
:root {
    --twitch-statusbar-bg: #9146FF;
    --twitch-statusbar-text: #ffffff;
    --twitch-statusbar-live-dot: #ff0000;
    --twitch-statusbar-offline-bg: #6c5ce7;
    --twitch-statusbar-shadow: rgba(0,0,0,0.15);
    --twitch-statusbar-border: rgba(255,255,255,0.3);
}

/* Fallback für ältere Browser */
.twitch-statusbar {
    background: var(--twitch-statusbar-bg, #9146FF);
    color: var(--twitch-statusbar-text, #ffffff);
}
