/* Chatbot Styles - No external dependencies */
:root {
    --primary: #1a6d38;
    --primary-dark: #0d4d24;
    --secondary: #f8f9fa;
    --accent: #ff7e00;
    --text: #333;
    --light-text: #6c757d;
    --border: #e0e0e0;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

#chat-icon {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 70px;
    height: 70px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    color: white;
    font-size: 1.8rem;
    z-index: 1000;
    border: none;
}

#chat-icon:hover {
    transform: scale(1.1);
    background: var(--primary-dark);
}

.chat-notification {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

#chat-box {
    position: fixed;
    bottom: 120px;
    right: 30px;
    width: 380px;
    height: 500px;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: none;
    flex-direction: column;
    z-index: 1000;
    border: 1px solid var(--border);
}

#chat-header {
    background: var(--primary);
    color: white;
    padding: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    font-size: 1.1rem;
    border-top-left-radius: var(--radius);
    border-top-right-radius: var(--radius);
}

.agent-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.agent-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: bold;
}

.agent-status {
    display: flex;
    align-items: center;
    font-size: 0.8rem;
    opacity: 0.9;
    margin-top: 3px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4ade80;
    margin-right: 6px;
}

#chat-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: background 0.2s;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#chat-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

#chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: var(--secondary);
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 340px;
    min-height: 340px;
}

/* Custom scrollbar for chat messages */
#chat-messages::-webkit-scrollbar {
    width: 6px;
}

#chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

#chat-messages::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

#chat-messages::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 18px;
    line-height: 1.5;
    word-break: break-word;
    box-shadow: 0 2px 8px rgba(44,62,80,0.04);
    position: relative;
}

.message.bot {
    align-self: flex-start;
    background: white;
    color: var(--text);
    border-bottom-left-radius: 5px;
}

.message.user {
    align-self: flex-end;
    background: var(--primary);
    color: white;
    border-bottom-right-radius: 5px;
}

.message-time {
    font-size: 0.7rem;
    opacity: 0.7;
    margin-top: 5px;
    text-align: right;
}

.typing-indicator {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 12px 16px;
    background: white;
    border-radius: 18px;
    border-top-left-radius: 5px;
    width: fit-content;
    box-shadow: 0 2px 8px rgba(44,62,80,0.04);
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--light-text);
    animation: typing 1.4s infinite ease-in-out;
}

.dot:nth-child(1) { animation-delay: -0.32s; }
.dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing {
    0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

#chat-input {
    padding: 10px;
    border-top: 1px solid var(--border);
    background: white;
    display: flex;
    gap: 1px;
}

#userInput {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 25px;
    outline: none;
    transition: border 0.3s ease;
    font-size: 15px;
}

#userInput:focus {
    border-color: var(--primary);
}

#send-btn {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease;
    font-size: 1.2rem;
}

#send-btn:hover {
    background: var(--primary-dark);
}

.suggestion-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    margin-bottom: 15px;
}

.chip {
    background: white;
    border: 1px solid var(--border);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chip:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.email-form {
    background: white;
    padding: 15px;
    border-radius: 10px;
    margin-top: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.email-form h4 {
    margin-bottom: 10px;
    color: var(--primary);
    font-size: 1rem;
}

.email-input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 5px;
    margin-bottom: 10px;
    outline: none;
    font-size: 14px;
}

.email-input:focus {
    border-color: var(--primary);
}

.email-submit {
    background: var(--primary);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
    transition: background 0.3s ease;
    font-weight: 500;
}

.email-submit:hover {
    background: var(--primary-dark);
}

.booking-link {
    display: block;
    text-align: center;
    background: var(--accent);
    color: white;
    padding: 10px;
    border-radius: 5px;
    text-decoration: none;
    margin-top: 10px;
    font-weight: 500;
    transition: background 0.3s ease;
}

.booking-link:hover {
    background: #e67300;
}

@media (max-width: 500px) {
    #chat-box {
        width: calc(100vw - 40px);
        right: 20px;
        bottom: 100px;
        height: 450px;
    }
    
    #chat-icon {
        right: 20px;
        bottom: 20px;
    }
    
    #chat-messages {
        max-height: 300px;
        min-height: 300px;
    }
}
/* Opposite of your mobile view */
@media (min-width: 501px) {
    #chat-box {
        width: 350px;
        right: 30px;
        bottom: 120px;
        height: 500px;
    }

    #chat-icon {
        right: 30px;
        bottom: 30px;
    }

    #chat-messages {
        max-height: 380px;
        min-height: 380px;
    }
}
