/* WEB-T07 — "Raptortron" chat assistant widget (js/chat.js). Mobile-first: full screen under
   600px, a floating panel above. Colours come from the site tokens (light + dark themes). */
.rtchat-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.rtchat-launcher {
  position: fixed; right: 16px; bottom: 16px; z-index: 80;
  display: inline-flex; align-items: center; gap: .5rem;
  min-height: 56px; min-width: 56px; padding: 0 1.1rem 0 .95rem;
  border: 0; border-radius: 999px; cursor: pointer;
  background: var(--d-1, #1a214f); color: #fff;
  font: 600 .9rem/1 var(--font, sans-serif); letter-spacing: .01em;
  box-shadow: 0 6px 24px rgba(10, 14, 40, .28);
  transition: transform .2s ease, background-color .2s ease;
}
.rtchat-launcher svg { color: var(--c-gold, #b68b4d); flex: none; }
.rtchat-launcher:hover { background: var(--d-2, #2a3366); transform: translateY(-1px); }
.rtchat-launcher:focus-visible { outline: 3px solid var(--c-gold, #b68b4d); outline-offset: 3px; }
@media (max-width: 599px) {
  .rtchat-launcher { padding: 0; justify-content: center; }
  .rtchat-launcher__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  html.rtchat-open .rtchat-launcher { display: none; }
  html.rtchat-open, html.rtchat-open body { overflow: hidden; }
}

.rtchat-panel {
  position: fixed; inset: 0; z-index: 85;
  display: flex; flex-direction: column;
  background: var(--s-1, #fff); color: var(--c-text, #2b2f45);
  font-family: var(--font, sans-serif); font-size: .95rem;
}
.rtchat-panel[hidden] { display: none; }
@media (min-width: 600px) {
  .rtchat-panel {
    inset: auto 16px 84px auto; width: 380px; height: min(600px, calc(100vh - 110px));
    border: 1px solid var(--c-border, #ece7e3); border-radius: 14px; overflow: hidden;
    box-shadow: 0 18px 48px rgba(10, 14, 40, .25);
  }
}

.rtchat-head {
  display: flex; align-items: center; gap: .5rem; padding: .75rem .75rem .75rem 1rem;
  background: var(--d-1, #1a214f); color: #fff;
}
.rtchat-titles { flex: 1; min-width: 0; }
.rtchat-title { margin: 0; font: 500 1.5rem/1 var(--font-display, sans-serif); letter-spacing: .04em; color: #fff; }
.rtchat-sub { margin: .15rem 0 0; font-size: .75rem; opacity: .8; }
.rtchat-reset, .rtchat-close {
  min-height: 40px; border: 1px solid rgba(255, 255, 255, .35); border-radius: 8px;
  background: transparent; color: #fff; cursor: pointer; font: 500 .75rem var(--font, sans-serif);
}
.rtchat-reset { padding: 0 .6rem; }
.rtchat-close { width: 40px; display: inline-flex; align-items: center; justify-content: center; }
.rtchat-reset:hover, .rtchat-close:hover { background: rgba(255, 255, 255, .12); }
.rtchat-reset:focus-visible, .rtchat-close:focus-visible { outline: 2px solid var(--c-gold, #b68b4d); outline-offset: 2px; }

.rtchat-log { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .6rem; background: var(--s-2, #f7f5f4); overscroll-behavior: contain; }
.rtchat-log:focus-visible { outline: 2px solid var(--c-accent, #8e6a35); outline-offset: -2px; }
.rtchat-msg { max-width: 88%; }
.rtchat-msg--user { align-self: flex-end; }
.rtchat-body { margin: 0; padding: .6rem .8rem; border-radius: 12px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.rtchat-msg--bot .rtchat-body { background: var(--s-1, #fff); border: 1px solid var(--c-border, #ece7e3); border-bottom-left-radius: 4px; }
.rtchat-msg--user .rtchat-body { background: var(--c-accent, #8e6a35); color: #fff; border-bottom-right-radius: 4px; }
.rtchat-body a { color: inherit; text-decoration: underline; }
.rtchat-msg--bot .rtchat-body a { color: var(--c-accent, #8e6a35); }
.rtchat-typing { margin: 0; font-size: .8rem; color: var(--c-text-2, #5d6075); font-style: italic; }

.rtchat-actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.rtchat-action {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 .9rem; border-radius: 999px;
  background: var(--c-accent, #8e6a35); color: #fff; font-weight: 600; font-size: .8rem; text-decoration: none;
}
.rtchat-action--ghost { background: transparent; color: var(--c-accent, #8e6a35); border: 1px solid var(--c-accent, #8e6a35); }
.rtchat-action:focus-visible { outline: 2px solid var(--c-gold, #b68b4d); outline-offset: 2px; }

.rtchat-chips { display: flex; flex-wrap: wrap; gap: .4rem; padding: .5rem 1rem 0; background: var(--s-2, #f7f5f4); }
.rtchat-chips[hidden] { display: none; }
.rtchat-chip {
  min-height: 36px; padding: 0 .75rem; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--c-border-2, #d2d2d2); background: var(--s-1, #fff); color: var(--c-title, #1a214f);
  font: 500 .8rem var(--font, sans-serif);
}
.rtchat-chip:hover { border-color: var(--c-accent, #8e6a35); }
.rtchat-chip:focus-visible { outline: 2px solid var(--c-accent, #8e6a35); outline-offset: 2px; }

.rtchat-form { display: flex; align-items: flex-end; gap: .5rem; padding: .75rem 1rem .25rem; background: var(--s-2, #f7f5f4); }
.rtchat-input {
  flex: 1; min-height: 44px; max-height: 140px; resize: none; padding: .65rem .75rem;
  border: 1px solid var(--c-border-2, #d2d2d2); border-radius: 10px;
  background: var(--s-1, #fff); color: var(--c-text, #2b2f45); font: 400 1rem/1.35 var(--font, sans-serif);
}
.rtchat-input:focus-visible { outline: 2px solid var(--c-accent, #8e6a35); outline-offset: 1px; }
.rtchat-send {
  min-height: 44px; padding: 0 1rem; border: 0; border-radius: 10px; cursor: pointer;
  background: var(--d-1, #1a214f); color: #fff; font: 600 .9rem var(--font, sans-serif);
}
.rtchat-send:disabled { opacity: .55; cursor: progress; }
.rtchat-send:focus-visible { outline: 2px solid var(--c-gold, #b68b4d); outline-offset: 2px; }
.rtchat-attach {
  flex: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border: 1px solid var(--c-border-2, #d2d2d2); border-radius: 10px; background: var(--s-1, #fff);
  color: var(--c-title, #1a214f); cursor: pointer;
}
.rtchat-attach:hover { border-color: var(--c-accent, #8e6a35); }
.rtchat-attach:disabled { opacity: .55; cursor: progress; }
.rtchat-attach:focus-visible { outline: 2px solid var(--c-accent, #8e6a35); outline-offset: 2px; }
.rtchat-note { margin: 0; padding: .35rem 1rem .75rem; font-size: .7rem; color: var(--c-text-2, #5d6075); background: var(--s-2, #f7f5f4); }

:root[data-theme="dark"] .rtchat-launcher { border: 1px solid var(--c-gold); }
:root[data-theme="dark"] .rtchat-msg--user .rtchat-body,
:root[data-theme="dark"] .rtchat-action:not(.rtchat-action--ghost) { color: #0a0a0a; }
:root[data-theme="dark"] .rtchat-head { border-bottom: 1px solid var(--c-border); }
@media (prefers-reduced-motion: reduce) { .rtchat-launcher { transition: none; } }
