.lz-chat-page {
  --lz-chat-main-inline-pad: clamp(20px, 3vw, 42px);
  --lz-chat-main-block-pad: clamp(20px, 3vw, 42px);
  --lz-chat-shell-gutter: max(0px, calc((min(calc(100vw - 32px), 1440px) - var(--lz-content-max)) / 2));
  --lz-chat-bleed: calc(var(--lz-chat-main-inline-pad) + var(--lz-chat-shell-gutter));
  width: calc(100% + var(--lz-chat-bleed) + var(--lz-chat-bleed));
  margin-top: calc(0px - var(--lz-chat-main-block-pad));
  margin-inline: calc(0px - var(--lz-chat-bleed));
  padding: var(--lz-chat-main-block-pad) var(--lz-chat-bleed) 28px;
}

.lz-chat-page-background img {
  filter: saturate(.92) brightness(1.025);
}

.lz-chat-page-background::after {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(252, 249, 241, .2), transparent 13%, transparent 87%, rgba(252, 249, 241, .2)),
    linear-gradient(180deg, rgba(255, 253, 248, .08), transparent 22%, rgba(252, 249, 241, .14));
  content: "";
}

.lz-chat-page .lz-chat-hero h1 {
  letter-spacing: 0;
}

.lz-chat-page .lz-chat-main {
  border-color: rgba(112, 82, 70, .22);
  box-shadow: 0 16px 38px rgba(84, 58, 50, .1), inset 0 1px 0 rgba(255, 255, 255, .74);
}

@media (min-width: 1121px) {
  .lz-chat-page .lz-chat-layout {
    grid-template-columns: minmax(190px, 200px) minmax(560px, 1fr) minmax(210px, 220px);
    gap: 14px;
    height: clamp(540px, calc(100dvh - 290px), 720px);
  }

  .lz-chat-page .lz-chat-sidebar,
  .lz-chat-page .lz-chat-recommendations {
    padding: 14px;
  }
}

@media (max-width: 900px) {
  .lz-chat-page {
    --lz-chat-main-inline-pad: 18px;
    --lz-chat-main-block-pad: 20px;
    --lz-chat-shell-gutter: 0px;
  }
}

.lz-chat-page .lz-emergency-banner {
  margin: 0 0 6px;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: .79rem;
  line-height: 1.45;
}

.lz-chat-page .lz-chat-main > .lz-inline-status {
  margin: 6px 12px 0;
  padding: 7px 10px;
  font-size: .78rem;
  line-height: 1.35;
}

.lz-chat-page .healing-messages {
  padding: 16px 20px;
  scrollbar-gutter: stable;
}

.lz-chat-page .healing-input {
  grid-template-columns: minmax(0, 1fr) 92px;
  gap: 8px;
  align-items: end;
  margin: 0 12px 4px;
  padding: 6px 8px 6px 10px;
  border-radius: 16px;
}

.lz-chat-page .healing-compose {
  display: grid;
  gap: 2px;
}

.lz-chat-page .healing-compose textarea.form-control {
  width: 100%;
  min-height: 38px;
  padding: 6px 7px;
  color: var(--lz-ink);
  line-height: 1.55;
  text-align: left;
}

.lz-chat-page .healing-compose textarea.form-control::placeholder {
  color: #989f9b;
  opacity: 1;
}

.lz-chat-page .healing-tools {
  min-height: 30px;
  padding-inline: 2px;
}

.lz-chat-page .healing-tool-btn {
  min-width: 40px;
  min-height: 30px;
  padding: 0 7px;
  border-radius: 8px;
}

.lz-chat-page .lz-send-button {
  width: 92px;
  min-width: 92px;
  min-height: 44px;
  height: 44px;
  align-self: end;
  padding-inline: 14px;
  border-radius: 12px;
}

.lz-composer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2px 10px;
  margin: 0 14px 5px;
  color: var(--lz-muted);
  text-align: center;
}

.lz-composer-disclosure,
.lz-chat-page .lz-composer-hint {
  margin: 0;
  font-size: .72rem;
  line-height: 1.5;
}

.lz-composer-disclosure {
  color: #777f7b;
  font-size: .68rem;
}

.lz-chat-page .lz-composer-hint {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 640px) {
  .lz-chat-page {
    padding-bottom: 18px;
  }

  .lz-chat-page .healing-input {
    right: max(18px, env(safe-area-inset-right));
    left: max(18px, env(safe-area-inset-left));
  }

  .lz-chat-page .lz-chat-main {
    height: 420px;
    min-height: 420px;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .lz-chat-page .lz-chat-main > .alert-danger {
    padding: 10px 12px;
    font-size: .9rem;
    line-height: 1.55;
  }

  .lz-chat-page .healing-messages {
    padding: 16px 13px;
  }

  .lz-chat-page .healing-input {
    grid-template-columns: minmax(0, 1fr) 48px;
    gap: 6px;
    margin: 0;
    padding: 5px;
    border-radius: 18px;
  }

  .lz-chat-page .healing-compose {
    grid-template-columns: minmax(0, 1fr) 38px;
    gap: 4px;
    align-items: center;
  }

  .lz-chat-page .healing-compose textarea.form-control {
    grid-column: 1;
    grid-row: 1;
    min-height: 40px;
    padding: 8px 7px;
  }

  .lz-chat-page .healing-tools {
    position: relative;
    grid-column: 2;
    grid-row: 1;
    width: 38px;
    min-height: 40px;
    flex-wrap: nowrap;
    padding: 0;
  }

  .lz-chat-page .healing-tool-btn {
    min-width: 38px;
    width: 38px;
    min-height: 38px;
    height: 38px;
    padding: 0;
  }

  .lz-chat-page .healing-attach-preview {
    position: absolute;
    right: 0;
    bottom: calc(100% + 16px);
    width: min(240px, calc(100vw - 84px));
    max-width: none;
    gap: 5px;
    padding: 3px 4px 3px 6px;
    background: rgba(255, 253, 248, .98);
    box-shadow: 0 10px 26px rgba(53, 65, 59, .13);
  }

  .lz-chat-page .healing-attach-preview img {
    width: 28px;
    height: 28px;
    border-radius: 7px;
  }

  .lz-chat-page .healing-attach-preview button {
    min-width: 30px;
    min-height: 30px;
  }

  .lz-chat-page .lz-send-button {
    width: 46px;
    min-width: 46px;
    min-height: 46px;
    height: 46px;
    padding: 0;
    border-radius: 14px;
  }

  .lz-composer-meta {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
}
