.alias-public-chat {
  position: fixed;
  z-index: 3500;
  right: calc(20px + env(safe-area-inset-right, 0px));
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  color: #f3e9dc;
  font-family: "Archivo", sans-serif;
  text-transform: none;
}

.alias-public-chat *,
.alias-public-chat *::before,
.alias-public-chat *::after {
  box-sizing: border-box;
}

.alias-public-chat__launcher {
  display: flex;
  min-height: 52px;
  align-items: center;
  gap: 10px;
  padding: 0 17px;
  border: 1px solid #e46b32;
  border-radius: 999px;
  background: #1a110e;
  color: #f3e9dc;
  box-shadow: 0 14px 40px #0008;
  font: 500 13px/1 "Archivo", sans-serif;
  letter-spacing: .04em;
  cursor: pointer;
}

.alias-public-chat__launcher:hover {
  background: #2a1912;
}

.alias-public-chat__launcher-icon {
  position: relative;
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 1px solid #65402f;
  border-radius: 50%;
  color: #db8055;
  font: 22px/1 "Archivo", sans-serif;
}

.alias-public-chat__launcher-icon::before {
  width: 12px;
  height: 9px;
  border: 1.5px solid #db8055;
  border-radius: 4px;
  content: "";
}

.alias-public-chat__launcher-icon::after {
  position: absolute;
  right: 5px;
  bottom: 5px;
  width: 4px;
  height: 4px;
  border-bottom: 1.5px solid #db8055;
  transform: skew(-35deg);
  content: "";
}

.alias-public-chat__launcher.is-open .alias-public-chat__launcher-icon::before,
.alias-public-chat__launcher.is-open .alias-public-chat__launcher-icon::after {
  display: none;
}

.alias-public-chat__launcher i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #e46b32;
  box-shadow: 0 0 0 4px #e46b3225;
}

.alias-public-chat__reserve-shortcut {
  position: absolute;
  right: 2px;
  bottom: 62px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 10px;
  border: 1px solid #62412f;
  background: #160f0c;
  color: #c99a7c;
  font: 9px/1.2 "JetBrains Mono", monospace;
  letter-spacing: .13em;
  text-decoration: none;
}

.alias-public-chat__reserve-shortcut:hover,
.alias-public-chat__booking:hover {
  color: #f3e9dc;
}

.alias-public-chat__panel {
  position: absolute;
  right: 0;
  bottom: 66px;
  display: flex;
  width: min(390px, calc(100vw - 28px));
  height: min(610px, calc(100dvh - 112px));
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #8b5541;
  background: #110d0b;
  box-shadow: 0 24px 80px #000b;
}

.alias-public-chat__panel[hidden],
.alias-public-chat__profile[hidden],
.alias-public-chat__composer[hidden],
.alias-public-chat__reserve-shortcut[hidden] {
  display: none;
}

.alias-public-chat__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 22px 21px 17px;
  border-bottom: 1px solid #38241d;
  background: linear-gradient(115deg, #23140f, #110d0b 75%);
}

.alias-public-chat__kicker {
  color: #c98663;
  font: 10px/1.3 "JetBrains Mono", monospace;
  letter-spacing: .13em;
}

.alias-public-chat__head h2 {
  margin: 8px 0 3px;
  color: #f3e9dc;
  font: 26px/1.1 "Anton", sans-serif;
  letter-spacing: .025em;
}

.alias-public-chat__head p {
  margin: 0;
  color: #a99b90;
  font: 12px/1.5 "Archivo", sans-serif;
}

.alias-public-chat__close {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid #604032;
  background: transparent;
  color: #e9d9ca;
  font: 26px/1 "Archivo", sans-serif;
  cursor: pointer;
}

.alias-public-chat__content {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  padding: 15px 15px 18px;
}

.alias-public-chat__notice {
  padding: 10px 12px;
  border-left: 2px solid #b9572b;
  background: #211510;
  color: #c9b8a9;
  font: 12px/1.55 "Archivo", sans-serif;
}

.alias-public-chat__retry {
  margin-left: 5px;
  border: 0;
  background: transparent;
  color: #e49b73;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.alias-public-chat__messages {
  display: flex;
  min-height: 1px;
  flex-direction: column;
  gap: 12px;
}

.alias-public-chat__message {
  max-width: 88%;
  padding: 11px 13px;
  color: #eee0d1;
  font: 13px/1.55 "Archivo", sans-serif;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.alias-public-chat__message.assistant {
  align-self: flex-start;
  border: 1px solid #382820;
  background: #1b1411;
}

.alias-public-chat__message.user {
  align-self: flex-end;
  background: #9f4827;
  color: #fff1e4;
}

.alias-public-chat__pending {
  display: flex;
  align-self: flex-start;
  gap: 5px;
  padding: 12px 14px;
  border: 1px solid #382820;
}

.alias-public-chat__pending i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #cf7448;
  animation: alias-public-chat-dot 1s infinite ease-in-out;
}

.alias-public-chat__pending i:nth-child(2) { animation-delay: .14s; }
.alias-public-chat__pending i:nth-child(3) { animation-delay: .28s; }

@keyframes alias-public-chat-dot {
  0%, 80%, 100% { opacity: .35; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-3px); }
}

.alias-public-chat__profile {
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid #473127;
  background: #18110e;
}

.alias-public-chat__profile p {
  margin: 0;
  color: #b7a79a;
  font: 11px/1.5 "Archivo", sans-serif;
}

.alias-public-chat__profile input:not([type="checkbox"]) {
  width: 100%;
  height: 39px;
  padding: 0 11px;
  border: 1px solid #49362c;
  border-radius: 0;
  outline: none;
  background: #0e0b09;
  color: #f3e9dc;
  font: 12px "Archivo", sans-serif;
}

.alias-public-chat__profile input:focus {
  border-color: #b85a31;
}

.alias-public-chat__profile label {
  display: grid;
  gap: 6px;
  color: #baa99b;
  font: 11px/1.4 "Archivo", sans-serif;
}

.alias-public-chat__profile label input[type="date"] {
  color-scheme: dark;
}

.alias-public-chat__profile .alias-public-chat__consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.alias-public-chat__consent input {
  margin: 2px 0 0;
  accent-color: #c75c30;
}

.alias-public-chat__continue {
  height: 39px;
  border: 0;
  background: #bc5b32;
  color: #fff4e8;
  font: 12px "JetBrains Mono", monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
}

.alias-public-chat__continue:disabled,
.alias-public-chat__composer button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.alias-public-chat__error {
  margin: 0;
  color: #ef987d;
  font: 11px/1.5 "Archivo", sans-serif;
}

.alias-public-chat__reservation {
  display: grid;
  width: 100%;
  gap: 10px;
  padding: 13px;
  border: 1px solid #684832;
  background: #1b130f;
}

.alias-public-chat__form-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.alias-public-chat__form-head > div > span {
  color: #d18b69;
  font: 9px/1.3 "JetBrains Mono", monospace;
  letter-spacing: .12em;
}

.alias-public-chat__form-head h3 {
  margin: 4px 0 0;
  color: #f3e9dc;
  font: 18px/1.15 "Anton", sans-serif;
  letter-spacing: .02em;
}

.alias-public-chat__form-close {
  width: 28px;
  height: 28px;
  border: 1px solid #604032;
  background: transparent;
  color: #e9d9ca;
  font: 21px/1 "Archivo", sans-serif;
  cursor: pointer;
}

.alias-public-chat__form-note,
.alias-public-chat__form-help,
.alias-public-chat__form-pending {
  margin: 0;
  color: #b7a79a;
  font: 10px/1.5 "Archivo", sans-serif;
}

.alias-public-chat__form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 9px;
}

.alias-public-chat__form-field {
  display: grid;
  min-width: 0;
  gap: 5px;
  color: #cbb9aa;
  font: 10px/1.3 "Archivo", sans-serif;
}

.alias-public-chat__form-field:nth-child(3),
.alias-public-chat__form-field:nth-child(8),
.alias-public-chat__form-field:nth-child(9) {
  grid-column: 1 / -1;
}

.alias-public-chat__form-field input,
.alias-public-chat__form-field select {
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 0 8px;
  border: 1px solid #49362c;
  border-radius: 0;
  outline: none;
  background: #0e0b09;
  color: #f3e9dc;
  color-scheme: dark;
  font: 11px "Archivo", sans-serif;
}

.alias-public-chat__form-field input:focus,
.alias-public-chat__form-field select:focus {
  border-color: #b85a31;
}

.alias-public-chat__form-pending {
  padding: 9px;
  border-left: 2px solid #b9572b;
  background: #211510;
  color: #d2bdac;
}

.alias-public-chat__form-consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: #b7a79a;
  font: 10px/1.5 "Archivo", sans-serif;
}

.alias-public-chat__form-consent input {
  margin: 2px 0 0;
  accent-color: #c75c30;
}

.alias-public-chat__form-error {
  margin: 0;
  color: #ef987d;
  font: 11px/1.5 "Archivo", sans-serif;
}

.alias-public-chat__form-submit,
.alias-public-chat__payment button,
.alias-public-chat__payment a {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid #b9572b;
  background: #b9572b;
  color: #fff2e5;
  font: 10px "JetBrains Mono", monospace;
  text-decoration: none;
  cursor: pointer;
}

.alias-public-chat__form-submit:disabled,
.alias-public-chat__payment button:disabled {
  opacity: .55;
  cursor: wait;
}

.alias-public-chat__payment {
  display: grid;
  max-width: 88%;
  gap: 9px;
  padding: 12px;
  border: 1px solid #684832;
  background: #20150f;
  color: #eee0d1;
}

.alias-public-chat__payment p {
  margin: 0;
  font: 11px/1.5 "Archivo", sans-serif;
}

.alias-public-chat__composer {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 13px;
  border-top: 1px solid #38241d;
}

.alias-public-chat__composer textarea {
  min-height: 41px;
  max-height: 100px;
  flex: 1;
  resize: none;
  padding: 11px 12px;
  border: 1px solid #473127;
  border-radius: 0;
  outline: none;
  background: #0b0908;
  color: #f3e9dc;
  font: 13px/1.35 "Archivo", sans-serif;
}

.alias-public-chat__composer textarea:focus {
  border-color: #b85a31;
}

.alias-public-chat__composer button {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border: 0;
  background: #b9572b;
  color: #fff2e5;
  font: 24px/1 "Archivo", sans-serif;
  cursor: pointer;
}

.alias-public-chat__booking {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 15px 12px;
  border-top: 1px solid #2d201a;
  color: #c88767;
  font: 10px/1.4 "JetBrains Mono", monospace;
  letter-spacing: .04em;
  text-decoration: none;
}

@media (max-width: 520px) {
  .alias-public-chat {
    right: calc(13px + env(safe-area-inset-right, 0px));
    bottom: calc(13px + env(safe-area-inset-bottom, 0px));
  }

  .alias-public-chat__panel {
    right: -1px;
    bottom: 63px;
    height: min(610px, calc(100dvh - 104px));
  }

  .alias-public-chat__form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .alias-public-chat__form-field:nth-child(n) {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .alias-public-chat__pending i { animation: none; }
}
