/* Tourist chat assistant (js/chat.js). Self-contained: map.html doesn't
   load style.css, so colours are set here, not taken from its variables. */
.zc-root {
  --zc-ocean: #0a4f6e; --zc-ocean-light: #1a7fa0; --zc-coral: #c95f3a;
  --zc-dark: #0d1f2d; --zc-sand: #f6efdc; --zc-muted: #5f6f7a; --zc-line: #e3e8ec;
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 15px; line-height: 1.45; color: var(--zc-dark);
}
.zc-root *, .zc-root *::before, .zc-root *::after { box-sizing: border-box; }

/* Launcher: bottom-left, so it never covers the trip-plan pill (bottom-right). */
.zc-launcher {
  position: fixed; left: 20px; bottom: 20px; z-index: 1500;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 18px 12px 14px; border: 0; border-radius: 999px;
  background: var(--zc-ocean); color: #fff; font: inherit; font-weight: 700;
  box-shadow: 0 8px 24px rgba(10, 79, 110, 0.35); cursor: pointer;
  transition: transform .18s, box-shadow .18s;
}
.zc-launcher:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(10, 79, 110, 0.45); }
.zc-launcher:focus-visible, .zc-root button:focus-visible, .zc-input:focus-visible {
  outline: 3px solid #f2b84b; outline-offset: 2px;
}
.zc-launcher svg { width: 22px; height: 22px; flex: none; }
.zc-root.zc-open .zc-launcher { display: none; }

.zc-panel {
  position: fixed; left: 20px; bottom: 20px; z-index: 1600;
  width: 380px; max-width: calc(100vw - 40px);
  height: 600px; max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px);
  display: none; flex-direction: column; overflow: hidden;
  background: #fff; border-radius: 18px;
  box-shadow: 0 18px 50px rgba(13, 31, 45, 0.28);
}
.zc-root.zc-open .zc-panel { display: flex; }

.zc-head {
  display: flex; align-items: center; gap: 10px; padding: 14px 14px 14px 16px;
  background: linear-gradient(135deg, var(--zc-ocean), var(--zc-ocean-light)); color: #fff;
}
.zc-head-text { flex: 1; min-width: 0; }
.zc-title { font-weight: 700; font-size: 16px; margin: 0; }
.zc-sub { font-size: 12.5px; opacity: .85; margin: 2px 0 0; }
.zc-icon-btn {
  width: 34px; height: 34px; border: 0; border-radius: 50%; flex: none;
  background: rgba(255,255,255,.16); color: #fff; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.zc-icon-btn:hover { background: rgba(255,255,255,.28); }
.zc-icon-btn svg { width: 18px; height: 18px; }

.zc-log { flex: 1; overflow-y: auto; padding: 16px 14px 8px; background: #fafbfc; }
.zc-msg { display: flex; margin: 0 0 10px; }
.zc-msg.zc-user { justify-content: flex-end; }
.zc-bubble {
  max-width: 86%; padding: 10px 13px; border-radius: 16px; overflow-wrap: anywhere;
  background: #fff; border: 1px solid var(--zc-line); border-bottom-left-radius: 5px;
}
.zc-user .zc-bubble {
  background: var(--zc-ocean); color: #fff; border-color: var(--zc-ocean);
  border-bottom-left-radius: 16px; border-bottom-right-radius: 5px; white-space: pre-wrap;
}
.zc-bubble p { margin: 0 0 8px; }
.zc-bubble p:last-child, .zc-bubble ul:last-child { margin-bottom: 0; }
.zc-bubble ul { margin: 0 0 8px; padding-left: 20px; }
.zc-bubble li { margin: 2px 0; }
.zc-bubble a { color: var(--zc-ocean-light); font-weight: 600; }
.zc-error .zc-bubble { background: #fff4f0; border-color: #f3c9b9; color: #8a3a1f; }

.zc-typing span {
  display: inline-block; width: 7px; height: 7px; margin: 0 2px; border-radius: 50%;
  background: var(--zc-muted); animation: zc-bounce 1.2s infinite ease-in-out;
}
.zc-typing span:nth-child(2) { animation-delay: .15s; }
.zc-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes zc-bounce { 0%, 80%, 100% { transform: scale(.6); opacity: .5 } 40% { transform: scale(1); opacity: 1 } }

.zc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.zc-chip {
  border: 1px solid #bcd3de; background: #fff; color: var(--zc-ocean);
  border-radius: 999px; padding: 6px 11px; font: inherit; font-size: 13.5px; cursor: pointer;
}
.zc-chip:hover { background: #eef6fa; }

/* Route card */
.zc-route { margin: 0 0 12px; border: 1px solid var(--zc-line); border-radius: 14px; overflow: hidden; background: #fff; }
.zc-map { height: 170px; background: #e6eef2; }
.zc-route-body { padding: 10px 12px; }
.zc-route-line { font-size: 13.5px; color: var(--zc-muted); margin: 0 0 8px; }
.zc-route-line strong { color: var(--zc-dark); }
.zc-maps-btn {
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none;
  background: var(--zc-coral); color: #fff; border-radius: 999px;
  padding: 8px 14px; font-weight: 700; font-size: 14px;
}
.zc-maps-btn:hover { background: #b4512f; }

.zc-foot { border-top: 1px solid var(--zc-line); padding: 8px 10px 10px; background: #fff; }
.zc-loc {
  display: inline-flex; align-items: center; gap: 6px; margin: 0 0 8px;
  border: 0; background: none; color: var(--zc-ocean); font: inherit; font-size: 13px;
  font-weight: 600; cursor: pointer; padding: 2px 4px; border-radius: 6px;
}
.zc-loc svg { width: 15px; height: 15px; }
.zc-loc.zc-on { color: #1d7a46; }
.zc-loc[disabled] { opacity: .6; cursor: wait; }
.zc-form { display: flex; gap: 8px; align-items: flex-end; }
.zc-input {
  flex: 1; resize: none; max-height: 110px; min-height: 42px;
  border: 1px solid #cfd8de; border-radius: 12px; padding: 10px 12px;
  font: inherit; color: inherit; background: #fff;
}
.zc-send {
  width: 42px; height: 42px; border: 0; border-radius: 50%; flex: none;
  background: var(--zc-coral); color: #fff; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.zc-send[disabled] { opacity: .5; cursor: default; }
.zc-send svg { width: 18px; height: 18px; }
.zc-note { font-size: 11.5px; color: var(--zc-muted); margin: 6px 2px 0; }
.zc-note button { border: 0; background: none; color: inherit; text-decoration: underline; padding: 0; font: inherit; cursor: pointer; }

[dir="rtl"] .zc-bubble ul { padding-left: 0; padding-right: 20px; }

@media (max-width: 600px) {
  .zc-launcher { left: 14px; bottom: 14px; padding: 12px; }
  .zc-launcher .zc-launcher-label { display: none; }
  .zc-panel { inset: 0; width: 100%; max-width: none; height: 100%; max-height: none; border-radius: 0; }
  .zc-input { font-size: 16px; } /* stops iOS zooming into the field */
}
@media (prefers-reduced-motion: reduce) {
  .zc-launcher, .zc-typing span { transition: none; animation: none; }
}
