/* "Ask the desk" support chat — shared by public pages and the member area */
.bv-chat { position: fixed; right: 18px; bottom: 18px; z-index: 1060; display: flex; flex-direction: column; align-items: flex-end; font-family: var(--bv-font); }
.bv-chat-launch {
  position: relative; width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--bv-primary); color: #fff; font-size: 26px;
  display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 12px 28px rgba(249, 11, 11, .4); transition: transform .15s, background .2s;
}
.bv-chat-launch:hover { background: var(--bv-primary-dark); transform: scale(1.05); }
.bv-chat.is-open .bv-chat-launch { transform: scale(.92); }
.bv-chat-badge { position: absolute; top: -3px; right: -3px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 99px; background: #151922; color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; border: 2px solid #fff; }
.bv-chat-badge[hidden] { display: none; }

.bv-chat-panel {
  width: min(380px, calc(100vw - 24px)); height: min(540px, calc(100vh - 120px)); margin-bottom: 12px;
  display: flex; flex-direction: column; overflow: hidden; border-radius: 18px;
  background: var(--bv-card); border: 1px solid var(--bv-border); box-shadow: 0 24px 60px rgba(8, 11, 18, .35); color: var(--bv-text);
  animation: bvChatIn .18s ease-out;
}
.bv-chat-panel[hidden] { display: none; }
@keyframes bvChatIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.bv-chat-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 16px 18px; background: var(--bv-primary); color: #fff; }
.bv-chat-kicker { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; opacity: .85; }
.bv-chat-title { font-family: var(--bv-font-head); font-weight: 700; font-size: 18px; line-height: 1.25; }
.bv-chat-sub { font-size: 12.5px; opacity: .9; }
.bv-chat-close { width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .18); color: #fff; font-size: 17px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.bv-chat-close:hover { background: rgba(255, 255, 255, .3); }
.bv-chat-log { flex: 1; overflow-y: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; background: var(--bv-page); }
.bv-chat-intro { margin: 0 0 4px; color: var(--bv-muted); font-size: 14px; line-height: 1.5; }
.bv-chat-msg { max-width: 82%; padding: 9px 12px; border-radius: 14px; font-size: 14px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.bv-chat-msg time { display: block; font-size: 10.5px; opacity: .7; margin-top: 3px; }
.bv-chat-msg.me { align-self: flex-end; background: var(--bv-primary); color: #fff; border-bottom-right-radius: 4px; }
.bv-chat-msg.them { align-self: flex-start; background: var(--bv-card); border: 1px solid var(--bv-border); border-bottom-left-radius: 4px; }
.bv-chat-msg.them .who { display: block; font-size: 11px; font-weight: 700; color: var(--bv-primary); margin-bottom: 2px; }
.bv-chat-form { padding: 10px 12px 12px; border-top: 1px solid var(--bv-border); background: var(--bv-card); }
.bv-chat-who { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 8px; }
.bv-chat-who[hidden] { display: none; }
.bv-chat-who .form-control { font-size: 13px; padding: .45rem .7rem; border-radius: 10px; }
.bv-chat-error { color: var(--bv-danger); font-size: 12.5px; margin-bottom: 6px; }
.bv-chat-error[hidden] { display: none; }
.bv-chat-compose { display: flex; gap: 8px; align-items: center; padding: 4px; border: 1px solid var(--bv-border); border-radius: 999px; background: var(--bv-page); }
.bv-chat-compose .form-control { border: 1.5px solid transparent; background: transparent; border-radius: 999px; padding: .55rem .9rem; font-size: 14.5px; box-shadow: none; }
.bv-chat-compose .form-control:focus { border-color: rgba(249, 11, 11, .55); background: transparent; box-shadow: none; }
.bv-chat-compose button { flex-shrink: 0; border: 0; border-radius: 999px; padding: .6rem 1.15rem; background: var(--bv-primary); color: #fff; font-weight: 700; font-size: 14.5px; }
.bv-chat-compose button:disabled { opacity: .6; }

/* member area on phones: the bottom tab bar has a Chat button instead of the launcher */
@media (max-width: 991.98px) {
  .bv-chat.has-tabbar { bottom: 84px; }
  .bv-chat.has-tabbar .bv-chat-launch { display: none; }
  .bv-chat.has-tabbar.is-open .bv-chat-launch { display: none; }
  .bv-chat.has-cta { bottom: 84px; }
  .bv-chat.has-cta .bv-chat-launch { width: 50px; height: 50px; font-size: 23px; }
}
@media (max-width: 575.98px) {
  .bv-chat { right: 12px; }
  .bv-chat-panel { height: min(520px, calc(100vh - 170px)); }
  .bv-chat-who { grid-template-columns: 1fr; }
}
