/* features/support/support-styles.css */

/* Estilos para el chat de soporte */
.support-chat-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 600px;
}

.support-chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #1976D2;
    color: white;
    border-radius: 8px 8px 0 0;
}

.support-chat-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9em;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4CAF50;
    animation: pulse 2s infinite;
}

.status-indicator.offline {
    background: #f44336;
    animation: none;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.support-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background: #f8f9fa;
    border-left: 1px solid #dee2e6;
    border-right: 1px solid #dee2e6;
}

.message {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
}

.message.user {
    align-items: flex-end;
}

.message.support {
    align-items: flex-start;
}

.message-content {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 18px;
    word-wrap: break-word;
    position: relative;
}

.message.user .message-content {
    background: #1976D2;
    color: white;
    border-bottom-right-radius: 4px;
}

.message.support .message-content {
    background: white;
    color: #333;
    border: 1px solid #dee2e6;
    border-bottom-left-radius: 4px;
}

.message-time {
    font-size: 0.75em;
    color: #666;
    margin-top: 4px;
    padding: 0 8px;
}

.message.user .message-time {
    text-align: right;
}

.message.support .message-time {
    text-align: left;
}

.support-chat-input {
    display: flex;
    padding: 15px;
    background: white;
    border-top: 1px solid #dee2e6;
    border-radius: 0 0 8px 8px;
    gap: 10px;
}

.support-chat-input input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #dee2e6;
    border-radius: 24px;
    outline: none;
    font-size: 14px;
}

.support-chat-input input:focus {
    border-color: #1976D2;
    box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.2);
}

.support-chat-input button {
    background: #1976D2;
    color: white;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.support-chat-input button:hover {
    background: #1565C0;
}

.support-chat-input button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Lista de chats */
.chat-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chat-item:hover {
    border-color: #1976D2;
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.1);
}

.chat-item.active {
    border-color: #1976D2;
    background: #e3f2fd;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #1976D2;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-weight: bold;
}

.chat-info {
    flex: 1;
}

.chat-title {
    font-weight: bold;
    color: #333;
    margin-bottom: 4px;
}

.chat-preview {
    font-size: 0.9em;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.chat-time {
    font-size: 0.8em;
    color: #999;
}

.chat-unread {
    background: #f44336;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8em;
    font-weight: bold;
}

/* Formulario de nuevo chat */
.new-chat-form {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    margin-bottom: 20px;
}

.new-chat-form h4 {
    margin: 0 0 15px 0;
    color: #333;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1976D2;
    box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.2);
}

/* Indicadores de estado */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    color: #666;
    font-style: italic;
    font-size: 0.9em;
}

.typing-dots {
    display: flex;
    gap: 2px;
}

.typing-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #666;
    animation: typing 1.4s infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-10px);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .support-chat-container {
        max-height: 500px;
    }
    
    .message-content {
        max-width: 85%;
    }
    
    .support-chat-input {
        padding: 10px;
    }
    
    .support-chat-input input {
        font-size: 16px; /* Evitar zoom en iOS */
    }
}
