/* SDK Demo Page Styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.header {
    background: #4a90e2;
    color: white;
    padding: 20px;
    text-align: center;
}

.header h1 {
    margin: 0;
    font-size: 1.8rem;
}

.content {
    padding: 20px;
}

.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
    align-items: end;
}

.input-field {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 200px;
}

.input-field label {
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}

input[type="text"] {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

button {
    padding: 8px 16px;
    background: #4a90e2;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

button:hover {
    background: #357abd;
}

.status {
    padding: 10px;
    margin: 10px 0;
    border-radius: 4px;
}

.connected {
    background: #d4edda;
    color: #155724;
}

.disconnected {
    background: #f8d7da;
    color: #721c24;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.section {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
}

.section h2 {
    margin: 0 0 15px 0;
    font-size: 1.2rem;
}

.video-container {
    width: 100%;
    height: 300px;
    background: #000;
    position: relative;
    border-radius: 4px;
    overflow: hidden;
}

#videoElement {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

#videoOverlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.8);
    color: white;
    text-align: center;
}

.topic-list {
    border: 1px solid #ddd;
    border-radius: 4px;
    max-height: 450px;
    overflow-y: auto;
}

.topic-item {
    padding: 8px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

.topic-item:hover {
    background: #f5f5f5;
}

.messages {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    max-height: 200px;
    overflow-y: auto;
    font-family: monospace;
    font-size: 12px;
    white-space: pre-wrap;
}

.publisher-section {
    grid-column: 1 / -1;
}

.ws-url-container {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 15px;
    word-break: break-all;
}

.ws-url-container strong {
    display: block;
    margin-bottom: 5px;
}

.ws-url {
    font-family: monospace;
    font-size: 12px;
    color: #495057;
}

/* Video status styles */
.video-status-connected {
    background: #d4edda !important;
    color: #155724 !important;
}

.video-status-connecting {
    background: #fff3cd !important;
    color: #856404 !important;
}

.video-status-failed {
    background: #f8d7da !important;
    color: #721c24 !important;
}

.video-status-ready {
    background: #f5f5f5 !important;
    color: #333 !important;
}

.video-status-error {
    background: #f8d7da !important;
    color: #721c24 !important;
}

.video-status-progress {
    background: #fff3cd !important;
    color: #856404 !important;
}

.video-status-detected {
    background: #d1ecf1 !important;
    color: #0c5460 !important;
}

/* Message display styles */
.message-image {
    max-width: 100%;
}

.message-error {
    color: #a94442;
}

/* Help popup styles */
.help-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border: 1px solid rgba(0, 170, 255, 0.3);
    border-radius: 8px;
    padding: 1.5rem;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    z-index: 1000;
    display: none;
}

.help-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    display: none;
}

@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .help-popup {
        max-width: 90vw;
        padding: 1rem;
    }
} 