/* Floating Chat Button Styles */
.chat-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #00a2ff 0%, #0066cc 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 1000;
    animation: pulse 2s infinite;
}

.chat-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.chat-icon {
    color: white;
    font-size: 24px;
}

/* Chat Window Styles */
.chat-window {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 320px;
    height: 450px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    z-index: 999;
    overflow: hidden;
}

.chat-window.active {
    display: flex;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.chat-header {
    background: linear-gradient(135deg, #00a2ff 0%, #0066cc 100%);
    padding: 15px;
    color: white;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 20px 20px 0 0;
    font-size: 14px;
}

.chat-close {
    cursor: pointer;
    font-size: 20px;
    transition: all 0.3s ease;
}

.chat-close:hover {
    transform: scale(1.2);
}

.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #f8f9fa;
}

.message {
    margin-bottom: 12px;
    max-width: 85%;
    position: relative;
    clear: both;
    font-size: 13px;
    line-height: 1.5;
    white-space: pre-line;
}

.message.user {
    float: right;
    background: #e3f2fd;
    color: #0066cc;
    padding: 10px 12px;
    border-radius: 15px 15px 0 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.message.bot {
    float: left;
    background: white;
    color: #333;
    padding: 10px 12px;
    border-radius: 15px 15px 15px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* Typing Animation */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    background: white;
    border-radius: 15px 15px 15px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    margin-bottom: 12px;
    width: fit-content;
    float: left;
    clear: both;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: #90caf9;
    border-radius: 50%;
    animation: typingAnimation 1.4s infinite;
    opacity: 0.7;
}

.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(-4px); }
}

.chat-footer {
    padding: 10px;
    border-top: 1px solid #eee;
    background: white;
}

.chat-actions {
    display: flex;
    justify-content: flex-end;
    padding: 0 10px 5px;
}

.whatsapp-button {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #25D366;
    color: white;
    padding: 6px 10px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.whatsapp-button:hover {
    transform: translateY(-1px);
    filter: brightness(1.1);
    color: white;
}

.whatsapp-button i {
    font-size: 14px;
}

.chat-input {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
}

.chat-input input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    outline: none;
    font-size: 13px;
    transition: all 0.3s ease;
}

.chat-input input:focus {
    border-color: #00a2ff;
    box-shadow: 0 0 0 2px rgba(0, 162, 255, 0.1);
}

.chat-input button {
    background: linear-gradient(135deg, #00a2ff 0%, #0066cc 100%);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.chat-input button:hover {
    transform: translateY(-1px);
    filter: brightness(1.1);
}

/* Animation for the chat button */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 162, 255, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(0, 162, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 162, 255, 0); }
}

/* Scrollbar Styling */
.chat-messages::-webkit-scrollbar {
    width: 4px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f8f9fa;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #90caf9;
    border-radius: 2px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #64b5f6;
}
