/* Chat & Stream Generator Styles - Mobile First, Responsive */

.csg-chat-wrapper {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    padding: 10px;
    margin: 10px 0;
}

.csg-username-prompt {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.csg-username-prompt input {
    flex: 1;
    min-width: 150px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
}

.csg-username-prompt button, .csg-input-area button {
    padding: 10px 16px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.csg-chat-container {
    display: flex;
    flex-direction: column;
    height: 400px;
    max-height: 70vh;
}

.csg-messages {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    background: rgba(0,0,0,0.02);
    border-radius: 4px;
    margin-bottom: 10px;
}

.csg-message {
    margin-bottom: 8px;
    padding: 8px 12px;
    border-radius: 12px;
    background: var(--msg-bg, #f0f0f0);
    color: var(--msg-text, #333);
    word-wrap: break-word;
    max-width: 85%;
}

.csg-message.admin-view .csg-ban-btn {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 6px;
    background: #dc3232;
    color: #fff;
    border: none;
    border-radius: 3px;
    font-size: 12px;
    cursor: pointer;
}

.csg-input-area {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.csg-emoji-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.csg-emoji-btn {
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 18px;
}

.csg-input-area textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    resize: vertical;
    font-size: 16px;
    box-sizing: border-box;
}

.csg-input-area button#csg-send-btn {
    align-self: flex-end;
}

/* Stream */
.csg-stream-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 10px 0;
    box-sizing: border-box;
}

.csg-stream-video, .csg-stream-iframe {
    display: block;
    width: 100%;
    height: 100%;
}

/* Responsive */
@media (max-width: 600px) {
    .csg-chat-container {
        height: 300px;
    }
    .csg-message {
        max-width: 95%;
    }
    .csg-username-prompt {
        flex-direction: column;
    }
}
