/* =========================================================================
   Q&A Knowledge Base Widget — Plugin Architecture Section 18
   ========================================================================= */

/* Trigger Button */
.gah-qa-trigger {
    position: fixed; bottom: 24px; right: 24px; z-index: 1000;
    width: 60px; height: 60px; border-radius: 50%;
    background: var(--gah-primary, #1E5FB4); color: #fff;
    border: none; cursor: pointer; box-shadow: 0 4px 16px rgba(30,95,180,0.3);
    display: flex; align-items: center; justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
}
.gah-qa-trigger:hover { transform: scale(1.05); box-shadow: 0 6px 20px rgba(30,95,180,0.4); }

/* Panel */
.gah-qa-widget { position: fixed; bottom: 96px; right: 24px; z-index: 1001; }
.gah-qa-panel {
    width: 380px; max-height: 500px; background: #fff;
    border-radius: 12px; box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    display: flex; flex-direction: column; overflow: hidden;
    animation: gah-qa-slide-up 0.25s ease;
}
@keyframes gah-qa-slide-up {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Header */
.gah-qa-header {
    background: var(--gah-primary, #1E5FB4); color: #fff;
    padding: 14px 16px; display: flex; justify-content: space-between; align-items: center;
}
.gah-qa-title { font-weight: 600; font-size: 0.9375rem; }
.gah-qa-close { background: none; border: none; color: #fff; font-size: 1.25rem; cursor: pointer; padding: 4px; }

/* Body */
.gah-qa-body { flex: 1; overflow-y: auto; padding: 16px; }
.gah-qa-input-wrap { margin-bottom: 12px; }
.gah-qa-input {
    width: 100%; padding: 12px 14px; border: 1px solid var(--gah-border, #E2E8F0);
    border-radius: 6px; font-size: 0.9375rem; min-height: 44px;
    outline: none; transition: border-color 0.2s;
}
.gah-qa-input:focus { border-color: var(--gah-primary, #1E5FB4); box-shadow: 0 0 0 2px rgba(30,95,180,0.15); }

/* Starters */
.gah-qa-starters { margin-top: 8px; }
.gah-qa-starters-label { font-size: 0.8125rem; color: var(--gah-muted, #64748B); margin-bottom: 8px; }
.gah-qa-starter {
    display: block; width: 100%; text-align: left; padding: 10px 14px; margin-bottom: 6px;
    background: #f8fafc; border: 1px solid var(--gah-border, #E2E8F0); border-radius: 6px;
    cursor: pointer; font-size: 0.875rem; color: var(--gah-primary, #1E5FB4);
    min-height: 44px; transition: background 0.15s;
}
.gah-qa-starter:hover { background: #f0f6ff; }

/* Results */
.gah-qa-result { padding: 12px; background: #f8fafc; border-radius: 6px; margin-bottom: 8px; }
.gah-qa-result-question { font-weight: 600; font-size: 0.875rem; margin-bottom: 6px; color: var(--gah-text, #0F172A); }
.gah-qa-result-answer { font-size: 0.875rem; color: var(--gah-muted, #64748B); line-height: 1.5; }
.gah-qa-result-link { display: inline-block; margin-top: 6px; font-size: 0.8125rem; font-weight: 600; }
.gah-qa-result-cta { margin-top: 8px; padding: 8px 12px; background: #f0f6ff; border-radius: 4px; font-size: 0.8125rem; }
.gah-qa-fallback { text-align: center; color: var(--gah-muted); padding: 16px; font-size: 0.875rem; }
.gah-qa-searching { text-align: center; color: var(--gah-muted); padding: 16px; font-size: 0.875rem; }

/* Footer */
.gah-qa-footer { padding: 10px 16px; border-top: 1px solid var(--gah-border, #E2E8F0); }
.gah-qa-footer small { font-size: 0.6875rem; color: var(--gah-muted, #64748B); line-height: 1.4; }

/* Mobile */
@media (max-width: 768px) {
    .gah-qa-trigger { width: 56px; height: 56px; bottom: 16px; right: 16px; }
    .gah-qa-widget { bottom: 80px; right: 10px; left: 10px; }
    .gah-qa-panel { width: calc(100vw - 20px); max-height: 70vh; }
    .gah-qa-input { min-height: 48px; }
    .gah-qa-starter { min-height: 48px; }
}

@media (prefers-reduced-motion: reduce) {
    .gah-qa-panel { animation: none; }
}
