.chat-bubble {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 10002;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.chat-bubble:hover {
    transform: scale(1.05);
}

.chat-image {
    width: 100px;
    height: auto;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: opacity 0.3s ease;
}

.chat-text {
    color: #1556A4;
    font-weight: 600;
    font-size: 16px;
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.95);
    padding: 8px 16px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    font-family: 'Open Sans', sans-serif;
    letter-spacing: 0.3px;
    transition: opacity 0.3s ease;
    border: 2px solid #1556A4;
}

.chat-window {
    position: fixed;
    bottom: 140px;
    right: 30px;
    width: 350px;
    height: 450px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    display: none;
    flex-direction: column;
    z-index: 10001;
    overflow: hidden;
    border: 2px solid #4ECDC4;
}

.chat-header {
    background: linear-gradient(135deg, #4ECDC4, #44A08D);
    color: white;
    padding: 15px 20px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
}

.chat-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.chat-close:hover {
    background-color: rgba(255,255,255,0.2);
}

.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background-color: #f8f9fa;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-message {
    padding: 12px 16px;
    border-radius: 18px;
    max-width: 85%;
    word-wrap: break-word;
    font-size: 14px;
    line-height: 1.4;
}

.user-message {
    background: linear-gradient(135deg, #4ECDC4, #44A08D);
    color: white;
    align-self: flex-end;
    margin-left: auto;
}

.bot-message {
    background: white;
    color: #333;
    align-self: flex-start;
    border: 1px solid #e0e0e0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.chat-input {
    display: flex;
    padding: 15px;
    border-top: 1px solid #e0e0e0;
    background: white;
    gap: 10px;
    align-items: center;
}

.chat-input input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: #f8f9fa;
}

.chat-input input:focus {
    border-color: #4ECDC4;
    box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.1);
    background: white;
}

.chat-input input::placeholder {
    color: #999;
}

.chat-input button {
    padding: 12px 20px;
    background: linear-gradient(135deg, #4ECDC4, #44A08D);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: transform 0.2s ease, box-shadow 0.3s ease;
    min-width: 80px;
    position: relative;
    z-index: 1;
}

.chat-input button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(78, 205, 196, 0.3);
}

.chat-input button:active {
    transform: translateY(0);
}

/* Media queries para móviles */
@media (max-width: 768px) {
    .chat-window {
        width: calc(100vw - 40px);
        max-width: 380px;
        right: 20px;
        bottom: 120px;
        height: 400px;
    }
    
    .chat-bubble {
        bottom: 25px;
        right: 25px;
    }
    
    .chat-image {
        width: 85px;
    }
    
    .chat-text {
        font-size: 15px;
        padding: 6px 12px;
    }
}

@media (max-width: 480px) {
    .chat-window {
        width: calc(100vw - 20px);
        right: 10px;
        left: 10px;
        bottom: 100px;
        height: 350px;
    }
    
    .chat-bubble {
        bottom: 20px;
        right: 20px;
        transform: scale(0.9);
    }
    
    .chat-image {
        width: 70px;
    }
    
    .chat-text {
        font-size: 13px;
        padding: 5px 10px;
    }
    
    .chat-input {
        padding: 12px;
    }
    
    .chat-input input {
        padding: 10px 14px;
        font-size: 16px; /* Prevenir zoom en iOS */
    }
    
    .chat-input button {
        padding: 10px 16px;
        min-width: 70px;
        font-size: 13px;
    }
}

/* Scrollbar personalizado */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #4ECDC4;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #44A08D;
}