/**
 * Frontend Styles für Watchguide Streaming Widget
 * GeneratePress & DSGVO optimiert
 * 
 * @package Watchguide\Streaming
 * @since 2.0.0
 */

/* CSS Variablen für GeneratePress Integration */
:root {
    --watchguide-widget-bg: var(--base-2, #ffffff);
    --watchguide-widget-border: var(--border, #e0e0e0);
    --watchguide-widget-text: var(--text, #333333);
    --watchguide-widget-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    --watchguide-service-radius: 8px;
    --watchguide-transition: all 0.3s ease;
}

/* Hauptcontainer */
.watchguide-streaming-widget {
    background: var(--watchguide-widget-bg);
    border: 1px solid var(--watchguide-widget-border);
    border-radius: var(--watchguide-service-radius);
    padding: 20px;
    margin: 30px 0;
    box-shadow: var(--watchguide-widget-shadow);
    transition: var(--watchguide-transition);
}

/* GeneratePress Container Kompatibilität */
.watchguide-streaming-widget.gb-container {
    margin-left: 0;
    margin-right: 0;
    max-width: 100%;
}

/* Header */
.streaming-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--watchguide-widget-border);
}

.streaming-header h3 {
    margin: 0;
    font-size: 1.3em;
    color: var(--watchguide-widget-text);
    font-weight: 600;
}

/* FSK Badge */
.fsk-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    background: #f0f0f0;
    color: #333;
}

.fsk-badge.fsk-0 { background: #4caf50; color: white; }
.fsk-badge.fsk-6 { background: #8bc34a; color: white; }
.fsk-badge.fsk-12 { background: #ffeb3b; color: #333; }
.fsk-badge.fsk-16 { background: #ff9800; color: white; }
.fsk-badge.fsk-18 { background: #f44336; color: white; }

/* Services Grid - GeneratePress responsive */
.streaming-services {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

/* Mobile Grid anpassung */
@media (max-width: 768px) {
    .streaming-services {
        grid-template-columns: 1fr;
    }
}

/* Service Card */
.service-card {
    background: var(--watchguide-widget-bg);
    border: 1px solid var(--watchguide-widget-border);
    border-radius: var(--watchguide-service-radius);
    padding: 15px;
    transition: var(--watchguide-transition);
    position: relative;
}

.service-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Service Icon - Lokale Text-Icons (DSGVO-konform) */
.service-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    color: white;
    font-weight: bold;
    font-size: 1.2em;
    margin-right: 12px;
}

/* Service Content */
.service-content {
    flex: 1;
}

.service-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.service-header strong {
    font-size: 1.1em;
    color: var(--watchguide-widget-text);
}

/* Badges */
.availability-badge,
.price-badge {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 600;
    display: inline-block;
}

.availability-badge {
    background: #e3f2fd;
    color: #1976d2;
}

.price-badge {
    background: #fff3e0;
    color: #f57c00;
}

.new-badge {
    background: #4caf50;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7em;
    font-weight: bold;
}

.warning-badge {
    background: #ff5252;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75em;
}

/* Service Features */
.service-features {
    margin: 10px 0;
    font-size: 0.9em;
    color: #666;
    line-height: 1.6;
}

.service-features span {
    display: inline-block;
    margin-right: 10px;
}

/* Streaming Link Button - GeneratePress Button Style */
.streaming-link {
    display: inline-block;
    padding: 8px 16px;
    background: var(--accent, #1e73be);
    color: white !important;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: 600;
    margin-top: 10px;
    transition: var(--watchguide-transition);
}

.streaming-link:hover {
    background: var(--accent-hover, #155a8a);
    transform: translateX(3px);
}

/* Compact Layout */
.watchguide-streaming-compact {
    padding: 15px;
}

.streaming-compact-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    font-weight: 600;
}

.streaming-compact-services {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.streaming-compact-link {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    background: var(--watchguide-widget-bg);
    border: 1px solid var(--watchguide-widget-border);
    border-radius: var(--watchguide-service-radius);
    text-decoration: none;
    transition: var(--watchguide-transition);
}

.streaming-compact-link:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.streaming-compact-link .service-icon {
    margin-right: 8px;
    width: 32px;
    height: 32px;
    font-size: 1em;
}

.compact-price {
    margin-left: 8px;
    font-weight: bold;
    color: #f57c00;
}

/* No Data State */
.no-streaming-available {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.no-streaming-available .icon {
    font-size: 3em;
    margin-bottom: 15px;
    opacity: 0.5;
}

.no-streaming-available h3 {
    margin: 15px 0;
    color: var(--watchguide-widget-text);
    font-size: 1.2em;
}

.no-streaming-available p {
    margin: 10px 0;
    color: #666;
}

.no-streaming-available small {
    display: block;
    margin-top: 15px;
    color: #999;
    font-size: 0.85em;
}

/* Error State */
.watchguide-streaming-widget.error {
    background: #fff3e0;
    border-color: #ffcc80;
}

.streaming-error {
    text-align: center;
    padding: 20px;
}

.streaming-error p {
    margin: 0;
    color: #e65100;
    font-weight: 600;
}

/* Footer */
.streaming-footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--watchguide-widget-border);
    font-size: 0.85em;
    color: #999;
    display: flex;
    justify-content: space-between;
}

.admin-stats {
    color: #666;
    font-style: italic;
}

/* Dark Mode Support für GeneratePress */
body.dark-mode .watchguide-streaming-widget {
    background: var(--base-3, #1a1a1a);
    border-color: var(--border, #333);
    color: var(--text, #e0e0e0);
}

body.dark-mode .streaming-header h3,
body.dark-mode .service-header strong {
    color: var(--text, #e0e0e0);
}

body.dark-mode .service-card {
    background: var(--base-2, #2a2a2a);
    border-color: var(--border, #444);
}

body.dark-mode .streaming-link {
    background: var(--accent, #4a90e2);
}

body.dark-mode .streaming-link:hover {
    background: var(--accent-hover, #357abd);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.watchguide-streaming-widget {
    animation: fadeIn 0.5s ease-out;
}

/* Accessibility */
.streaming-link:focus,
.streaming-compact-link:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .watchguide-streaming-widget {
        border: 1px solid #000;
        box-shadow: none;
    }
    
    .streaming-link {
        text-decoration: underline;
    }
}

/* Loading State */
.watchguide-streaming-widget.loading {
    position: relative;
    min-height: 200px;
}

.watchguide-streaming-widget.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid var(--watchguide-widget-border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Dateiname: frontend.css */
/* Pfad: /wp-content/plugins/watchguide-streaming/assets/css/frontend.css */