/* Estilos para la página de demo */

.demo-section {
    padding: 60px 0;
    background-color: #f9f9f9;
}

.demo-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Estilos del chat */
.chat-container {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    height: 600px;
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.message {
    display: flex;
    margin-bottom: 20px;
    animation: fadeIn 0.3s ease-in-out;
}

.user-message {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 10px;
    flex-shrink: 0;
}

.message-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-message .message-avatar {
    background-color: #10a37f;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

.message-content {
    max-width: 80%;
    padding: 15px;
    border-radius: 18px;
}

.ai-message .message-content {
    background-color: #f0f0f0;
    border-top-left-radius: 4px;
}

.user-message .message-content {
    background-color: #10a37f;
    color: white;
    border-top-right-radius: 4px;
}

.message-content p {
    margin: 0;
    line-height: 1.5;
}

.chat-input {
    display: flex;
    padding: 15px;
    border-top: 1px solid #eee;
    background-color: #fff;
    position: relative;
}

.chat-input textarea {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 12px 15px;
    resize: none;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    outline: none;
    max-height: 120px;
    transition: border-color 0.3s;
}

.chat-input textarea:focus {
    border-color: #10a37f;
}

.send-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: #10a37f;
    color: white;
    border: none;
    margin-left: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s, transform 0.2s;
}

.send-btn:hover {
    background-color: #0d8c6d;
    transform: scale(1.05);
}

.send-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
}

.message-counter {
    text-align: center;
    padding: 10px;
    background-color: #f9f9f9;
    color: #666;
    font-size: 14px;
    border-top: 1px solid #eee;
}

.message-counter span {
    font-weight: bold;
    color: #10a37f;
}

/* Estilos para la información de demo */
.demo-info {
    background-color: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.demo-info h3 {
    color: #10a37f;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.demo-info p {
    color: #555;
    line-height: 1.6;
    margin-bottom: 20px;
}

.demo-features {
    margin-top: 30px;
}

.demo-features h4 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: #333;
}

.demo-features ul {
    list-style: none;
    padding: 0;
}

.demo-features li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.demo-features i {
    color: #10a37f;
    margin-right: 10px;
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.typing-indicator {
    display: flex;
    padding: 15px;
    background-color: #f0f0f0;
    border-radius: 18px;
    margin-left: 60px;
    width: fit-content;
    margin-bottom: 20px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background-color: #777;
    border-radius: 50%;
    margin: 0 3px;
    animation: typingAnimation 1.5s infinite ease-in-out;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingAnimation {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* Responsive */
@media (max-width: 992px) {
    .demo-container {
        grid-template-columns: 1fr;
    }
    
    .chat-container {
        height: 500px;
    }
}

@media (max-width: 576px) {
    .demo-section {
        padding: 40px 0;
    }
    
    .chat-container {
        height: 400px;
    }
    
    .message-content {
        max-width: 90%;
    }
}
