/* Translation Chat Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Login Form Styles */
.login-form {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

.login-form h1 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    text-align: center;
}

.login-form p {
    color: #7f8c8d;
    text-align: center;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #555;
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #3498db;
}

.btn-primary {
    width: 100%;
    padding: 0.75rem;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-secondary {
    padding: 0.5rem 1rem;
    background-color: #95a5a6;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.error-message {
    color: #e74c3c;
    text-align: center;
    margin-top: 1rem;
    font-size: 0.875rem;
}

/* Chat Interface Styles */
.chat-interface {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100vh;
    background: white;
}

.chat-header {
    background-color: #2c3e50;
    color: white;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.chat-header h2 {
    font-size: 1.25rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.chat-body {
    display: flex;
    flex-direction: row;
    flex: 1;
    height: calc(100vh - 60px); /* Subtract header height */
}

.chat-users {
    width: 250px;
    background-color: #ecf0f1;
    padding: 1rem;
    border-right: 1px solid #ddd;
    overflow-y: auto;
}

.chat-users h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1rem;
}

#usersList {
    list-style: none;
}

#usersList li {
    padding: 0.5rem;
    margin-bottom: 0.25rem;
    border-radius: 4px;
    font-size: 0.875rem;
}

#usersList li.current-user {
    background-color: #3498db;
    color: white;
    font-weight: 500;
}

.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.messages-container {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    background-color: #fafafa;
}

.message {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    max-width: 70%;
}

.message.own-message {
    margin-left: auto;
    background-color: #e3f2fd;
}

.message-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.sender {
    font-weight: 600;
    color: #2c3e50;
}

.language-indicator {
    font-size: 1rem;
}

.timestamp {
    color: #7f8c8d;
    margin-left: auto;
}

.message-content {
    margin-bottom: 0.5rem;
}

.message-text {
    color: #333;
    word-wrap: break-word;
}

.original-text {
    color: #7f8c8d;
    font-size: 0.875rem;
    font-style: italic;
    margin-top: 0.5rem;
}

.message-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-tts {
    padding: 0.25rem 0.75rem;
    background-color: #27ae60;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-tts:hover:not(:disabled) {
    background-color: #229954;
}

.btn-tts:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.system-message {
    text-align: center;
    color: #7f8c8d;
    font-style: italic;
    font-size: 0.875rem;
    margin: 1rem 0;
    padding: 0.5rem;
}

.message-form {
    display: flex;
    padding: 1rem;
    background-color: white;
    border-top: 1px solid #ddd;
    gap: 0.5rem;
}

#messageInput {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

#messageInput:focus {
    outline: none;
    border-color: #3498db;
}

.btn-send {
    padding: 0.75rem 1.5rem;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-send:hover {
    background-color: #2980b9;
}

/* Responsive Design */
@media (max-width: 768px) {
    .chat-users {
        display: none;
    }

    .message {
        max-width: 85%;
    }

    .chat-header h2 {
        font-size: 1rem;
    }

    .user-info {
        font-size: 0.875rem;
    }
}
