/* SR Tax Assistant chat (chat.js). Uses the home page's colour tokens. */
.srchat { font-family: 'Lato', sans-serif; }
.srchat-launcher { position: fixed; right: 20px; bottom: 20px; z-index: 300; display: flex; align-items: center; gap: 10px;
  padding: 6px 18px 6px 6px; border: 1px solid rgba(201,168,76,0.6); border-radius: 999px; background: var(--cobalt-darker);
  color: var(--white); font: 700 14px 'Lato', sans-serif; cursor: pointer; box-shadow: 0 8px 24px rgba(12,26,82,0.35);
  transition: transform 0.15s, border-color 0.2s; }
.srchat-launcher:hover { transform: translateY(-2px); border-color: var(--gold); }
.srchat-launcher img { width: 48px; height: 48px; border-radius: 50%; background: var(--white); object-fit: contain; border: 2px solid var(--gold); }
.srchat.is-open .srchat-launcher-label::after { content: ' ×'; }

.srchat-panel { position: fixed; right: 20px; bottom: 88px; z-index: 300; width: 380px; height: min(600px, calc(100vh - 120px));
  display: flex; flex-direction: column; background: var(--white); border-radius: 12px; overflow: hidden;
  border: 1px solid var(--border); box-shadow: 0 18px 48px rgba(12,26,82,0.28); }
.srchat-panel[hidden] { display: none; }
.srchat-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--cobalt-darker); border-bottom: 2px solid var(--gold); }
.srchat-head img { width: 40px; height: 40px; border-radius: 50%; background: var(--white); object-fit: contain; flex: none; }
.srchat-title { display: flex; flex-direction: column; line-height: 1.25; flex: 1; min-width: 0; }
.srchat-title strong { font-family: 'Playfair Display', serif; font-size: 17px; color: var(--white); font-weight: 600; }
.srchat-title span { font-size: 12px; color: var(--gold-light); }
.srchat-close { width: 36px; height: 36px; border: 1px solid rgba(201,168,76,0.45); border-radius: 6px; background: transparent;
  color: var(--white); font-size: 22px; line-height: 1; cursor: pointer; flex: none; }
.srchat-close:hover { border-color: var(--gold); color: var(--gold-light); }

.srchat-log { position: relative; flex: 1; overflow-y: auto; padding: 16px 14px 8px; background: var(--cream); display: flex; flex-direction: column; gap: 10px; }
.srchat-msg { max-width: 88%; padding: 10px 13px; border-radius: 10px; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.srchat-bot { align-self: flex-start; background: var(--white); color: var(--text); border: 1px solid var(--border); border-top-left-radius: 2px; }
.srchat-user { align-self: flex-end; background: var(--cobalt); color: var(--white); border-top-right-radius: 2px; }
.srchat-msg p + p, .srchat-msg ul, .srchat-msg ol, .srchat-msg p + ul { margin-top: 0.5rem; }
.srchat-msg ul, .srchat-msg ol { padding-left: 1.15rem; }
.srchat-msg li { margin-bottom: 0.25rem; }
.srchat-msg a { color: var(--cobalt-mid); font-weight: 700; }
.srchat-msg strong { color: var(--cobalt-darker); }
.srchat-q { display: block; font-family: 'Playfair Display', serif; font-size: 15px; margin-bottom: 0.35rem; }
.srchat-lead { color: var(--text-muted); font-size: 13px; margin-bottom: 0.35rem; }
.srchat-aside { margin-top: 0.6rem; padding-top: 0.6rem; border-top: 1px solid var(--border); color: var(--text-muted); font-style: italic; }
.srchat-typing { display: flex; gap: 4px; padding: 13px 14px; }
.srchat-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); animation: srchat-dot 1s infinite ease-in-out; }
.srchat-typing span:nth-child(2) { animation-delay: 0.15s; }
.srchat-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes srchat-dot { 0%, 80%, 100% { opacity: 0.3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

.srchat-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.srchat-chips button { font: 700 12.5px 'Lato', sans-serif; color: var(--cobalt); background: var(--white); border: 1px solid rgba(201,168,76,0.7);
  border-radius: 999px; padding: 6px 12px; cursor: pointer; text-align: left; transition: background 0.2s; }
.srchat-chips button:hover { background: rgba(201,168,76,0.15); }
.srchat-actions button { background: var(--gold); border-color: var(--gold); color: var(--cobalt-darker); }
.srchat-actions button:hover { background: var(--gold-light); }

.srchat-cta { align-self: stretch; background: var(--cobalt-darker); color: var(--white); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.srchat-cta p { font-size: 14px; font-weight: 700; }
.srchat-cta small { font-size: 11.5px; color: rgba(255,255,255,0.6); }
.srchat-wa { display: flex; align-items: center; justify-content: center; gap: 8px; background: #25d366; color: #06301a; font-weight: 700;
  font-size: 14px; text-decoration: none; padding: 10px 14px; border-radius: 6px; transition: filter 0.2s; }
.srchat-wa:hover { filter: brightness(1.07); }
.srchat-wa svg, .srchat-wa-bar svg { width: 18px; height: 18px; fill: currentColor; flex: none; }
.srchat-mail { color: var(--gold-light); font-size: 13px; text-align: center; }

.srchat-wa-bar { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 12px; font-size: 12.5px; font-weight: 700;
  color: #128c4a; background: var(--white); border-top: 1px solid var(--border); text-decoration: none; }
.srchat-wa-bar:hover { background: rgba(37,211,102,0.08); }
.srchat-form { display: flex; gap: 8px; padding: 10px 12px 6px; background: var(--white); }
.srchat-form input { flex: 1; min-width: 0; border: 1px solid var(--border); border-radius: 6px; padding: 10px 12px; font: 15px 'Lato', sans-serif;
  color: var(--text); background: var(--cream); outline: none; }
.srchat-form input:focus { border-color: var(--gold); background: var(--white); }
.srchat-form button { width: 44px; border: none; border-radius: 6px; background: var(--gold); color: var(--cobalt-darker); font-size: 20px; font-weight: 700; cursor: pointer; }
.srchat-form button:hover { background: var(--gold-light); }
.srchat-privacy { font-size: 11px; color: var(--text-muted); text-align: center; padding: 0 12px 10px; background: var(--white); }

@media (max-width: 600px) {
  .srchat-launcher { right: 16px; bottom: 16px; padding: 5px; }
  .srchat-launcher-label { display: none; }
  .srchat.is-open .srchat-launcher { display: none; }
  .srchat-panel { left: 16px; right: 16px; top: 16px; bottom: 16px; width: auto; height: auto; }
  .srchat-msg { max-width: 94%; }
}
@media (prefers-reduced-motion: reduce) {
  .srchat-typing span { animation: none; opacity: 0.7; }
  .srchat-launcher { transition: none; }
}
@media (max-width: 600px) { .srchat-form input { font-size: 16px; } } /* stops iPhone zooming in on focus */
/* Keep the footer links clear of the floating chat button. */
@media (min-width: 601px) { body > footer { padding-right: calc(5% + 210px); } }
@media (max-width: 600px) { body > footer { padding-bottom: 84px; } }
