/* General Body & Typography */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f4f7f6;
    color: #333;
    margin: 0;
    line-height: 1.6;
}

.homepage-content {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

h1 {
    color: #005f73;
}

ul {
    background-color: #e9f5f9;
    border-left: 4px solid #00a896;
    padding: 1rem 1rem 1rem 2rem;
    border-radius: 4px;
}

/* Chatbot Toggler Button */
#chatbot-toggler {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 60px;
    height: 60px;
    background-color: #00a896;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease-in-out, background-color 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#chatbot-toggler:hover {
    transform: scale(1.1);
    background-color: #007a76;
}

#chatbot-toggler svg {
    width: 32px;
    height: 32px;
    transition: opacity 0.2s, transform 0.2s;
}

#chatbot-toggler .close-icon {
    display: none;
}

/* Chatbot Container */
#chatbot-container {
    position: fixed;
    bottom: 100px;
    right: 25px;
    width: 370px;
    max-width: 90vw;
    height: 70vh;
    max-height: 600px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 999;
}

#chatbot-container:not(.hidden) {
    opacity: 1;
    transform: translateY(0);
}

.chatbot-header {
    background: #005f73;
    color: white;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.chatbot-header h2 {
    margin: 0;
    font-size: 1.2rem;
}

.chatbot-header p {
    margin: 0;
    font-size: 0.8rem;
    opacity: 0.9;
}

.chatbot-messages {
    flex-grow: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Chat Messages */
.message {
    padding: 0.75rem 1rem;
    border-radius: 18px;
    max-width: 80%;
    line-height: 1.4;
}

.user-message {
    background: #00a896;
    color: white;
    border-bottom-right-radius: 4px;
    align-self: flex-end;
}

.bot-message {
    background: #e9ecef;
    color: #333;
    border-bottom-left-radius: 4px;
    align-self: flex-start;
}

.bot-message.loading {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bot-message.loading span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #adb5bd;
  animation: bounce 1.4s infinite ease-in-out both;
}
.bot-message.loading span:nth-child(1) { animation-delay: -0.32s; }
.bot-message.loading span:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1.0); }
}

/* Chat Input */
.chatbot-input {
    display: flex;
    padding: 1rem;
    border-top: 1px solid #eee;
}

#user-input {
    flex-grow: 1;
    border: 1px solid #ccc;
    border-radius: 20px;
    padding: 0.75rem;
    font-size: 1rem;
    margin-right: 0.5rem;
}

.chatbot-input button {
    background: #007bff;
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.chatbot-input button:hover {
    background: #0056b3;
}

.hidden {
    display: none !important;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    #chatbot-container {
        width: 100%;
        height: 100%;
        max-height: 100%;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        border-radius: 0;
    }
    #chatbot-toggler {
        bottom: 15px;
        right: 15px;
    }
}
