/* Aura Chat — floating widget */

#aura-chat-root { position: fixed; bottom: 20px; right: 20px; z-index: 99999; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }

#aura-chat-toggle {
    width: 60px; height: 60px; border-radius: 50%; border: none;
    background: #4F5E45; color: #fff; cursor: pointer;
    box-shadow: 0 4px 14px rgba(0,0,0,0.2);
    display: flex; align-items: center; justify-content: center;
    transition: transform 0.15s ease;
}
#aura-chat-toggle:hover { transform: scale(1.05); background: #3d4a35; }
#aura-chat-toggle:active { transform: scale(0.95); }

/* Pulse ring — draws attention on first page load, stops after 10s or on any interaction */
#aura-chat-toggle.pulse::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 50%; background: #4F5E45; z-index: -1;
    animation: aura-pulse 1.6s ease-out infinite;
}
#aura-chat-toggle { position: relative; }
@keyframes aura-pulse {
    0%   { transform: scale(1);   opacity: 0.55; }
    100% { transform: scale(1.9); opacity: 0; }
}

/* Tiny welcome bubble that peeks out briefly on first load */
#aura-chat-hint {
    position: absolute; bottom: 75px; right: 0;
    background: #fff; color: #333; padding: 10px 14px; border-radius: 10px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.15); font-size: 13px;
    max-width: 220px; line-height: 1.35;
    animation: aura-hint-in 0.4s ease-out;
    cursor: pointer;
}
#aura-chat-hint::after {
    content: ''; position: absolute; bottom: -6px; right: 24px;
    width: 12px; height: 12px; background: #fff; transform: rotate(45deg);
    box-shadow: 3px 3px 6px rgba(0,0,0,0.06);
}
@keyframes aura-hint-in { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
#aura-chat-hint.fade-out { animation: aura-hint-out 0.3s ease-out forwards; }
@keyframes aura-hint-out { to { transform: translateY(8px); opacity: 0; } }

#aura-chat-panel {
    position: absolute; bottom: 78px; right: 0;
    width: 380px; max-width: calc(100vw - 40px); height: 560px; max-height: calc(100vh - 120px);
    background: #fff; border-radius: 12px; overflow: hidden;
    box-shadow: 0 12px 40px rgba(0,0,0,0.25);
    display: flex; flex-direction: column;
    animation: aura-chat-in 0.2s ease-out;
}
#aura-chat-panel[hidden] { display: none !important; }
@keyframes aura-chat-in { from { transform: translateY(10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.aura-chat-header {
    padding: 14px 16px; background: #4F5E45; color: #fff;
    display: flex; justify-content: space-between; align-items: center;
    cursor: grab; user-select: none;
}
.aura-chat-header.dragging { cursor: grabbing; }
@media (max-width: 480px) { .aura-chat-header { cursor: default; } }
.aura-chat-title { font-size: 15px; font-weight: 700; }
.aura-chat-sub { font-size: 11px; opacity: 0.8; margin-top: 2px; }
#aura-chat-close { background: none; border: none; color: #fff; font-size: 38px; line-height: 1; cursor: pointer; padding: 4px 12px; font-weight: 300; }
#aura-chat-close:hover { color: rgba(255,255,255,0.7); background: rgba(255,255,255,0.1); border-radius: 6px; }

.aura-chat-messages { flex: 1; overflow-y: auto; padding: 14px 16px; background: #faf8f3; }
.aura-chat-msg {
    padding: 10px 14px; border-radius: 12px; margin-bottom: 10px;
    font-size: 14px; line-height: 1.45; max-width: 85%; word-wrap: break-word;
}
.aura-chat-msg-bot { background: #fff; color: #222; border: 1px solid #eee; }
.aura-chat-msg-user { background: #4F5E45; color: #fff; margin-left: auto; }
.aura-chat-msg a { color: inherit; text-decoration: underline; }
.aura-chat-msg-bot p { margin: 0 0 8px; }
.aura-chat-msg-bot p:last-child { margin-bottom: 0; }
.aura-chat-msg-typing { color: #999; font-style: italic; }
.aura-chat-msg-error { background: #fef2f2; border-color: #fecaca; color: #7f1d1d; }

.aura-chat-turnstile { padding: 10px 16px 0; display: none; }
.aura-chat-turnstile.visible { display: block; }

.aura-chat-form {
    display: flex; gap: 8px; padding: 10px 12px;
    border-top: 1px solid #eee; background: #fff;
    align-items: flex-end;
}
#aura-chat-input {
    flex: 1; border: 1px solid #ccc; border-radius: 20px;
    padding: 10px 14px; font-size: 14px; font-family: inherit;
    resize: none; max-height: 100px; line-height: 1.4;
}
#aura-chat-input:focus { outline: 2px solid #4F5E45; outline-offset: -1px; }
#aura-chat-send {
    width: 40px; height: 40px; border-radius: 50%;
    background: #4F5E45; color: #fff; border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
#aura-chat-send:hover { background: #3d4a35; }
#aura-chat-send:disabled { background: #ccc; cursor: not-allowed; }

.aura-chat-footer { padding: 6px 12px; font-size: 10px; color: #999; text-align: center; background: #fff; border-top: 1px solid #f5f5f5; }

@media (max-width: 480px) {
    #aura-chat-root { bottom: 12px; right: 12px; }
    #aura-chat-panel {
        position: fixed; bottom: 12px; right: 12px; left: 12px;
        width: auto; max-width: none;
        height: 65vh; min-height: 400px; max-height: calc(100vh - 100px);
        border-radius: 14px;
    }
    #aura-chat-hint { max-width: calc(100vw - 40px); white-space: normal; }
}
