/* Chatbot Widget Styles */

:root {
  --chat-primary: #25f47b;
  --chat-bg-dark: #102217;
  --chat-surface-dark: #111814;
  --chat-surface-lighter: #28392f;
  --chat-text-subtle: #9cbaa8;
  --chat-font-display: 'Space Grotesk', sans-serif;
  --chat-font-body: 'Noto Sans', sans-serif;
}

#ai-chat-widget-container {
    z-index: 9999;
    position: relative;
    font-family: var(--chat-font-body);
}

/* Floating Action Button */
.chat-fab {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1rem;
}

.chat-launcher {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 9999px;
    background-color: var(--chat-primary); /* Tailwind: bg-primary */
    color: var(--chat-bg-dark); /* text-background-dark */
    box-shadow: 0 0 15px rgba(37,244,123,0.3);
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    transform: scale(1);
}

.chat-launcher:hover {
    background-color: #1fe06e;
    box-shadow: 0 0 25px rgba(37,244,123,0.5);
}

.chat-launcher:active {
    transform: scale(0.95);
}

.chat-notification-dot {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    height: 1rem;
    width: 1rem;
    transform: translate(-2px, 2px);
}

/* Chat Window */
.chat-window {
    width: 380px;
    max-width: 90vw;
    display: flex;
    flex-direction: column;
    background-color: var(--chat-surface-dark);
    border-radius: 0.75rem; /* xl */
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid var(--chat-surface-lighter);
    overflow: hidden;
    transition: all 0.3s ease;
    transform-origin: bottom right;
}

.chat-window.hidden {
    display: none;
}

/* Header */
.chat-header {
    position: relative;
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-top: 5rem;
}

.chat-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
}

.chat-close-btn button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    background-color: rgba(0,0,0,0.4);
    color: white;
    border: none;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: background-color 0.2s;
}

.chat-close-btn button:hover {
    background-color: rgba(0,0,0,0.6);
}

.chat-agent-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid rgba(40, 57, 47, 0.5); /* surface-lighter with opacity */
}

/* Messages Area */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    height: 400px;
    background-color: var(--chat-surface-dark);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: #111814;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #28392f;
    border-radius: 2px;
}

/* Composer */
.chat-composer {
    padding: 0.75rem;
    background-color: var(--chat-surface-dark);
    border-top: 1px solid var(--chat-surface-lighter);
}

.chat-input-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    background-color: var(--chat-surface-lighter);
    border-radius: 0.5rem;
    padding: 0.5rem;
}

#chat-input {
    width: 100%;
    background: transparent;
    border: none;
    color: white;
    padding: 0;
    font-size: 0.875rem;
    resize: none;
    max-height: 6rem;
    line-height: 1.5;
}

#chat-input:focus {
    outline: none;
    box-shadow: none;
}

.chat-send-btn {
    height: 2.5rem;
    padding: 0 1rem;
    background-color: var(--chat-primary);
    color: var(--chat-bg-dark);
    font-size: 0.875rem;
    font-weight: bold;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.chat-send-btn:hover {
    opacity: 0.9;
}

/* Utilities (mimicking Tailwind classes used in HTML) */
.text-white { color: white; }
.text-primary { color: var(--chat-primary); }
.text-text-subtle { color: var(--chat-text-subtle); }
.bg-surface-lighter { background-color: var(--chat-surface-lighter); }
.bg-primary { background-color: var(--chat-primary); }
.bg-background-dark { background-color: var(--chat-bg-dark); }
.font-bold { font-weight: 700; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-full { border-radius: 9999px; }
.hidden { display: none; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.p-4 { padding: 1rem; }
.mt-2 { margin-top: 0.5rem; }
.pt-2 { padding-top: 0.5rem; }

/* Animations */
@keyframes ping {
    75%, 100% { transform: scale(2); opacity: 0; }
}
.animate-ping { animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite; }

@keyframes bounce {
    0%, 100% { transform: translateY(-25%); animation-timing-function: cubic-bezier(0.8,0,1,1); }
    50% { transform: none; animation-timing-function: cubic-bezier(0,0,0.2,1); }
}
.animate-bounce { animation: bounce 1s infinite; }

.delay-75 { animation-delay: 75ms; }
.delay-150 { animation-delay: 150ms; }
