/* public/stylesheets/ask-qadra-public.css — the Ask Qadra chat on the public
   website (Nov 12 2026). Script: public/javascripts/ask-qadra-public.js.
   Every rule is scoped to .aqp-* so the host page's styles (the dark home page,
   Bootstrap on the privacy pages) don't leak in. Colors meet WCAG AA. */

.aqp-btn, .aqp-panel, .aqp-panel * {
  box-sizing: border-box;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: normal;
  text-transform: none;
}

.aqp-btn {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9000;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 12px 18px;
  border: 0;
  border-radius: 999px;
  background: #4F46E5;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  box-shadow: 0 6px 20px rgba(17, 12, 60, .35);
  cursor: pointer;
}
.aqp-btn:hover { background: #4338CA; }
.aqp-btn:focus-visible,
.aqp-panel button:focus-visible,
.aqp-panel a:focus-visible,
.aqp-input:focus-visible {
  outline: 3px solid #F59E0B;
  outline-offset: 2px;
}
.aqp-btn-icon { font-size: 17px; }

.aqp-panel {
  position: fixed;
  right: 20px;
  bottom: 80px;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  width: min(380px, calc(100vw - 24px));
  height: min(560px, calc(100vh - 110px));
  margin: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
  color: #1F2937;
  font-size: 15px;
  line-height: 1.5;
  text-align: left;
  box-shadow: 0 16px 48px rgba(17, 12, 60, .35);
}
.aqp-panel[hidden] { display: none; }

.aqp-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 12px 12px 12px 16px;
  background: #4F46E5;
  color: #fff;
}
.aqp-titles { flex: 1; min-width: 0; }
.aqp-title { margin: 0; padding: 0; color: #fff; font-size: 17px; font-weight: 700; line-height: 1.2; }
.aqp-sub { margin: 2px 0 0; padding: 0; color: #E0E7FF; font-size: 13px; }
.aqp-clear, .aqp-close {
  margin: 0;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 8px;
  background: transparent;
  color: #fff;
  cursor: pointer;
}
.aqp-clear { padding: 4px 10px; font-size: 13px; }
.aqp-close { width: 34px; height: 34px; padding: 0; font-size: 22px; line-height: 1; }
.aqp-clear:hover, .aqp-close:hover { background: rgba(255, 255, 255, .15); }
.aqp-clear:disabled { opacity: .6; cursor: default; }

.aqp-privacy {
  margin: 0;
  padding: 8px 16px;
  background: #EEF2FF;
  color: #312E81;
  font-size: 12.5px;
  line-height: 1.4;
}
.aqp-privacy a { color: #312E81; text-decoration: underline; }

.aqp-log {
  flex: 1;
  margin: 0;
  padding: 14px 12px;
  overflow-y: auto;
  background: #fff;
}
.aqp-msg { display: flex; margin: 0 0 10px; }
.aqp-me { justify-content: flex-end; }
.aqp-bubble {
  max-width: 85%;
  margin: 0;
  padding: 9px 12px;
  border-radius: 14px;
  overflow-wrap: anywhere;
}
.aqp-bot .aqp-bubble { background: #F3F4F6; color: #111827; border-bottom-left-radius: 4px; }
.aqp-me .aqp-bubble { background: #4F46E5; color: #fff; border-bottom-right-radius: 4px; }
.aqp-err .aqp-bubble { background: #FEF2F2; color: #991B1B; }
.aqp-bubble p { margin: 0 0 6px; padding: 0; color: inherit; font-size: 15px; }
.aqp-bubble p:last-child { margin-bottom: 0; }
.aqp-bubble ul, .aqp-bubble ol { margin: 0 0 6px; padding: 0 0 0 20px; }
.aqp-bubble li { margin: 0 0 3px; padding: 0; color: inherit; list-style: revert; }
.aqp-bubble strong { font-weight: 700; color: inherit; }
.aqp-bot .aqp-bubble a { color: #3730A3; text-decoration: underline; font-weight: 600; }
.aqp-note { margin-top: 6px !important; color: #4B5563 !important; font-size: 13px !important; font-style: italic; }

.aqp-dots { display: inline-flex; gap: 4px; align-items: center; height: 38px; }
.aqp-dots span { width: 7px; height: 7px; border-radius: 50%; background: #6B7280; animation: aqp-bounce 1.2s infinite ease-in-out; }
.aqp-dots span:nth-child(2) { animation-delay: .15s; }
.aqp-dots span:nth-child(3) { animation-delay: .3s; }
@keyframes aqp-bounce { 0%, 80%, 100% { transform: translateY(0); opacity: .5; } 40% { transform: translateY(-4px); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .aqp-dots span { animation: none; opacity: .8; } }

.aqp-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0 12px 10px; background: #fff; }
.aqp-chips[hidden] { display: none; }
.aqp-chip {
  margin: 0;
  padding: 6px 10px;
  border: 1px solid #C7D2FE;
  border-radius: 999px;
  background: #fff;
  color: #3730A3;
  font-size: 13px;
  line-height: 1.3;
  cursor: pointer;
}
.aqp-chip:hover { background: #EEF2FF; }

.aqp-form {
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 10px 12px 12px;
  border-top: 1px solid #E5E7EB;
  background: #fff;
}
.aqp-input {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #9CA3AF;
  border-radius: 10px;
  background: #fff;
  color: #111827;
  font-size: 16px;   /* 16px: no zoom on iPhone */
}
.aqp-input::placeholder { color: #6B7280; }
.aqp-send {
  margin: 0;
  padding: 0 16px;
  border: 0;
  border-radius: 10px;
  background: #4F46E5;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.aqp-send:hover { background: #4338CA; }
.aqp-send:disabled, .aqp-input:disabled { opacity: .65; cursor: default; }

.aqp-sr {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 480px) {
  .aqp-btn { right: 12px; bottom: 12px; }
  .aqp-panel { right: 8px; left: 8px; bottom: 8px; width: auto; height: min(80vh, calc(100vh - 16px)); }
  html.aqp-open .aqp-btn { display: none; }
}

@media print { .aqp-btn, .aqp-panel { display: none !important; } }
