.yazuz-chat {
  position: fixed;
  z-index: 2147483000;
  bottom: 20px;
  display: grid;
  justify-items: end;
  gap: 12px;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.4;
}

.yazuz-chat,
.yazuz-chat * {
  box-sizing: border-box;
}

.yazuz-chat--right {
  right: 20px;
}
.yazuz-chat--left {
  left: 20px;
  justify-items: start;
}

.yazuz-chat__launcher,
.yazuz-chat__more,
.yazuz-chat__mic,
.yazuz-chat__send,
.yazuz-chat__header {
  color: var(--yazuz-chat-text);
  background: var(--yazuz-chat-color);
}

.yazuz-chat__launcher {
  min-height: 48px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  box-shadow: 0 8px 30px rgb(0 0 0 / 20%);
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
}

.yazuz-chat__launcher-label {
  margin-inline-start: 7px;
}

.yazuz-chat__launcher[aria-expanded="true"] {
  display: none;
}

.yazuz-chat__panel {
  display: grid;
  grid-template-rows: auto minmax(220px, 1fr) minmax(0, auto) auto;
  min-width: 0;
  max-width: calc(100vw - 40px);
  width: min(520px, calc(100vw - 40px));
  height: min(720px, calc(100dvh - 40px));
  overflow: hidden;
  overscroll-behavior: contain;
  border: 1px solid rgb(0 0 0 / 12%);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 60px rgb(0 0 0 / 24%);
}

.yazuz-chat__panel[hidden] {
  display: none;
}

.yazuz-chat__panel:has(.yazuz-chat__order-form:not([hidden])) {
  grid-template-rows: auto minmax(160px, 1fr) minmax(0, auto) auto;
}

.yazuz-chat__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 12px 16px;
}

.yazuz-chat__header .yazuz-chat__profile {
  display: flex;
  flex: 1 1 auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  overflow: hidden;
}

.yazuz-chat__profile-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.yazuz-chat__avatar {
  position: relative;
  display: block;
  width: 44px;
  min-width: 44px;
  height: 44px;
}

.yazuz-chat__avatar img {
  width: 44px;
  height: 44px;
  border: 2px solid rgb(255 255 255 / 82%);
  border-radius: 50%;
  background: #fff;
  object-fit: contain;
}

.yazuz-chat__online {
  position: absolute;
  right: -1px;
  bottom: 1px;
  width: 11px;
  height: 11px;
  border: 2px solid var(--yazuz-chat-color);
  border-radius: 50%;
  background: #36c275;
}

.yazuz-chat__header strong {
  font-size: 17px;
  line-height: 1.25;
}
.yazuz-chat__profile-copy > span {
  font-size: 12px;
  opacity: 0.85;
}

.yazuz-chat__header-actions {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
  align-items: center;
}

.yazuz-chat__more,
.yazuz-chat__voice-toggle,
.yazuz-chat__close {
  display: inline-grid;
  width: 40px;
  min-width: 40px;
  max-width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: inherit;
  background: rgb(255 255 255 / 14%);
  cursor: pointer;
  font: inherit;
  line-height: 1;
  appearance: none;
}

.yazuz-chat__voice-toggle[hidden] {
  display: none;
}

.yazuz-chat__voice-toggle[aria-pressed="true"] {
  background: rgb(0 0 0 / 22%);
}

.yazuz-chat__icon {
  width: 21px;
  height: 21px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.yazuz-chat__icon--dots {
  fill: currentColor;
  stroke: none;
}

.yazuz-chat__voice-slash {
  display: none;
  stroke-width: 2.4;
}

.yazuz-chat__voice-toggle[aria-pressed="true"] .yazuz-chat__voice-slash {
  display: block;
}

.yazuz-chat__menu {
  position: absolute;
  z-index: 3;
  top: 46px;
  right: 44px;
  width: 190px;
  padding: 6px;
  border: 1px solid rgb(0 0 0 / 12%);
  border-radius: 12px;
  color: #202223;
  background: #fff;
  box-shadow: 0 10px 30px rgb(0 0 0 / 22%);
}

.yazuz-chat__menu[hidden] {
  display: none;
}

.yazuz-chat__menu button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  color: #202223;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  text-align: left;
}

.yazuz-chat__menu button:hover {
  background: #f1f1ef;
}

.yazuz-chat__messages {
  min-height: 0;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  padding: 16px;
  background: #f7f7f5;
}

.yazuz-chat__message {
  width: fit-content;
  max-width: 85%;
  margin: 0 0 12px;
  padding: 10px 13px;
  border-radius: 14px;
  color: #202223;
  background: #fff;
  box-shadow: 0 1px 2px rgb(0 0 0 / 8%);
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.yazuz-chat__message--user {
  margin-inline-start: auto;
  color: var(--yazuz-chat-text);
  background: var(--yazuz-chat-color);
}

.yazuz-chat__suggestions {
  display: flex;
  width: 100%;
  min-width: 0;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
  margin: 4px 0 14px;
}

.yazuz-chat__suggestions[hidden] {
  display: none;
}

.yazuz-chat__suggestions button {
  min-width: 0;
  max-width: 86%;
  padding: 10px 13px;
  border: 0;
  border-radius: 14px;
  color: var(--yazuz-chat-text);
  background: var(--yazuz-chat-color);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  line-height: 1.35;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
}

.yazuz-chat__suggestions button:hover {
  filter: brightness(1.08);
}

.yazuz-chat__products {
  display: grid;
  gap: 10px;
  margin: 0 0 14px;
}

.yazuz-chat__product {
  display: grid;
  gap: 10px;
  padding: 9px;
  border: 1px solid rgb(0 0 0 / 12%);
  border-radius: 12px;
  color: #202223;
  background: #fff;
}

.yazuz-chat__product:hover {
  border-color: var(--yazuz-chat-color);
}

.yazuz-chat__product-main {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 10px;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.yazuz-chat__product img {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
}

.yazuz-chat__product-details {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.yazuz-chat__product-details strong {
  font-size: 13px;
  line-height: 1.25;
}
.yazuz-chat__product-details span {
  font-size: 13px;
  color: #616161;
}

.yazuz-chat__product-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.yazuz-chat__product-actions select,
.yazuz-chat__product-actions button {
  min-width: 0;
  min-height: 36px;
  border: 1px solid rgb(0 0 0 / 20%);
  border-radius: 9px;
  background: #fff;
  font: inherit;
}

.yazuz-chat__product-actions select {
  padding: 6px 28px 6px 8px;
}

.yazuz-chat__product-actions button {
  padding: 6px 12px;
  border-color: var(--yazuz-chat-color);
  color: #fff;
  background: var(--yazuz-chat-color);
  cursor: pointer;
  font-weight: 700;
}

.yazuz-chat__product-actions button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.yazuz-chat__size-start {
  width: calc(100% - 20px);
  min-height: 38px;
  margin: 0 10px 10px;
  padding: 7px 12px;
  border: 0;
  border-radius: 8px;
  color: var(--yazuz-chat-text);
  background: var(--yazuz-chat-color);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
}

.yazuz-chat__size-start:hover {
  filter: brightness(1.08);
}

.yazuz-chat__collections {
  display: grid;
  gap: 8px;
  margin: 0 0 14px;
}

.yazuz-chat__collection {
  display: block;
  padding: 12px 14px;
  border: 1px solid var(--yazuz-chat-color);
  border-radius: 12px;
  color: var(--yazuz-chat-color);
  background: #fff;
  font-weight: 700;
  text-decoration: none;
}

.yazuz-chat__collection::after {
  content: " →";
}

.yazuz-chat__contact-form,
.yazuz-chat__order-form {
  max-height: 220px;
  overflow-y: auto;
  padding: 12px 16px 14px;
  border-top: 1px solid rgb(0 0 0 / 10%);
  background: #f7f7f5;
}

.yazuz-chat__order-form {
  max-height: 270px;
}

.yazuz-chat__contact-form[hidden],
.yazuz-chat__order-form[hidden] {
  display: none;
}

.yazuz-chat__form-intro {
  margin: 0 0 10px;
  color: #202223;
  font-size: 14px;
  line-height: 1.4;
}

.yazuz-chat__contact-form > label:not(.yazuz-chat__consent),
.yazuz-chat__order-form > label {
  display: block;
  margin: 8px 0 4px;
  color: #202223;
  font-size: 12px;
  font-weight: 700;
}

.yazuz-chat__contact-form > input,
.yazuz-chat__order-form > input {
  width: 100%;
  min-height: 42px;
  padding: 8px 11px;
  border: 1px solid #8c9196;
  border-radius: 10px;
  color: #202223;
  background: #fff;
  font: inherit;
  font-size: 16px;
  box-sizing: border-box;
}

.yazuz-chat__consent {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: start;
  margin: 12px 0;
  color: #4a4a4a;
  font-size: 12px;
  line-height: 1.35;
}

.yazuz-chat__consent input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.yazuz-chat__contact-submit,
.yazuz-chat__order-submit {
  min-height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  color: var(--yazuz-chat-text);
  background: var(--yazuz-chat-color);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.yazuz-chat__contact-submit:disabled,
.yazuz-chat__order-submit:disabled {
  cursor: wait;
  opacity: 0.65;
}

.yazuz-chat__order-submit {
  width: 100%;
  margin-top: 12px;
}

.yazuz-chat__form {
  padding: 12px;
  background: #fff;
}

.yazuz-chat__request-help {
  display: block;
  width: fit-content;
  margin: 0 0 9px;
  padding: 0;
  border: 0;
  color: var(--yazuz-chat-color);
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.yazuz-chat__request-help:hover {
  filter: brightness(0.82);
}

.yazuz-chat__label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.yazuz-chat__composer {
  display: flex;
  width: 100%;
  min-width: 0;
  gap: 8px;
}

.yazuz-chat__attach {
  display: inline-grid;
  width: 44px;
  min-width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  border: 1px solid #8c9196;
  border-radius: 10px;
  color: var(--yazuz-chat-color);
  background: #fff;
  cursor: pointer;
}

.yazuz-chat__attachment-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 8px;
  padding: 7px 9px;
  border: 1px solid rgb(0 0 0 / 14%);
  border-radius: 9px;
  color: #202223;
  background: #f7f7f5;
  font-size: 12px;
}

.yazuz-chat__attachment-status[hidden] {
  display: none;
}

.yazuz-chat__attachment-status span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.yazuz-chat__attachment-status button {
  width: 24px;
  min-width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #202223;
  background: #e4e5e7;
  cursor: pointer;
  font: inherit;
  font-size: 18px;
  line-height: 1;
}

.yazuz-chat__input {
  width: 0;
  min-width: 0;
  max-width: 100%;
  flex: 1 1 0;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid #8c9196;
  border-radius: 10px;
  color: #202223;
  background: #fff;
  font: inherit;
  font-size: 16px;
}

.yazuz-chat__mic {
  display: inline-grid;
  width: 44px;
  min-width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 10px;
  color: var(--yazuz-chat-text);
  cursor: pointer;
  line-height: 1;
  appearance: none;
}

.yazuz-chat__mic[hidden] {
  display: none;
}

.yazuz-chat__mic[aria-pressed="true"] {
  animation: yazuz-chat-listening 1.2s ease-in-out infinite;
  box-shadow: 0 0 0 4px rgb(11 107 88 / 18%);
}

.yazuz-chat__voice-status {
  margin: 8px 2px 0;
  color: #4a4a4a;
  font-size: 12px;
  line-height: 1.35;
}

.yazuz-chat__voice-status[hidden] {
  display: none;
}

.yazuz-chat__speak-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 8px 2px 0;
  color: #596764;
  font-size: 12px;
  line-height: 1.35;
  cursor: pointer;
}

.yazuz-chat__speak-toggle[hidden] {
  display: none;
}

.yazuz-chat__speak-toggle input {
  margin: 0;
  accent-color: var(--yazuz-chat-color);
}

.yazuz-chat__send {
  width: auto;
  min-width: 0;
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
}

.yazuz-chat__send:disabled {
  cursor: wait;
  opacity: 0.65;
}

.yazuz-chat__size-chart {
  margin: 8px 0 12px;
  color: #202223;
}

.yazuz-chat__size-chart figcaption {
  margin-bottom: 6px;
  font-weight: 700;
}

.yazuz-chat__size-chart-scroll {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid #d2d5d8;
  border-radius: 10px;
}

.yazuz-chat__size-chart table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 12px;
  white-space: nowrap;
}

.yazuz-chat__size-chart th,
.yazuz-chat__size-chart td {
  padding: 7px 9px;
  border: 1px solid #e1e3e5;
  text-align: left;
}

.yazuz-chat__size-chart th {
  background: #f6f6f7;
  font-weight: 700;
}

.yazuz-chat__size-recommendation {
  margin: 8px 0 12px;
}

.yazuz-chat__size-recommendation button {
  min-height: 42px;
  padding: 8px 14px;
  border: 0;
  border-radius: 10px;
  color: var(--yazuz-chat-text);
  background: var(--yazuz-chat-color);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.yazuz-chat__size-recommendation button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.yazuz-chat :focus-visible {
  outline: 3px solid #005bd3;
  outline-offset: 2px;
}

.yazuz-chat[data-yazuz-keyboard-open] {
  top: calc(var(--yazuz-chat-viewport-top, 0px) + 8px);
  bottom: auto;
  height: calc(var(--yazuz-chat-viewport-height, 100dvh) - 16px);
  align-content: end;
}

.yazuz-chat[data-yazuz-keyboard-open] .yazuz-chat__panel {
  height: 100%;
  max-height: 100%;
}

@media (max-width: 480px) {
  .yazuz-chat {
    right: 12px;
    bottom: 12px;
    left: 12px;
  }
  .yazuz-chat__panel {
    grid-template-rows: auto minmax(0, 1fr) minmax(0, auto) auto;
    width: 100%;
    max-width: 100%;
    height: min(720px, calc(100dvh - 24px));
  }
  .yazuz-chat__launcher {
    margin-inline-start: auto;
  }
  .yazuz-chat__header {
    padding: 10px 12px;
  }
  .yazuz-chat__avatar,
  .yazuz-chat__avatar img {
    width: 38px;
    min-width: 38px;
    height: 38px;
  }
  .yazuz-chat__header strong {
    font-size: 15px;
  }
  .yazuz-chat__more,
  .yazuz-chat__voice-toggle,
  .yazuz-chat__close {
    width: 36px;
    min-width: 36px;
    max-width: 36px;
    height: 36px;
    flex-basis: 36px;
  }
  .yazuz-chat__messages {
    padding: 12px;
  }
  .yazuz-chat__message {
    margin-bottom: 8px;
    padding: 8px 11px;
  }
  .yazuz-chat__contact-form,
  .yazuz-chat__order-form {
    padding: 10px 12px 12px;
  }
  .yazuz-chat__contact-form {
    max-height: 200px;
  }
  .yazuz-chat__order-form {
    max-height: 250px;
  }
  .yazuz-chat__form {
    min-width: 0;
    padding: 10px;
  }
  .yazuz-chat__composer {
    gap: 6px;
  }
  .yazuz-chat__attach,
  .yazuz-chat__mic {
    width: 40px;
    min-width: 40px;
  }
  .yazuz-chat__send {
    padding-inline: 10px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .yazuz-chat__panel {
    view-transition-name: yazuz-chat-panel;
  }

  @keyframes yazuz-chat-listening {
    50% {
      transform: scale(1.06);
    }
  }
}
