.site-chat-desktop-trigger {
  position: fixed;
  right: max(22px, env(safe-area-inset-right));
  bottom: max(22px, env(safe-area-inset-bottom));
  z-index: 1035;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  padding: 0;
  border: 1px solid #f4d18c;
  border-radius: 50%;
  background: linear-gradient(140deg, #f3cf85, #c18b48);
  color: #20170d;
  box-shadow: 0 7px 25px rgba(0, 0, 0, .35);
  font-size: 24px;
  cursor: pointer;
}

.page-product.has-sticky-bar .site-chat-desktop-trigger { bottom: 94px; }
.site-chat-desktop-trigger:hover { background: #f3cf85; }
.site-chat-desktop-trigger:focus-visible,
.site-chat-mobile-trigger:focus-visible,
.site-chat-close:focus-visible { outline: 2px solid #f4d18c; outline-offset: 3px; }

.site-chat-mobile-trigger {
  display: flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 9px 13px;
  border: 1px solid #d5aa6b;
  border-radius: 12px;
  background: #f1cb85;
  color: #21180d;
  font: inherit;
  font-size: .85rem;
  font-weight: 800;
  text-align: start;
  cursor: pointer;
}

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

.site-chat-dialog {
  position: fixed;
  inset: 0;
  width: min(680px, calc(100vw - 32px));
  height: min(716px, calc(100dvh - 32px));
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid #ac8452;
  border-radius: 18px;
  background: #171411;
  color: #f8efe2;
  box-shadow: 0 24px 72px rgba(0, 0, 0, .5);
}

.site-chat-dialog:not([open]) { display: none; }
.site-chat-dialog::backdrop { background: rgba(8, 7, 6, .7); }

.site-chat-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
}

.site-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 14px;
  border-bottom: 1px solid #84623c;
}

.site-chat-header h2 {
  margin: 0;
  color: inherit;
  font-size: 1rem;
  line-height: 1.55;
}

.site-chat-close {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  border: 1px solid #84623c;
  border-radius: 10px;
  background: #2b2117;
  color: #f8efe2;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.site-chat-embed {
  min-height: 0;
  background: #fff;
}

.site-chat-embed > div { height: 100% !important; }

/* Preserve the 30px bottom crop from the supplied embed as the dialog resizes. */
.site-chat-embed > div > iframe { height: calc(100% + 30px) !important; }

@media (max-width: 767.98px) {
  .site-chat-desktop-trigger { display: none; }
  .site-chat-dialog {
    width: 100%;
    height: 100dvh;
    border: 0;
    border-radius: 0;
  }
  .site-chat-panel { padding-bottom: env(safe-area-inset-bottom); }
  .site-chat-header { padding-top: calc(8px + env(safe-area-inset-top)); }
}
