/* The chat button and panel. Self-contained, so it looks the same on every page. */
.bchat-btn, .bchat-panel, .bchat-panel * { box-sizing: border-box; font-family: "Barlow", system-ui, sans-serif; }
.bchat-btn {
  position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 40; display: flex; align-items: center; gap: 8px;
  height: 56px; padding: 0 20px 0 16px; border: 2px solid #ffffff; border-radius: 28px; background: #134540; color: #ffffff;
  font-size: 16px; font-weight: 700; cursor: pointer; box-shadow: 0 10px 26px -8px rgba(4, 48, 42, .7);
}
.bchat-btn:hover { background: #1b6157; }
.bchat-btn:focus-visible, .bchat-panel :focus-visible { outline: 3px solid #7fd3c4; outline-offset: 2px; }
.bchat-btn svg { width: 24px; height: 24px; flex: none; }
.bchat-btn[hidden], .bchat-panel[hidden] { display: none; }

.bchat-panel {
  position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 41; display: flex; flex-direction: column;
  width: 400px; height: min(640px, calc(100vh - 36px)); border-radius: 18px; overflow: hidden; background: #ffffff; color: #0f2e2a;
  box-shadow: 0 24px 60px -14px rgba(4, 48, 42, .7); border: 1.5px solid #134540;
}
.bchat-head { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 14px; background: #134540; color: #ffffff; }
.bchat-head img { width: 32px; height: 39px; flex: none; }
.bchat-title { flex: 1; min-width: 0; font-family: "Barlow Condensed", "Barlow", sans-serif; font-size: 21px; font-weight: 700; line-height: 1.1; }
.bchat-lang { display: flex; border: 1px solid rgba(255, 255, 255, .6); border-radius: 8px; overflow: hidden; }
.bchat-lang button { min-height: 32px; padding: 0 9px; border: 0; background: transparent; color: #ffffff; font-size: 13px; font-weight: 700; cursor: pointer; }
.bchat-lang button[aria-pressed="true"] { background: #ffffff; color: #134540; }
.bchat-close { width: 36px; height: 36px; flex: none; border: 0; border-radius: 50%; background: transparent; color: #ffffff; font-size: 24px; line-height: 1; cursor: pointer; }
.bchat-close:hover { background: rgba(255, 255, 255, .16); }

.bchat-log { position: relative; flex: 1; min-height: 0; overflow-y: auto; padding: 14px; background: #eef6f4; overscroll-behavior: contain; }
.bchat-msg { max-width: 92%; margin: 0 0 10px; padding: 10px 12px; border-radius: 12px; background: #ffffff; font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; }
.bchat-msg.me { margin-left: auto; background: #134540; color: #ffffff; }
.bchat-thinking { display: flex; align-items: center; gap: 8px; color: #5b7470; }
.bchat-thinking img { width: 26px; height: 32px; animation: bchat-pulse 1.2s ease-in-out infinite; }
@keyframes bchat-pulse { 0%, 100% { transform: scale(.9); opacity: .65; } 50% { transform: scale(1.05); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .bchat-thinking img { animation: none; } }

.bchat-card { display: block; margin: 0 0 8px; padding: 10px 12px; border: 1px solid #dcebe8; border-radius: 12px; background: #ffffff; color: inherit; text-decoration: none; }
.bchat-card:hover { border-color: #1a8a7a; }
.bchat-teams { font-weight: 700; font-size: 15px; line-height: 1.25; }
.bchat-meta { margin-top: 1px; color: #5b7470; font-size: 12.5px; }
.bchat-call { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 7px; }
.bchat-label { display: inline-block; padding: 3px 8px; border-radius: 7px; background: #d7f1ec; color: #135a51; font-size: 13.5px; font-weight: 700; }
.bchat-chance { flex: none; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.bchat-bar { height: 5px; margin-top: 7px; border-radius: 3px; background: #dcebe8; overflow: hidden; }
.bchat-bar span { display: block; height: 100%; background: #1a8a7a; }
.bchat-tag { color: #5b7470; font-size: 12px; margin-left: 6px; }
.bchat-link { display: inline-block; margin: 0 0 10px; color: #135a51; font-weight: 700; font-size: 14.5px; }

.bchat-quick { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 12px; background: #ffffff; border-top: 1px solid #dcebe8; }
.bchat-quick button { min-height: 34px; padding: 0 10px; border: 1.5px solid #134540; border-radius: 17px; background: #ffffff; color: #134540; font-size: 13px; font-weight: 700; cursor: pointer; }
.bchat-quick button:hover { background: #d7f1ec; }
.bchat-quick button:disabled, .bchat-send:disabled { opacity: .5; cursor: default; }
.bchat-form { display: flex; gap: 8px; padding: 0 12px 8px; background: #ffffff; }
.bchat-form input { flex: 1; min-width: 0; height: 44px; padding: 0 12px; border: 1.5px solid #5b7470; border-radius: 10px; background: #ffffff; color: #0f2e2a; font-size: 16px; }
.bchat-send { flex: none; height: 44px; padding: 0 14px; border: 0; border-radius: 10px; background: #134540; color: #ffffff; font-size: 15px; font-weight: 700; cursor: pointer; }
.bchat-foot { margin: 0; padding: 0 12px 10px; background: #ffffff; color: #5b7470; font-size: 12px; line-height: 1.35; }

@media (max-width: 520px) {
  .bchat-btn { right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); height: 52px; padding: 0 16px 0 13px; }
  .bchat-panel { top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%; height: 100dvh; border: 0; border-radius: 0; }
}
