:root {
    --bg-light: #f4eed6;
    --text-dark: #2d3d2f;
    --header-bg: #2d3d2f;
    --bubble-bg: #da5f33;
    --bubble-pulse: rgba(218, 95, 51, 0.6);
    --user-msg-bg: #627a40;
    --bot-msg-bg: #e9e9eb;
    --text-light: #ffffff;
    --accent-yellow: #e2a747;
    --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Chat Bubble & Tooltip */
#gaa-chat-bubble {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 65px;
    height: 65px;
    background: var(--bubble-bg);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
    z-index: 9998;
    animation: gaa-pulse 2.5s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

#gaa-chat-bubble:hover {
    transform: scale(1.15);
    animation-play-state: paused;
}

#gaa-chat-bubble img {
    width: 36px;
    height: 36px;
    transition: transform 0.3s ease;
}
#gaa-chat-bubble:hover img {
    transform: rotate(15deg);
}

@keyframes gaa-pulse {
    0%, 100% { box-shadow: 0 0 0 0 var(--bubble-pulse); }
    70% { box-shadow: 0 0 0 25px rgba(218, 95, 51, 0); }
}

#gaa-chat-tooltip {
    position: fixed;
    bottom: 40px;
    right: 105px;
    background-color: var(--header-bg);
    color: var(--text-light);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
    z-index: 9997;
    opacity: 0;
    transform: translateY(10px);
    animation: gaa-tooltip-fade-in 0.5s 1s forwards cubic-bezier(0.25, 0.1, 0.25, 1);
}

@keyframes gaa-tooltip-fade-in {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Chat Container */
#gaa-chat-container {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 370px;
    height: 600px;
    max-height: calc(100vh - 40px);
    background-color: var(--bg-light);
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    display: none;
    flex-direction: column;
    z-index: 9999;
    overflow: hidden;
    font-family: var(--font-main);
    transform: scale(0.5);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

#gaa-chat-container.gaa-active {
    display: flex;
    transform: scale(1);
    opacity: 1;
}

/* Chat Header */
#gaa-chat-header {
    background: var(--header-bg);
    color: var(--text-light);
    padding: 15px 20px;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 17px;
    font-weight: 600;
    flex-shrink: 0;
}

.gaa-header-controls span {
    cursor: pointer;
    font-size: 22px;
    margin-left: 18px;
    opacity: 0.8;
    transition: opacity 0.2s, transform 0.2s;
}
.gaa-header-controls span:hover {
    opacity: 1;
    transform: scale(1.2);
}

/* Chat Body */
#gaa-chat-body {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
}
#gaa-chat-messages {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.gaa-message {
    padding: 12px 18px;
    border-radius: 20px;
    max-width: 85%;
    line-height: 1.5;
    animation: gaa-message-fade-in 0.4s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
    transform: translateY(10px);
    opacity: 0;
}
@keyframes gaa-message-fade-in {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}
.gaa-message.bot {
    background-color: var(--bot-msg-bg);
    color: var(--text-dark);
    align-self: flex-start;
    border-bottom-left-radius: 5px;
}
.gaa-message.user {
    background-color: var(--user-msg-bg);
    color: var(--text-light);
    align-self: flex-end;
    border-bottom-right-radius: 5px;
}

/* Chat Footer */
#gaa-chat-footer {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-top: 1px solid #ddd;
    background-color: var(--bg-light);
    flex-shrink: 0;
}
#gaa-user-input {
    flex-grow: 1;
    border: 2px solid #ccc;
    background-color: #fff;
    border-radius: 25px;
    padding: 12px 20px;
    font-size: 15px;
    margin-right: 12px;
    transition: border-color 0.3s;
    color: var(--text-dark);
}
#gaa-user-input:focus {
    outline: none;
    border-color: var(--bubble-bg);
}
#gaa-send-btn {
    background: var(--bubble-bg);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s, transform 0.2s;
    flex-shrink: 0;
}
#gaa-send-btn:hover {
    background-color: var(--accent-yellow);
    transform: scale(1.1);
}
#gaa-send-btn svg {
    fill: var(--text-light);
    width: 24px;
    height: 24px;
    margin-left: 2px;
}

/* Loading Animation */
.gaa-loading-dots .gaa-dot {
    background-color: var(--text-dark);
}
