/* The document and its existing consultation widget share this stylesheet. */
html:has(body[data-customer-standalone]) {
  height: 100%;
  min-height: 0;
  overflow: hidden;
  overscroll-behavior: none;
  background: #f6f7f9;
}

body[data-customer-standalone] {
  position: fixed;
  inset: 0;
  margin: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  overscroll-behavior: none;
  padding: 0;
  color: #17243b;
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Malgun Gothic', sans-serif;
  -webkit-font-smoothing: antialiased;
}

body[data-customer-standalone] .customer-loading {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: min(100%, 410px);
  min-height: 100%;
  margin: 0 auto;
  padding: 24px;
  background: #fff;
  text-align: center;
  font-size: 14px;
  line-height: 1.7;
}

body[data-customer-standalone] .customer-loading[hidden] {
  display: none;
}

body[data-customer-standalone] .customer-loading a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 14px;
  color: #42628a;
  text-underline-offset: 3px;
}

body[data-customer-standalone] .customer-loading a:focus-visible {
  outline: 3px solid #1769e847;
  outline-offset: 3px;
  border-radius: 8px;
}

:host([data-standalone="true"]) {
  display: block;
  width: min(100%, 410px);
  height: 100%;
  min-height: 0;
  margin: 0 auto;
  background: #fff;
}

:host([data-standalone="true"]) .sticky {
  position: static;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  max-width: none;
  margin: 0;
  padding: 24px;
  transform: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

:host([data-standalone="true"]) .standalone-brand {
  margin: 0 0 24px;
  color: #17243b;
  text-align: center;
  font-size: 23px;
  font-weight: 720;
  letter-spacing: -.035em;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

:host([data-standalone="true"]) dialog {
  position: fixed;
  inset: var(--chat-top, 0px) 0 auto;
  width: min(100%, 410px);
  max-width: 100%;
  height: var(--chat-height, 100dvh);
  max-height: var(--chat-height, 100dvh);
  margin: 0 auto;
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: 0 0 0 1px #edf0f3;
}

:host([data-standalone="true"]) dialog::backdrop {
  background: #f6f7f9;
  backdrop-filter: none;
}

@media (max-width: 410px) {
  html:has(body[data-customer-standalone]),
  :host([data-standalone="true"]) dialog::backdrop {
    background: #fff;
  }

  :host([data-standalone="true"]) dialog {
    box-shadow: none;
  }
}
