/* WebSocket Tester Styles */

/* Status Container */
.ws-status-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 0.75rem 1rem;
}

[data-bs-theme="dark"] .ws-status-container {
    background-color: #212529;
    border-color: #495057;
}

/* Status Indicator */
.ws-status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
    animation: pulse 2s infinite;
}

.ws-status-disconnected {
    background-color: #6c757d;
    animation: none;
}

.ws-status-connecting {
    background-color: #ffc107;
}

.ws-status-connected {
    background-color: #198754;
}

.ws-status-error {
    background-color: #dc3545;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.ws-status-text {
    font-weight: 600;
    font-size: 0.95rem;
}

/* Message History */
.ws-message-history {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 1rem;
    max-height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

[data-bs-theme="dark"] .ws-message-history {
    background-color: #212529;
    border-color: #495057;
}

/* Individual Message */
.ws-message {
    padding: 0.75rem;
    border-radius: 0.375rem;
    border-left: 4px solid;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ws-message-sent {
    background-color: #d1e7dd;
    border-left-color: #198754;
}

.ws-message-received {
    background-color: #cfe2ff;
    border-left-color: #0d6efd;
}

.ws-message-system {
    background-color: #f8d7da;
    border-left-color: #dc3545;
}

[data-bs-theme="dark"] .ws-message-sent {
    background-color: #0a3622;
    border-left-color: #51cf66;
    color: #d1e7dd;
}

[data-bs-theme="dark"] .ws-message-received {
    background-color: #031633;
    border-left-color: #6ea8fe;
    color: #cfe2ff;
}

[data-bs-theme="dark"] .ws-message-system {
    background-color: #2c0b0e;
    border-left-color: #ea868f;
    color: #f8d7da;
}

.ws-message-time {
    font-size: 0.75rem;
    color: #6c757d;
    font-family: 'Courier New', Courier, monospace;
}

.ws-message-type {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ws-message-sent .ws-message-type {
    color: #0f5132;
}

.ws-message-received .ws-message-type {
    color: #084298;
}

.ws-message-system .ws-message-type {
    color: #842029;
}

[data-bs-theme="dark"] .ws-message-sent .ws-message-type {
    color: #75b798;
}

[data-bs-theme="dark"] .ws-message-received .ws-message-type {
    color: #6ea8fe;
}

[data-bs-theme="dark"] .ws-message-system .ws-message-type {
    color: #ea868f;
}

.ws-message-content {
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    white-space: pre-wrap;
    word-break: break-word;
}
