/**
 * Seaside Punta Cana - Chatbot Styles
 */

/* Chatbot Container */
.chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: flex-end;
}

/* WhatsApp Button */
.whatsapp-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #25D366;
    border: none;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: white;
    font-size: 32px;
    text-decoration: none;
}

.whatsapp-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
    color: white;
}

.whatsapp-btn i {
    line-height: 60px;
}

/* Chat Button */
.chatbot-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0066cc 0%, #00b894 100%);
    border: none;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.chatbot-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 102, 204, 0.6);
}

.chatbot-button svg {
    width: 28px;
    height: 28px;
    fill: white;
}

.chatbot-button img {
    width: 38px;
    height: 38px;
    object-fit: contain;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(0, 102, 204, 0.4);
    }
    50% {
        box-shadow: 0 4px 20px rgba(0, 102, 204, 0.8);
    }
}

/* Chat Window */
.chatbot-window {
    display: none;
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 380px;
    height: 550px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

.chatbot-window.active {
    display: flex;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Chat Header */
.chatbot-header {
    background: linear-gradient(135deg, #0066cc 0%, #00b894 100%);
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chatbot-header-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chatbot-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    overflow: hidden;
    padding: 2px;
}

.chatbot-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.chatbot-title h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.chatbot-title p {
    margin: 2px 0 0 0;
    font-size: 12px;
    opacity: 0.9;
}

.chatbot-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.chatbot-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Chat Messages */
.chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f8f9fa;
    scroll-behavior: smooth;
}

.chatbot-message {
    margin-bottom: 15px;
    display: flex;
    gap: 10px;
    animation: fadeIn 0.3s ease;
}

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

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

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: white;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    overflow: hidden;
    padding: 2px;
    border: 2px solid #0066cc;
}

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

.chatbot-message.user .message-avatar {
    background: #00b894;
    border-color: #00b894;
}

.message-content {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 15px;
    line-height: 1.5;
    font-size: 14px;
}

.chatbot-message.bot .message-content {
    background: white;
    color: #333;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.chatbot-message.user .message-content {
    background: linear-gradient(135deg, #0066cc 0%, #00b894 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

/* Typing Indicator */
.typing-indicator {
    display: none;
    padding: 12px 16px;
    background: white;
    border-radius: 15px;
    border-bottom-left-radius: 4px;
    width: fit-content;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.typing-indicator.active {
    display: block;
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #0066cc;
    animation: typing 1.4s infinite;
}

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

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

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.3;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Suggestions */
.chatbot-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    padding: 0 10px;
}

.suggestion-btn {
    background: white;
    border: 1px solid #e0e0e0;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
    color: #0066cc;
}

.suggestion-btn:hover {
    background: #0066cc;
    color: white;
    border-color: #0066cc;
}

/* Chat Input */
.chatbot-input-container {
    padding: 15px;
    background: white;
    border-top: 1px solid #e0e0e0;
}

.chatbot-input-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
}

.chatbot-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

.chatbot-input:focus {
    border-color: #0066cc;
}

.chatbot-send {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0066cc 0%, #00b894 100%);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s;
}

.chatbot-send:hover {
    transform: scale(1.1);
}

.chatbot-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.chatbot-send svg {
    width: 20px;
    height: 20px;
    fill: white;
}

/* Welcome Message */
.welcome-message {
    text-align: center;
    padding: 20px;
    color: #666;
}

.welcome-message h4 {
    color: #0066cc;
    margin-bottom: 10px;
}

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

.chatbot-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: #0066cc;
    border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: #005bb5;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .chatbot-window {
        width: calc(100vw - 20px);
        right: 10px;
        bottom: 150px;
        height: calc(100vh - 170px);
        max-height: 600px;
    }
    
    .chatbot-button,
    .whatsapp-btn {
        width: 55px;
        height: 55px;
    }
    
    .whatsapp-btn {
        font-size: 28px;
    }
    
    .chatbot-container {
        right: 10px;
        bottom: 10px;
        gap: 12px;
    }
}

/* Markdown Formatting in Messages */
.message-content strong {
    font-weight: 600;
    color: #0066cc;
}

.message-content em {
    font-style: italic;
}

.message-content ul, .message-content ol {
    margin: 10px 0;
    padding-left: 20px;
}

.message-content li {
    margin: 5px 0;
}

/* Links in bot messages */
.message-content a {
    color: #0066cc;
    text-decoration: underline;
}

.chatbot-message.bot .message-content a:hover {
    color: #00b894;
}
