/* GreenFox AI Assistant Chat Styles */

#gf-ai-assistant {
    max-width: 720px;
    margin: 0 auto 40px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    height: 640px;
}

#gf-ai-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #008E69 0%, #006B4F 100%);
    color: #fff;
}

#gf-ai-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    color: #fff;
    line-height: 1.3;
}

.gf-ai-beta {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    padding: 2px 8px;
    border-radius: 4px;
    margin-top: 2px;
}

#gf-ai-avatar svg { display: block; }

#gf-ai-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: #f7f8fa;
}

#gf-ai-messages::-webkit-scrollbar { width: 6px; }
#gf-ai-messages::-webkit-scrollbar-track { background: transparent; }
#gf-ai-messages::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }

.gf-ai-msg {
    display: flex;
    max-width: 85%;
    animation: gfFadeIn 0.3s ease;
}

@keyframes gfFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.gf-ai-bot { align-self: flex-start; }
.gf-ai-user { align-self: flex-end; }

.gf-ai-msg-content {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14.5px;
    line-height: 1.6;
    word-wrap: break-word;
}

.gf-ai-bot .gf-ai-msg-content {
    background: #ffffff;
    color: #1a1a2e;
    border: 1px solid #e8e8e8;
    border-bottom-left-radius: 4px;
}

.gf-ai-user .gf-ai-msg-content {
    background: #008E69;
    color: #ffffff;
    border-bottom-right-radius: 4px;
}

.gf-ai-msg-content a { color: #008E69; text-decoration: underline; }
.gf-ai-user .gf-ai-msg-content a { color: #b8f0dd; }
.gf-ai-msg-content p { margin: 0 0 8px 0; }
.gf-ai-msg-content p:last-child { margin-bottom: 0; }
.gf-ai-msg-content ul, .gf-ai-msg-content ol { margin: 8px 0; padding-left: 20px; }
.gf-ai-msg-content li { margin-bottom: 4px; }
.gf-ai-msg-content strong { font-weight: 600; }

.gf-ai-typing { display: flex; gap: 4px; padding: 14px 18px; }
.gf-ai-typing span {
    width: 8px; height: 8px; border-radius: 50%;
    background: #008E69; opacity: 0.4;
    animation: gfBounce 1.4s ease-in-out infinite;
}
.gf-ai-typing span:nth-child(2) { animation-delay: 0.2s; }
.gf-ai-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes gfBounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-6px); opacity: 1; }
}

#gf-ai-suggestions {
    display: flex; flex-wrap: wrap; gap: 8px;
    padding: 12px 20px; background: #f7f8fa; border-top: 1px solid #eee;
}

.gf-ai-suggestion {
    background: #fff; border: 1px solid #008E69; color: #008E69;
    padding: 6px 14px; border-radius: 20px; font-size: 13px;
    font-weight: 500; cursor: pointer; transition: all 0.2s ease; font-family: inherit;
}
.gf-ai-suggestion:hover { background: #008E69; color: #fff; }
#gf-ai-suggestions.gf-hidden { display: none; }

#gf-ai-input-form {
    display: flex; gap: 8px; padding: 12px 16px;
    background: #fff; border-top: 1px solid #e8e8e8;
}

#gf-ai-input {
    flex: 1; padding: 10px 16px; border: 1.5px solid #ddd;
    border-radius: 24px; font-size: 14.5px; font-family: inherit;
    outline: none; transition: border-color 0.2s ease; background: #f7f8fa;
}
#gf-ai-input:focus { border-color: #008E69; background: #fff; }
#gf-ai-input::placeholder { color: #999; }

#gf-ai-send {
    width: 42px; height: 42px; border-radius: 50%;
    background: #008E69; color: #fff; border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s ease; flex-shrink: 0;
}
#gf-ai-send:hover { background: #007A5A; }
#gf-ai-send:disabled { background: #ccc; cursor: not-allowed; }

#gf-ai-footer { padding: 10px 20px; background: #f0f0f0; text-align: center; }
#gf-ai-footer p { margin: 0; font-size: 11.5px; color: #777; line-height: 1.5; }
#gf-ai-footer a { color: #008E69; font-weight: 600; text-decoration: none; }

.gf-ai-error .gf-ai-msg-content { background: #fff3f3; border-color: #ffcccc; color: #cc3333; }

@media (max-width: 768px) {
    #gf-ai-assistant { height: 75vh; border-radius: 12px; margin: 0 8px 20px; }
    .gf-ai-msg { max-width: 90%; }
    #gf-ai-suggestions { padding: 10px 14px; gap: 6px; }
    .gf-ai-suggestion { font-size: 12px; padding: 5px 12px; }
}