/*
 * Get Ski Bots Chat — frontend.css v2.0
 * Phase 1: Desktop panel shell. Clean, production-ready.
 * All class names match PHP output exactly.
 */

/* ── Variables ────────────────────────────────────────────────────────────── */
:root {
  --gsbc-primary:   #1a1a1a;
  --gsbc-accent:    #c8a35a;
  --gsbc-panel-w:   440px;
  --gsbc-sb-w:      52px;
  --gsbc-hdr-h:     52px;
  --gsbc-ftr-h:     30px;
  --gsbc-z-panel:   999990;
  --gsbc-z-bubble:  999980;
  --gsbc-z-back:    999970;
  --gsbc-bg:        #ffffff;
  --gsbc-bg2:       #f5f6f8;
  --gsbc-border:    rgba(0,0,0,0.09);
  --gsbc-text:      #1a1a1a;
  --gsbc-muted:     #6b7280;
  --gsbc-shadow:    -4px 0 24px rgba(0,0,0,0.15), -1px 0 6px rgba(0,0,0,0.08);
}

/* ── Panel shell ──────────────────────────────────────────────────────────── */
.gsbc-panel {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: var(--gsbc-panel-w);
  max-width: 100vw;
  z-index: var(--gsbc-z-panel);
  display: flex;
  flex-direction: row;
  background: var(--gsbc-bg);
  box-shadow: var(--gsbc-shadow);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  color: var(--gsbc-text);
}

/* hidden attr controls visibility via transform — keep display:flex always */
.gsbc-panel[hidden] { display: flex !important; }

.gsbc-panel.is-open { transform: translateX(0); }

.gsbc-panel.mode-full {
  width: 100vw;
  left: 0;
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1),
              width 0.3s cubic-bezier(0.4,0,0.2,1);
}

.gsbc-panel.mode-modal {
  top: 50%; right: 50%; bottom: auto;
  width: min(var(--gsbc-panel-w), 92vw);
  max-height: 85vh;
  transform: translate(50%, -50%) scale(0.94);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25), 0 4px 16px rgba(0,0,0,0.12);
}
.gsbc-panel.mode-modal.is-open { transform: translate(50%, -50%) scale(1); }

/* ── Sidebar ──────────────────────────────────────────────────────────────── */
.gsbc-sidebar {
  width: var(--gsbc-sb-w);
  flex-shrink: 0;
  background: var(--gsbc-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0 10px;
  gap: 4px;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
}
/* Hide scrollbar — sidebar scrolls silently if needed */
.gsbc-sidebar::-webkit-scrollbar { display: none; }
.gsbc-sidebar { scrollbar-width: none; }

/* Logo / initials */
.gsbc-sb-logo {
  width: 34px; height: 34px;
  border-radius: 8px;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-bottom: 10px;
}
.gsbc-sb-logo img { width: 100%; height: 100%; object-fit: contain; }
.gsbc-sb-initials {
  background: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.92);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* Sidebar icon buttons */
.gsbc-sb-btn {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.55);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, color 0.15s;
  padding: 0;
  flex-shrink: 0;
}
.gsbc-sb-btn svg { width: 17px; height: 17px; }
.gsbc-sb-btn:hover { background: rgba(255,255,255,0.12); color: #fff; }
.gsbc-sb-btn.active { background: rgba(255,255,255,0.18); color: var(--gsbc-accent); }
.gsbc-sb-btn:focus-visible { outline: 2px solid rgba(255,255,255,0.45); outline-offset: 2px; }

/* Vertical attribution */
.gsbc-sb-attr {
  margin-top: auto;
  margin-bottom: 8px;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 9px;
  letter-spacing: 1.6px;
  color: rgba(255,255,255,0.22);
  text-transform: uppercase;
  user-select: none;
}

/* ── Main column ──────────────────────────────────────────────────────────── */
.gsbc-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

/* ── Header ───────────────────────────────────────────────────────────────── */
.gsbc-header {
  height: var(--gsbc-hdr-h);
  background: var(--gsbc-bg);
  border-bottom: 1px solid var(--gsbc-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px 0 10px;
  flex-shrink: 0;
  position: relative;
}

.gsbc-hdr-left {
  display: flex; align-items: center; gap: 2px;
  position: relative;
  min-width: 0;
  overflow: visible;
}

/* Header brand: logo circle + resort name */
.gsbc-hdr-brand {
  display: flex; align-items: center; gap: 9px;
  flex-shrink: 0;
}

.gsbc-hdr-logo {
  width: 32px; height: 32px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--gsbc-border);
  background: var(--gsbc-primary);
}
.gsbc-hdr-logo img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.gsbc-hdr-logo--initials {
  background: var(--gsbc-primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.gsbc-hdr-resort {
  font-size: 14px;
  font-weight: 600;
  color: var(--gsbc-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

/* Thin vertical divider between brand and chat title */
.gsbc-hdr-divider {
  width: 1px;
  height: 18px;
  background: var(--gsbc-border);
  flex-shrink: 0;
  margin: 0 4px;
}

/* Title dropdown button */
.gsbc-title-btn {
  display: flex; align-items: center; gap: 5px;
  background: none; border: none; cursor: pointer;
  padding: 6px 8px; border-radius: 6px;
  transition: background 0.15s;
  font-family: inherit; min-width: 0;
}
.gsbc-title-btn:hover { background: var(--gsbc-bg2); }

#gsbc-title {
  font-size: 13px; font-weight: 500;
  color: var(--gsbc-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 90px;
}

.gsbc-chev {
  color: var(--gsbc-muted);
  transition: transform 0.2s;
  flex-shrink: 0;
  width: 13px; height: 13px;
}

/* Dropdown */
.gsbc-dropdown {
  position: absolute;
  top: calc(100% + 6px); left: 0;
  background: var(--gsbc-bg);
  border: 1px solid var(--gsbc-border);
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.13);
  min-width: 190px;
  z-index: 20; overflow: hidden;
}
.gsbc-dropdown[hidden] { display: none !important; }

.gsbc-dd-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 15px;
  font-size: 13.5px; color: var(--gsbc-text);
  cursor: pointer;
  transition: background 0.12s;
}
.gsbc-dd-item:hover { background: var(--gsbc-bg2); }
.gsbc-dd-item svg { color: var(--gsbc-muted); flex-shrink: 0; }

/* Header action buttons */
.gsbc-hdr-right { display: flex; align-items: center; gap: 2px; }

.gsbc-hbtn {
  width: 38px; height: 44px;
  border-radius: 6px;
  background: transparent; border: none;
  color: var(--gsbc-muted);
  cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px;
  transition: background 0.15s, color 0.15s;
  padding: 0;
  font-family: inherit;
}
.gsbc-hbtn svg { width: 13px; height: 13px; flex-shrink: 0; }
.gsbc-hbtn-lbl {
  font-size: 9px;
  letter-spacing: 0.3px;
  line-height: 1;
  color: var(--gsbc-muted);
  white-space: nowrap;
}
.gsbc-hbtn:hover { background: var(--gsbc-bg2); color: var(--gsbc-text); }
.gsbc-hbtn:hover .gsbc-hbtn-lbl { color: var(--gsbc-text); }
.gsbc-hbtn.gsbc-close:hover { color: #dc2626; background: #fef2f2; }
.gsbc-hbtn.gsbc-close:hover .gsbc-hbtn-lbl { color: #dc2626; }
.gsbc-hbtn:focus-visible { outline: 2px solid var(--gsbc-primary); outline-offset: 2px; }

/* ── Tabs ─────────────────────────────────────────────────────────────────── */
.gsbc-tab {
  flex: 1; display: flex; flex-direction: column; overflow: hidden;
}
.gsbc-tab-hidden { display: none !important; }

/* ── Bot wrap / placeholder ───────────────────────────────────────────────── */
#gsbc-bot-wrap {
  flex: 1; position: relative; overflow: hidden;
  background: var(--gsbc-bg2);
  border-radius: 0;
}

#gsbc-placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 28px 24px;
  transition: opacity 0.25s;
}

.gsbc-ph-inner {
  text-align: center; max-width: 290px;
}

.gsbc-ph-icon {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: var(--gsbc-primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.gsbc-ph-inner p {
  font-size: 14px; line-height: 1.7;
  color: var(--gsbc-muted);
  margin: 0 0 20px;
}

/* Map pill in placeholder */
.gsbc-map-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 22px;
  border-radius: 999px;
  background: var(--gsbc-primary); color: #fff;
  border: none; cursor: pointer;
  font-size: 13px; font-weight: 500; font-family: inherit;
  transition: background 0.15s, transform 0.15s;
}
.gsbc-map-pill:hover { background: #333; transform: scale(1.03); }
.gsbc-map-pill svg { width: 14px; height: 14px; }

/* ── Map tab ──────────────────────────────────────────────────────────────── */
.gsbc-map-tab { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.gsbc-map-tab.gsbc-tab-hidden { display: none !important; }

.gsbc-map-toolbar {
  height: 46px;
  display: flex; align-items: center;
  padding: 0 10px; gap: 8px;
  border-bottom: 1px solid var(--gsbc-border);
  background: var(--gsbc-bg);
  flex-shrink: 0;
}
.gsbc-map-title {
  flex: 1; text-align: center;
  font-size: 13px; font-weight: 600; color: var(--gsbc-text);
}
.gsbc-map-tbtn {
  width: 28px; height: 28px; border-radius: 6px;
  background: transparent;
  border: 1px solid var(--gsbc-border);
  color: var(--gsbc-muted);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.gsbc-map-tbtn:hover { background: var(--gsbc-bg2); color: var(--gsbc-text); }
.gsbc-map-tbtn svg { width: 13px; height: 13px; }

#gsbc-map-canvas { flex: 1; width: 100%; min-height: 0; }

/* ── Footer ───────────────────────────────────────────────────────────────── */
.gsbc-footer {
  height: var(--gsbc-ftr-h);
  display: flex; align-items: center; justify-content: center;
  font-size: 10.5px; color: var(--gsbc-muted);
  border-top: 1px solid var(--gsbc-border);
  background: var(--gsbc-bg);
  flex-shrink: 0;
  letter-spacing: 0.2px;
}
.gsbc-footer a { color: var(--gsbc-muted); text-decoration: none; }
.gsbc-footer a:hover { color: var(--gsbc-primary); }

/* ── Backdrop ─────────────────────────────────────────────────────────────── */
#gsbc-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: var(--gsbc-z-back);
  cursor: pointer;
}
#gsbc-backdrop[hidden] { display: none !important; }

/* ── Chat bubble (Entry Point 3) ─────────────────────────────────────────── */
.gsbc-bubble {
  position: fixed;
  z-index: var(--gsbc-z-bubble);
  display: inline-flex; align-items: center; gap: 8px;
  padding: 0 20px 0 16px;
  height: 52px;
  border-radius: 999px; border: none;
  color: #fff;
  cursor: pointer;
  font-family: inherit; font-size: 14px; font-weight: 600;
  box-shadow: 0 4px 20px rgba(0,0,0,0.28);
  transition: transform 0.2s cubic-bezier(0.34,1.56,0.64,1),
              box-shadow 0.2s, opacity 0.2s;
  outline: none;
}
.gsbc-bubble:hover { transform: translateY(-3px); box-shadow: 0 8px 28px rgba(0,0,0,0.32); }
.gsbc-bubble:active { transform: scale(0.97); }
.gsbc-bubble:focus-visible { outline: 3px solid rgba(255,255,255,0.65); outline-offset: 2px; }
.gsbc-bubble.hidden { opacity: 0; pointer-events: none; transform: scale(0.8) translateY(10px); }

.gsbc-pos-bottom-right { right: 24px; bottom: 24px; }
.gsbc-pos-bottom-left  { left:  24px; bottom: 24px; }

.gsbc-bubble-icon { display: flex; align-items: center; flex-shrink: 0; }
.gsbc-bubble-icon svg { width: 22px; height: 22px; }
.gsbc-bubble-label { white-space: nowrap; }

.gsbc-bubble-pulse {
  position: absolute; top: -2px; right: -2px;
  width: 13px; height: 13px;
  background: #22c55e; border-radius: 50%;
  border: 2px solid #fff;
  animation: gsbcPulse 2.5s infinite;
}
@keyframes gsbcPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.55); }
  50%      { box-shadow: 0 0 0 5px rgba(34,197,94,0); }
}

/* Shortcode bubble (inline, not fixed) */
.gsbc-bubble-sc {
  position: relative;
  display: inline-flex;
}

/* ── Search icon (Entry Point 1) ─────────────────────────────────────────── */
/* Default: circle icon (used inside nav bars inline) */
.gsbc-search-icon {
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: none;
  color: inherit; cursor: pointer;
  transition: background 0.15s, transform 0.15s;
  vertical-align: middle;
  padding: 0;
}
.gsbc-search-icon svg { width: 20px; height: 20px; }
.gsbc-search-icon:hover { transform: scale(1.1); }
.gsbc-search-icon:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

/* Large square variant — exact Jackson Hole nav block style */
.gsbc-search-icon--lg {
  width: 58px;
  align-self: stretch;         /* fills nav bar height */
  border-radius: 0;
  background: #e8e8e8;
  border-left: 1px solid rgba(0,0,0,0.1) !important;
  justify-content: center;
  position: relative;
}
.gsbc-search-icon--lg svg { width: 22px; height: 22px; color: #1a1a1a; }
.gsbc-search-icon--lg:hover { background: #d8d8d8; transform: none; }

/* ── Hero search bar (Entry Point 2) ─────────────────────────────────────── */
.gsbc-hero-bar-wrap { width: 100%; }

.gsbc-hero-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 10px 10px 20px;
  background: rgba(255,255,255,0.97);
  border-radius: 999px;
  border: 2.5px solid var(--gsbc-accent);
  box-shadow: 0 6px 28px rgba(0,0,0,0.18);
  backdrop-filter: blur(8px);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s;
}
.gsbc-hero-bar:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 36px rgba(0,0,0,0.22);
}

/* Animated focus ring when typing */
.gsbc-hero-bar:focus-within {
  border-color: var(--gsbc-primary);
  box-shadow: 0 6px 28px rgba(0,0,0,0.18), 0 0 0 3px rgba(26,26,26,0.08);
}

.gsbc-bar-sparkle {
  display: flex; align-items: center; flex-shrink: 0;
  transition: transform 0.2s;
}
.gsbc-hero-bar:focus-within .gsbc-bar-sparkle {
  transform: rotate(20deg) scale(1.1);
}

.gsbc-bar-input {
  flex: 1; min-width: 0;
  background: transparent; border: none; outline: none;
  font-size: 15px; color: #333;
  font-family: inherit;
  cursor: text; pointer-events: auto;
}
.gsbc-bar-input::placeholder { color: #999; }

/* Send button — round, accent colored */
.gsbc-bar-send {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: none; color: #fff;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: transform 0.15s, filter 0.15s, box-shadow 0.15s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.gsbc-bar-send svg { width: 17px; height: 17px; }
.gsbc-bar-send:hover { transform: scale(1.07); filter: brightness(1.1); box-shadow: 0 4px 12px rgba(0,0,0,0.25); }
.gsbc-bar-send:active { transform: scale(0.97); }

/* ── Standalone map shortcode ─────────────────────────────────────────────── */
.gsbc-sc-map {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.1);
}

/* ── Mobile ───────────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  :root { --gsbc-panel-w: 100vw; }
  .gsbc-panel { top: 0; right: 0; bottom: 0; left: 0; width: 100%; border-radius: 0; }
  .gsbc-bubble-label { display: none; }
  .gsbc-bubble { padding: 0 16px; height: 48px; }
  /* Expand does nothing on mobile — hide it */
  #gsbc-expand-btn { display: none !important; }
  /* More breathing room around the input bar on mobile */
  .gsbc-input-bar { padding: 10px 16px 16px; gap: 10px; }
}

/* ── Inline search bar (slides down under header) ────────────────────────── */
/* Search bar — only visible inside the panel, max-height animation, no [hidden] override */
.gsbc-panel .gsbc-search-bar {
  border-bottom: 1px solid var(--gsbc-border);
  background: var(--gsbc-bg);
  flex-shrink: 0;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.25s cubic-bezier(0.4,0,0.2,1), opacity 0.2s;
  display: flex;
  flex-direction: column;
}
.gsbc-panel .gsbc-search-bar.gsbc-search-open {
  max-height: 52px;
  opacity: 1;
}
.gsbc-search-inner {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px;
}
.gsbc-search-inner > svg { color: var(--gsbc-muted); flex-shrink: 0; }
#gsbc-search-input {
  flex: 1; min-width: 0;
  background: transparent; border: none; outline: none;
  font-size: 14px; color: var(--gsbc-text); font-family: inherit;
}
#gsbc-search-input::placeholder { color: var(--gsbc-muted); }
.gsbc-search-clear {
  width: 24px; height: 24px; border-radius: 50%;
  background: transparent; border: none;
  color: var(--gsbc-muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, color 0.15s;
  padding: 0; flex-shrink: 0;
}
.gsbc-search-clear:hover { background: var(--gsbc-bg2); color: var(--gsbc-text); }

/* ── Live webcam strip ────────────────────────────────────────────────────── */
.gsbc-webcam-strip {
  flex-shrink: 0;
  border-bottom: 1px solid var(--gsbc-border);
  background: #000;
  overflow: hidden;
}
.gsbc-webcam-header {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  background: rgba(0,0,0,0.85);
}
.gsbc-webcam-live {
  display: flex; align-items: center; gap: 5px;
  font-size: 10px; font-weight: 700; letter-spacing: 1.5px;
  color: #fff; text-transform: uppercase;
  flex-shrink: 0;
}
.gsbc-live-dot {
  width: 7px; height: 7px;
  background: #ef4444; border-radius: 50%;
  animation: gsbcLivePulse 1.8s infinite;
  flex-shrink: 0;
}
@keyframes gsbcLivePulse {
  0%,100% { opacity: 1; box-shadow: 0 0 0 0 rgba(239,68,68,.5); }
  50%      { opacity: 0.85; box-shadow: 0 0 0 4px rgba(239,68,68,0); }
}
.gsbc-webcam-label {
  flex: 1; font-size: 11px; color: rgba(255,255,255,0.65);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gsbc-webcam-toggle {
  width: 24px; height: 24px; border-radius: 4px;
  background: transparent; border: none;
  color: rgba(255,255,255,0.5); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, color 0.15s;
  padding: 0; flex-shrink: 0;
}
.gsbc-webcam-toggle:hover { background: rgba(255,255,255,0.1); color: #fff; }
.gsbc-webcam-toggle svg { transition: transform 0.25s; }
.gsbc-webcam-strip.collapsed .gsbc-webcam-toggle svg { transform: rotate(180deg); }

.gsbc-webcam-frame {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  transition: padding-bottom 0.3s cubic-bezier(0.4,0,0.2,1);
}
.gsbc-webcam-strip.collapsed .gsbc-webcam-frame {
  padding-bottom: 0;
}
.gsbc-webcam-frame iframe {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
}

/* ── Chat message thread ──────────────────────────────────────────────────── */
#gsbc-messages {
  position: absolute; inset: 0;
  overflow-y: auto;
  padding: 14px;
  display: flex; flex-direction: column; gap: 14px;
  opacity: 0;
  transition: opacity 0.25s;
  scroll-behavior: smooth;
}
#gsbc-messages.gsbc-msgs-visible { opacity: 1; }
#gsbc-messages::-webkit-scrollbar { width: 3px; }
#gsbc-messages::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 2px; }

/* Individual message rows */
.gsbc-msg {
  display: flex; gap: 8px;
  animation: gsbcMsgIn 0.22s ease;
}
@keyframes gsbcMsgIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.gsbc-msg--user  { flex-direction: row-reverse; }
.gsbc-msg--bot   { align-items: flex-start; }
.gsbc-msg--error { align-items: flex-start; }

/* Avatar */
.gsbc-msg-av {
  width: 28px; height: 28px; flex-shrink: 0;
  border-radius: 50%;
  background: var(--gsbc-primary);
  display: flex; align-items: center; justify-content: center;
  margin-top: 1px;
}
.gsbc-msg-av svg { width: 13px; height: 13px; color: #fff; }

/* Bubble */
.gsbc-msg-bubble {
  max-width: 82%;
  padding: 10px 13px;
  font-size: 13.5px;
  line-height: 1.6;
  border-radius: 4px 12px 12px 12px;
  word-break: break-word;
}
.gsbc-msg--bot .gsbc-msg-bubble {
  background: var(--gsbc-bg);
  border: 1px solid var(--gsbc-border);
  color: var(--gsbc-text);
  border-radius: 4px 18px 18px 18px;
}
.gsbc-msg--user .gsbc-msg-bubble {
  background: var(--gsbc-primary);
  color: #fff;
  border-radius: 18px 4px 18px 18px;
}
.gsbc-msg--error .gsbc-msg-bubble {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  border-radius: 4px 18px 18px 18px;
  font-size: 13px;
}

/* Markdown-like formatting in bot messages */
.gsbc-msg--bot .gsbc-msg-bubble strong { font-weight: 600; }
.gsbc-msg--bot .gsbc-msg-bubble em { font-style: italic; }
.gsbc-msg--bot .gsbc-msg-bubble p { margin: 0 0 8px; }
.gsbc-msg--bot .gsbc-msg-bubble p:last-child { margin-bottom: 0; }
.gsbc-msg--bot .gsbc-msg-bubble ul,
.gsbc-msg--bot .gsbc-msg-bubble ol { margin: 6px 0 8px 18px; }
.gsbc-msg--bot .gsbc-msg-bubble li { margin-bottom: 3px; }

/* Typing indicator */
.gsbc-typing-row { display: flex; gap: 8px; align-items: flex-start; }
.gsbc-typing-bubble {
  display: flex; gap: 4px; align-items: center;
  padding: 12px 14px;
  background: var(--gsbc-bg);
  border: 1px solid var(--gsbc-border);
  border-radius: 4px 18px 18px 18px;
}
.gsbc-typing-bubble span {
  width: 6px; height: 6px;
  background: var(--gsbc-accent);
  border-radius: 50%;
  animation: gsbcTyping 1.2s infinite;
  opacity: 0.5;
}
.gsbc-typing-bubble span:nth-child(2) { animation-delay: 0.2s; }
.gsbc-typing-bubble span:nth-child(3) { animation-delay: 0.4s; }
@keyframes gsbcTyping {
  0%,60%,100% { transform: translateY(0); opacity: 0.5; }
  30%          { transform: translateY(-5px); opacity: 1; }
}

/* ── Chat input bar ───────────────────────────────────────────────────────── */
.gsbc-input-bar {
  display: flex; align-items: flex-end; gap: 8px;
  padding: 10px 12px 12px;
  border-top: 1px solid var(--gsbc-border);
  background: var(--gsbc-bg);
  flex-shrink: 0;
}
.gsbc-input {
  flex: 1; min-width: 0;
  background: var(--gsbc-bg2);
  border: 1.5px solid var(--gsbc-border);
  border-radius: 22px;
  padding: 10px 16px;
  font-family: inherit; font-size: 14px;
  color: var(--gsbc-text);
  resize: none; outline: none;
  line-height: 1.5;
  max-height: 120px; overflow-y: auto;
  transition: border-color 0.2s;
}
.gsbc-input:focus { border-color: var(--gsbc-primary); }
.gsbc-input::placeholder { color: var(--gsbc-muted); }

.gsbc-send-btn {
  width: 38px; height: 38px; flex-shrink: 0;
  border-radius: 50%;
  background: var(--gsbc-primary); color: var(--gsbc-accent);
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, transform 0.15s, opacity 0.15s;
}
.gsbc-send-btn:hover:not(:disabled) { background: #2a2a2a; transform: scale(1.06); }
.gsbc-send-btn:disabled { opacity: 0.35; cursor: not-allowed; }

/* ── Mountain Dashboard tab ───────────────────────────────────────────────── */
#gsbc-dash-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#gsbc-dash-wrap {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  background: var(--gsbc-bg2);
}
/* Tighten up the dashboard widget inside the panel */
#gsbc-dash-wrap .gsb-widget {
  margin-bottom: 12px;
}
#gsbc-dash-wrap .gsb-master-dashboard {
  margin-bottom: 0;
}
/* Scrollbar */
#gsbc-dash-wrap::-webkit-scrollbar { width: 3px; }
#gsbc-dash-wrap::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 2px; }
