body.buyer-studio .inquiry-float .contact-channel.chat-entry {
  cursor: pointer;
  border-bottom: 1px solid #ffffff30;
  border-radius: 8px 8px 0 0;
  text-align: start;
}
body.buyer-studio .inquiry-float button.chat-entry:is(:hover,:focus-visible) { background: #ffffff19; }
body.buyer-studio .inquiry-float button.chat-entry:focus-visible { outline: 2px solid #e6eee8; outline-offset: -2px; }
.chat-panel {
  --chat-green: #31553d;
  --chat-ink: #25372b;
  --chat-line: #d4dcd5;
  position: fixed;
  inset: auto max(20px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) auto;
  inline-size: min(402px, calc(100vw - 24px));
  block-size: min(590px, calc(100dvh - 32px));
  max-width: none;
  max-height: none;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: 1px solid var(--chat-line);
  border-radius: 18px;
  background: #fff;
  color: var(--chat-ink);
  box-shadow: 0 20px 70px #18251c36;
  overflow: hidden;
  font: inherit;
  font-size: 15px;
  line-height: 1.45;
}
.chat-panel[open] { display: grid; grid-template-rows: auto minmax(56px,1fr) auto; }
.chat-panel::backdrop { background: #14261b33; }
.chat-panel *, .chat-panel *::before { box-sizing: border-box; }
.chat-panel [hidden] { display: none !important; }
.chat-panel .chat-head {
  display: flex; justify-content: space-between; align-items: start; gap: 12px;
  margin: 0; padding: 18px 18px 15px 20px; color: white; background: var(--chat-green);
}
/* The site-wide theme sets buyer heading and paragraph typography with !important. */
#buyer-chat .chat-title {
  margin: 0 !important;
  font-family: inherit !important; font-weight: 650 !important; font-size: 1.15rem !important;
  line-height: 1.35 !important; letter-spacing: normal; color: white !important;
}
#buyer-chat .chat-state { margin: 3px 0 0 !important; color: #e5ede7 !important; font-size: .86rem !important; line-height: 1.4 !important; }
.chat-panel button, .chat-panel input, .chat-panel textarea { font: inherit; }
.chat-panel button { cursor: pointer; }
.chat-panel .chat-close {
  display: grid; place-items: center; flex: none; min-width: 44px; min-height: 44px; padding: 0;
  border-radius: 50%; border: 0; background: transparent; color: #fff;
}
.chat-panel .chat-close:hover { background: #ffffff1e; }
.chat-panel .chat-log { overflow: auto; overscroll-behavior: contain; min-width: 0; padding: 16px 18px 10px; background: #f8faf8; }
.chat-panel .chat-log:empty::before { content: attr(data-prompt); display: block; color: #4d6053; margin: 2px 0; }
.chat-panel .chat-message { display: flex; align-items: start; flex-direction: column; margin: 0 0 12px; }
.chat-panel .chat-message.mine { align-items: end; }
.chat-panel .chat-bubble {
  max-width: 90%; margin: 0; padding: 8px 12px; white-space: pre-wrap; overflow-wrap: anywhere;
  border: 1px solid var(--chat-line); border-radius: 10px 10px 10px 2px;
  background: white; color: var(--chat-ink); font-size: .94rem;
}
.chat-panel .mine .chat-bubble { border-color: #d7e5d9; border-radius: 10px 10px 2px; background: #e0ebe2; }
.chat-panel .chat-by { margin: 0 0 3px; color: #4d6053; font-size: .74rem; }
.chat-panel .chat-form { margin: 0; padding: 12px 18px 16px; border-top: 1px solid var(--chat-line); background: white; overflow: auto; }
.chat-panel .chat-label { display: block; margin: 0 0 4px; color: #364b3c; font-size: .83rem; font-weight: 600; }
.chat-panel .chat-email-wrap { margin-bottom: 8px; }
.chat-panel textarea, .chat-panel input {
  display: block; width: 100%; min-height: 44px; padding: 9px 11px; margin: 0;
  border: 1px solid #8d9f90; border-radius: 7px;
  background: white; color: #23392a; line-height: 1.4;
}
.chat-panel textarea { height: 66px; resize: none; }
.chat-panel .chat-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 8px; }
#buyer-chat .chat-feedback { flex: 1 1 auto; margin: 0 !important; color: #435448 !important; font-size: .82rem !important; line-height: 1.4 !important; }
.chat-panel .chat-retry { background: transparent; border: 0; padding: 0 3px; color: var(--chat-green); text-decoration: underline; min-height: 44px; }
.chat-panel .chat-send { border: 0; border-radius: 7px; min-height: 44px; padding: 8px 16px; background: var(--chat-green); color: #fff; font-weight: 600; }
.chat-panel .chat-send:disabled { opacity: .55; cursor: default; }
.chat-panel :focus-visible { outline: 2px solid #2e6940; outline-offset: 2px; }
.chat-panel .chat-head :focus-visible { outline-color: white; }
@media (max-width: 540px) {
  .chat-panel {
    inset: auto 0 0; width: 100%; max-width: 100vw; height: min(620px,100dvh);
    border-radius: 16px 16px 0 0; border-bottom: 0;
  }
  .chat-panel .chat-form { padding-bottom: max(12px,env(safe-area-inset-bottom)); }
  .chat-panel :is(input,textarea) { font-size: 16px; }
}
@media (max-height: 500px) {
  .chat-panel { height: 100dvh; inset-block-end: 0; }
  .chat-panel .chat-head { padding-block: 5px; }
  .chat-panel .chat-form { padding-block: 6px; }
  .chat-panel textarea { height: 44px; }
}

html:has(#buyer-chat[open]) { overflow: hidden; }
body.buyer-studio .inquiry-float[data-chat-unread][hidden] { display: block !important; }
.inquiry-float .chat-unread:not([hidden]) {
  display: grid; place-items: center; position: absolute; top: -8px; right: -6px;
  min-width: 20px; height: 20px; padding: 1px 4px; border: 2px solid white;
  border-radius: 12px; color: white; background: #26382b; font-size: 11px; line-height: 1;
}
