/* Hayleys Eco Chatbot - WordPress Plugin Styles */
/* High specificity to override WordPress theme styles */
#hayleys-eco-chatbot {
    font-family: 'Inter', sans-serif !important;
}

#hayleys-eco-chatbot * {
    box-sizing: border-box !important;
    font-family: 'Inter', sans-serif !important;
}

:root {
    --primary-color: #4CAF50;
    --secondary-color: #2E7D32;
    --accent-color: #66BB6A;
    --light-green: #81C784;
    --background-gradient: linear-gradient(135deg, #f1f8e9 0%, #e8f5e8 100%);
    --chat-width: 400px;
    --chat-height: 600px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background: var(--background-gradient);
    min-height: 100vh;
}

/* Page Content (Demo) */
.page-content {
    padding: 4rem 2rem;
    text-align: center;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.page-content h1 {
    color: var(--secondary-color);
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.page-content p {
    color: var(--primary-color);
    font-size: 1.2rem;
    max-width: 600px;
}

/* Floating Chat Button */
#hayleys-eco-chatbot .chat-toggle-btn {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    width: 60px !important;
    height: 60px !important;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color)) !important;
    border: none !important;
    border-radius: 50% !important;
    color: white !important;
    cursor: pointer !important;
    box-shadow: 0 4px 20px rgba(76, 175, 80, 0.3) !important;
    transition: all 0.3s ease !important;
    z-index: 1000 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-family: 'Inter', sans-serif !important;
}

#hayleys-eco-chatbot .chat-toggle-btn:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 6px 25px rgba(76, 175, 80, 0.4) !important;
}

#hayleys-eco-chatbot .chat-toggle-btn svg {
    width: 28px !important;
    height: 28px !important;
    transition: all 0.3s ease !important;
}

#hayleys-eco-chatbot .chat-toggle-btn.active {
    background: var(--secondary-color) !important;
}

/* Chat Modal */
#hayleys-eco-chatbot .chat-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 1001 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: all 0.3s ease !important;
    font-family: 'Inter', sans-serif !important;
}

#hayleys-eco-chatbot .chat-modal.active {
    opacity: 1 !important;
    visibility: visible !important;
}

#hayleys-eco-chatbot .modal-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.5) !important;
    backdrop-filter: blur(5px) !important;
}

/* Chat Container */
#hayleys-eco-chatbot .chat-container {
    position: absolute !important;
    bottom: 90px !important;
    right: 20px !important;
    width: var(--chat-width) !important;
    height: var(--chat-height) !important;
    background: rgba(255, 255, 255, 0.98) !important;
    border-radius: 1.5rem !important;
    box-shadow: 0 20px 50px rgba(76, 175, 80, 0.15) !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    border: 2px solid rgba(102, 187, 106, 0.2) !important;
    transform: translateY(20px) scale(0.95) !important;
    opacity: 0 !important;
    transition: all 0.3s ease !important;
    font-family: 'Inter', sans-serif !important;
}

#hayleys-eco-chatbot .chat-modal.active .chat-container {
    transform: translateY(0) scale(1) !important;
    opacity: 1 !important;
}

/* Header with Animated Avatar */
#hayleys-eco-chatbot .chat-header {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color)) !important;
    padding: 1.5rem !important;
    display: flex !important;
    align-items: center !important;
    gap: 1rem !important;
    position: relative !important;
    font-family: 'Inter', sans-serif !important;
}

#hayleys-eco-chatbot .close-chat-btn {
    position: absolute !important;
    top: 1rem !important;
    right: 1rem !important;
    background: rgba(255, 255, 255, 0.2) !important;
    border: none !important;
    border-radius: 50% !important;
    width: 32px !important;
    height: 32px !important;
    color: white !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
    font-family: 'Inter', sans-serif !important;
}

#hayleys-eco-chatbot .close-chat-btn:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    transform: scale(1.1) !important;
}

#hayleys-eco-chatbot .close-chat-btn svg {
    width: 18px !important;
    height: 18px !important;
}

#hayleys-eco-chatbot .ai-avatar {
    width: 50px !important;
    height: 50px !important;
    border-radius: 50% !important;
    background: radial-gradient(circle at 65% 35%, var(--light-green), var(--accent-color)) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    animation: avatar-pulse 2s infinite !important;
    box-shadow: 0 0 20px rgba(102, 187, 106, 0.4) !important;
}

@keyframes avatar-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

#hayleys-eco-chatbot .ai-avatar svg {
    width: 32px !important;
    height: 32px !important;
}

#hayleys-eco-chatbot .header-text h1 {
    color: white !important;
    font-size: 1.4rem !important;
    font-weight: 700 !important;
    margin: 0 !important;
    font-family: 'Inter', sans-serif !important;
}

#hayleys-eco-chatbot .header-text .status {
    color: var(--light-green) !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    margin: 0 !important;
    font-family: 'Inter', sans-serif !important;
}

/* Messages Area */
#hayleys-eco-chatbot .chat-messages {
    flex: 1 !important;
    padding: 1.5rem !important;
    overflow-y: auto !important;
    background: linear-gradient(180deg, #f8fdf8 0%, #f0f8f0 100%) !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important;
    font-family: 'Inter', sans-serif !important;
}

#hayleys-eco-chatbot .message {
    max-width: 80% !important;
    padding: 1rem !important;
    border-radius: 1.2rem !important;
    animation: message-appear 0.3s ease !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 0.95rem !important;
}

@keyframes message-appear {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

#hayleys-eco-chatbot .message.user {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color)) !important;
    color: white !important;
    align-self: flex-end !important;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.25) !important;
}

#hayleys-eco-chatbot .message.bot {
    background: white !important;
    color: var(--secondary-color) !important;
    align-self: flex-start !important;
    box-shadow: 0 4px 15px rgba(46, 125, 50, 0.1) !important;
    border-left: 4px solid var(--accent-color) !important;
}

#hayleys-eco-chatbot .message.system {
    background: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid var(--accent-color) !important;
    align-self: center !important;
    text-align: center !important;
    color: var(--primary-color) !important;
}

#hayleys-eco-chatbot .typing-indicator {
    display: inline-flex !important;
    gap: 0.3rem !important;
    margin-right: 0.5rem !important;
}

#hayleys-eco-chatbot .typing-indicator span {
    width: 6px !important;
    height: 6px !important;
    background: var(--accent-color) !important;
    border-radius: 50% !important;
    animation: typing 1.4s infinite !important;
}

#hayleys-eco-chatbot .typing-indicator span:nth-child(2) {
    animation-delay: 0.2s !important;
}

#hayleys-eco-chatbot .typing-indicator span:nth-child(3) {
    animation-delay: 0.4s !important;
}

@keyframes typing {
    0%, 80%, 100% { 
        transform: translateY(0);
        opacity: 0.5;
    }
    40% { 
        transform: translateY(-5px);
        opacity: 1;
    }
}

/* Input Area */
#hayleys-eco-chatbot .input-container {
    padding: 1.5rem !important;
    background: white !important;
    border-top: 1px solid rgba(102, 187, 106, 0.3) !important;
    font-family: 'Inter', sans-serif !important;
}

#hayleys-eco-chatbot .input-wrapper {
    position: relative !important;
    display: flex !important;
    gap: 0.5rem !important;
}

#hayleys-eco-chatbot #user-input {
    flex: 1 !important;
    padding: 0.8rem 1.2rem !important;
    border: 2px solid rgba(102, 187, 106, 0.3) !important;
    border-radius: 1rem !important;
    font-size: 0.95rem !important;
    transition: all 0.2s !important;
    background: rgba(248, 253, 248, 0.8) !important;
    font-family: 'Inter', sans-serif !important;
    line-height: 1.4 !important;
}

#hayleys-eco-chatbot #user-input:focus {
    outline: none !important;
    border-color: var(--accent-color) !important;
    box-shadow: 0 0 10px rgba(102, 187, 106, 0.2) !important;
    background: white !important;
}

#hayleys-eco-chatbot #user-input::placeholder {
    color: rgba(76, 175, 80, 0.6) !important;
    font-family: 'Inter', sans-serif !important;
}

#hayleys-eco-chatbot #send-button {
    width: 44px !important;
    height: 44px !important;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color)) !important;
    border: none !important;
    border-radius: 50% !important;
    color: white !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-family: 'Inter', sans-serif !important;
}

#hayleys-eco-chatbot #send-button:hover {
    transform: scale(1.05) !important;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3) !important;
}

#hayleys-eco-chatbot #send-button svg {
    width: 20px !important;
    height: 20px !important;
}

/* Message Content Formatting - Simple and clean like Nova bot */
#hayleys-eco-chatbot .message-content {
    line-height: 1.6 !important;
    font-size: 0.95rem !important;
    font-family: 'Inter', sans-serif !important;
}

#hayleys-eco-chatbot .message-content p {
    margin: 0 0 0.8rem 0 !important;
    font-size: 0.95rem !important;
    line-height: 1.5 !important;
    font-family: 'Inter', sans-serif !important;
}

#hayleys-eco-chatbot .message-content p:last-child {
    margin-bottom: 0 !important;
}

#hayleys-eco-chatbot .message-content ul {
    margin: 0.5rem 0 !important;
    padding-left: 1.2rem !important;
    font-size: 0.95rem !important;
}

#hayleys-eco-chatbot .message-content li {
    margin: 0.4rem 0 !important;
    line-height: 1.5 !important;
    font-size: 0.95rem !important;
}

#hayleys-eco-chatbot .message-content strong {
    font-weight: 600 !important;
}

#hayleys-eco-chatbot .message-content em {
    font-style: italic !important;
}

/* Remove any extra spacing from first/last elements */
#hayleys-eco-chatbot .message-content > *:first-child {
    margin-top: 0 !important;
}

#hayleys-eco-chatbot .message-content > *:last-child {
    margin-bottom: 0 !important;
}

/* Scrollbar */
#hayleys-eco-chatbot .chat-messages::-webkit-scrollbar {
    width: 6px !important;
}

#hayleys-eco-chatbot .chat-messages::-webkit-scrollbar-track {
    background: rgba(102, 187, 106, 0.1) !important;
    border-radius: 3px !important;
}

#hayleys-eco-chatbot .chat-messages::-webkit-scrollbar-thumb {
    background: var(--accent-color) !important;
    border-radius: 3px !important;
}

#hayleys-eco-chatbot .chat-messages::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color) !important;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    #hayleys-eco-chatbot .chat-container {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        border-radius: 0 !important;
        transform: translateY(100%) !important;
    }
    
    #hayleys-eco-chatbot .chat-modal.active .chat-container {
        transform: translateY(0) !important;
    }
    
    #hayleys-eco-chatbot .chat-toggle-btn {
        bottom: 20px !important;
        right: 20px !important;
    }
}

/* Eco-themed decorative elements */
#hayleys-eco-chatbot .chat-header::after {
    content: "" !important;
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    width: 100px !important;
    height: 100% !important;
    background: linear-gradient(45deg, transparent 30%, rgba(129, 199, 132, 0.1) 70%) !important;
    pointer-events: none !important;
}