/**
 * Stream Presence Controller - Styles
 */

/* Base container styles */
.stream-presence-container {
    margin: 20px 0;
    clear: both;
}

/* Responsive embed container */
.stream-presence-responsive {
    position: relative;
    width: 100%;
    height: 0;
    overflow: hidden;
}

.stream-presence-responsive .stream-presence-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Standard display mode (16:9) */
.stream-presence-standard {
    max-width: 854px;
    margin-left: auto;
    margin-right: auto;
}

/* Compact display mode */
.stream-presence-compact {
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

.stream-presence-compact .stream-presence-responsive {
    padding-bottom: 56.25%; /* 16:9 */
}

/* Theater display mode */
.stream-presence-theater {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
}

.stream-presence-theater .stream-presence-responsive {
    padding-bottom: 42.86%; /* 21:9 */
}

/* Full width display mode */
.stream-presence-fullwidth {
    width: 100%;
    max-width: 100%;
}

/* Fixed size iframe */
.stream-presence-iframe {
    display: block;
    border: 0;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Offline/Fallback states */
.stream-presence-offline {
    background: #f5f5f5;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    margin: 20px 0;
    max-width: 854px;
    margin-left: auto;
    margin-right: auto;
}

.stream-presence-offline p {
    margin: 0;
    font-size: 16px;
    color: #666;
}

/* Placeholder state */
.stream-presence-placeholder {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    padding: 60px 20px;
    text-align: center;
    margin: 20px 0;
    max-width: 854px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    overflow: hidden;
}

.stream-presence-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.1);
}

.stream-presence-placeholder-content {
    position: relative;
    z-index: 1;
    color: white;
}

.stream-presence-placeholder svg {
    opacity: 0.8;
    margin-bottom: 15px;
}

.stream-presence-placeholder p {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
}

/* Admin notice */
.stream-presence-notice {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    padding: 15px;
    margin: 20px 0;
    color: #856404;
}

.stream-presence-notice a {
    color: #533f03;
    text-decoration: underline;
    font-weight: 500;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .stream-presence-container {
        margin: 15px 0;
    }

    .stream-presence-offline,
    .stream-presence-placeholder {
        padding: 30px 15px;
        margin: 15px 0;
    }

    .stream-presence-theater {
        max-width: 100%;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .stream-presence-offline {
        background: #2a2a2a;
        border-color: #444;
    }

    .stream-presence-offline p {
        color: #ccc;
    }

    .stream-presence-notice {
        background: #3d3d1a;
        border-color: #665c00;
        color: #ffeb3b;
    }

    .stream-presence-notice a {
        color: #fff59d;
    }
}

/* Loading state animation */
.stream-presence-loading {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: stream-presence-spin 1s linear infinite;
}

@keyframes stream-presence-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
