/* --- ESTILOS PARA EL WEBCHAT --- */
.chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1001;
}
.chat-toggle {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    color: white;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.chat-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 40px rgba(0, 212, 255, 0.5);
}
.chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 700px; 
    max-width: 90vw;
    height: 650px;
    max-height: 90vh;
    background: #111;
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 15px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease-in-out;
}
.chat-window.active {
    transform: scale(1);
}
.chat-header {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    color: #00d4ff;
    font-weight: bold;
    border-bottom: 1px solid rgba(0, 212, 255, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.chat-header-content {
    display: flex;
    align-items: center;
    gap: 10px;
}
.chat-header-logo {
    height: 30px;
    width: auto;
    border-radius: 50%;
}
.chat-close {
    background: none;
    border: none;
    color: #ccc;
    font-size: 20px;
    cursor: pointer;
}
.chat-messages {
    flex-grow: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.chat-message {
    padding: 0.7rem 1rem;
    border-radius: 15px;
    max-width: 80%;
    line-height: 1.4;
    word-wrap: break-word; 
}
.bot-message a { 
    color: #00d4ff;
    text-decoration: underline;
}
.user-message {
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    color: white;
    border-bottom-right-radius: 3px;
    align-self: flex-end;
}
.bot-message {
    background: #222;
    color: #ccc;
    border-bottom-left-radius: 3px;
    align-self: flex-start;
}
.chat-input-form {
    display: flex;
    padding: 1rem;
    border-top: 1px solid rgba(0, 212, 255, 0.2);
}
.chat-input {
    flex-grow: 1;
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 20px;
    color: #fff;
    margin-right: 10px;
}
.chat-input:focus {
    outline: none;
    border-color: rgba(0, 212, 255, 0.7);
}
.chat-send-btn {
    background: none;
    border: none;
    color: #00d4ff;
    font-size: 24px;
    cursor: pointer;
    transition: color 0.3s;
}
.chat-send-btn:hover {
    color: #fff;
}
.typing-indicator span {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #555;
    animation: typing 1s infinite;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-5px); }
}