/* Homepage chat banner and panel.
   Banner cycles uploads/boe-logo.webp, uploads/boe-satisfaction-badge.webp,
   uploads/boe-main-logo.webp, and uploads/boe-local-badge.webp at the same height.
   Chat avatar: uploads/boe-main-logo.webp */

.boe-chat-banner {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 10px 0 8px;
  border: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.18);
  overflow: hidden;
  margin-top: 12px;
  background: rgba(0, 0, 0, 0.04);
  color: #000;
  cursor: pointer;
  text-align: center;
  font-family: Montserrat, sans-serif;
}

.boe-chat-banner:hover,
.boe-chat-banner:focus-visible {
  background: rgba(0, 0, 0, 0.08);
}

.boe-chat-banner:focus-visible {
  outline: 2px solid #000;
  outline-offset: -2px;
}

.boe-chat-banner-label {
  display: block;
  padding: 0 16px 6px;
  color: #1a1a1a;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.35;
}

.boe-chat-banner-viewport {
  display: block;
  overflow: hidden;
  height: 104px;
  width: 100%;
  max-width: 100%;
}

.boe-chat-banner-track {
  display: flex;
  width: max-content;
  animation: boe-logo-marquee 36s linear infinite;
}

.boe-chat-banner-set {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 32px;
  height: 104px;
  padding-right: 32px;
}

.boe-chat-banner-set img {
  display: block;
  height: 92px;
  width: auto;
  max-width: none;
  flex: 0 0 auto;
}

@keyframes boe-logo-marquee {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-50%, 0, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .boe-chat-banner-track {
    animation-play-state: paused;
  }
}

@media (max-width: 992px) {
  .boe-chat-banner {
    margin-top: 20px;
  }
}

@media (max-width: 767px) {
  .boe-chat-banner-label {
    font-size: 13px;
    padding: 0 12px 4px;
  }
  .boe-chat-banner-viewport,
  .boe-chat-banner-set {
    height: 88px;
  }
  .boe-chat-banner-set img {
    height: 76px;
  }
}

.boe-chat {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  padding: 24px;
  background: rgba(0, 0, 0, 0.28);
  box-sizing: border-box;
}

.boe-chat[hidden] {
  display: none !important;
}

.boe-chat-panel {
  display: flex;
  flex-direction: column;
  width: min(400px, 100%);
  height: min(560px, calc(100vh - 48px));
  background: #fff;
  color: #000;
  border: 1px solid #000;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
  font-family: Birdseye, sans-serif;
  box-sizing: border-box;
}

.boe-chat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px 12px 14px;
  border-bottom: 1px solid #000;
  background: #fff;
}

.boe-chat-avatar,
.boe-chat-msg-avatar {
  display: block;
  width: auto;
  height: 48px;
  max-width: none;
  flex: 0 0 auto;
}

.boe-chat-heading {
  flex: 1 1 auto;
  min-width: 0;
}

.boe-chat-title {
  margin: 0;
  font-family: Montserrat, sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.2;
}

.boe-chat-sub {
  margin: 2px 0 0;
  color: rgba(0, 0, 0, 0.65);
  font-family: Montserrat, sans-serif;
  font-size: 12px;
  line-height: 1.3;
}

.boe-chat-close {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: 1px solid #000;
  background: #fff;
  color: #000;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.boe-chat-close:hover,
.boe-chat-close:focus-visible {
  background: rgba(0, 0, 0, 0.06);
}

.boe-chat-log {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 14px;
  background: #fff;
}

.boe-chat-msg {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin: 0 0 12px;
}

.boe-chat-msg p {
  margin: 0;
  padding: 10px 12px;
  font-size: 15px;
  line-height: 1.45;
  max-width: 85%;
}

.boe-chat-msg-assistant p {
  background: rgba(0, 0, 0, 0.06);
  color: #000;
}

.boe-chat-msg-user {
  justify-content: flex-end;
}

.boe-chat-msg-user p {
  background: #000;
  color: #fff;
}

.boe-chat-msg-avatar {
  height: 28px;
}

.boe-chat-form {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid rgba(0, 0, 0, 0.2);
  background: #fff;
}

.boe-chat-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.boe-chat-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 42px;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid rgba(0, 0, 0, 0.45);
  background: #fff;
  color: #000;
  font-family: Montserrat, sans-serif;
  font-size: 14px;
  box-sizing: border-box;
}

.boe-chat-input:focus {
  outline: 2px solid #000;
  outline-offset: 1px;
}

.boe-chat-send {
  flex: 0 0 auto;
  margin: 0;
  padding: 0 16px;
  border: 1px solid #000;
  background: #000;
  color: #fff;
  cursor: pointer;
  font-family: Montserrat, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.boe-chat-send:hover,
.boe-chat-send:focus-visible {
  background: #fff;
  color: #000;
}

.boe-chat-send:disabled {
  opacity: 0.55;
  cursor: wait;
}

body.boe-chat-open {
  overflow: hidden;
}

@media (max-width: 767px) {
  .boe-chat {
    padding: 0;
    align-items: stretch;
    justify-content: stretch;
  }

  .boe-chat-panel {
    width: 100%;
    height: 100%;
    max-height: none;
    border: none;
  }

  .boe-chat-form {
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
  }
}
