.gp-chat {
  position: fixed;
  right: 18px;
  bottom: calc(18px + var(--gp-chat-bottom-offset, 0px));
  z-index: 2147483000;
  font-family: Arial, sans-serif;
  color: #241f19;
}

.gp-chat * {
  box-sizing: border-box;
}

.gp-chat__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  min-width: 154px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 999px;
  background: #173d2a;
  color: #fff;
  padding: 0 18px;
  box-shadow: 0 16px 42px rgba(23, 38, 29, 0.24);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
  cursor: pointer;
}

.gp-chat_obstructed .gp-chat__button {
  width: 58px;
  min-width: 58px;
  padding: 0;
}

.gp-chat_obstructed .gp-chat__button span {
  display: none;
}

.gp-chat_obstructed .gp-chat__button::before {
  content: "Чат";
}

.gp-chat__menu,
.gp-chat__panel {
  display: none;
  border: 1px solid rgba(65, 55, 43, 0.16);
  background: #fbf8f1;
  box-shadow: 0 20px 68px rgba(35, 28, 20, 0.22);
}

.gp-chat__menu {
  width: min(326px, calc(100vw - 24px));
  padding: 12px;
  border-radius: 14px;
}

.gp-chat_menu-open .gp-chat__menu {
  display: grid;
  gap: 9px;
}

.gp-chat__panel {
  width: min(390px, calc(100vw - 24px));
  max-height: min(680px, calc(100vh - 32px));
  overflow: hidden;
  border-radius: 14px;
}

.gp-chat_open .gp-chat__panel {
  display: flex;
  flex-direction: column;
}

.gp-chat_menu-open .gp-chat__button,
.gp-chat_open .gp-chat__button {
  display: none;
}

.gp-chat__menu-head,
.gp-chat__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.gp-chat__menu-head {
  padding: 2px 2px 6px;
}

.gp-chat__eyebrow,
.gp-chat__menu-title,
.gp-chat__title {
  margin: 0;
}

.gp-chat__eyebrow {
  color: #8d7456;
  font-size: 11px;
  line-height: 1.2;
  text-transform: uppercase;
}

.gp-chat__menu-title {
  margin-top: 3px;
  color: #241f19;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
}

.gp-chat__menu-close,
.gp-chat__close {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  cursor: pointer;
}

.gp-chat__menu-close {
  border: 1px solid rgba(65, 55, 43, 0.16);
  background: #fffaf1;
  color: #4c4237;
  font-size: 20px;
  line-height: 1;
}

.gp-chat__choice {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 58px;
  border: 1px solid rgba(65, 55, 43, 0.14);
  border-radius: 12px;
  background: #fffdf8;
  color: #241f19;
  padding: 9px 10px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.gp-chat__choice:hover,
.gp-chat__choice:focus-visible,
.gp-chat__button:focus-visible,
.gp-chat__lead-toggle:focus-visible {
  outline: 2px solid rgba(151, 119, 78, 0.36);
  outline-offset: 2px;
}

.gp-chat__choice-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: #173d2a;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.gp-chat__choice strong {
  display: block;
  font-size: 14px;
  line-height: 1.2;
}

.gp-chat__choice small {
  display: block;
  margin-top: 3px;
  color: #6b6258;
  font-size: 12px;
  line-height: 1.25;
}

.gp-chat__header {
  padding: 14px 14px 12px;
  background: #173d2a;
  color: #fff;
}

.gp-chat__title {
  font-size: 16px;
  line-height: 1.2;
  font-weight: 700;
}

.gp-chat__subtitle {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  line-height: 1.35;
}

.gp-chat__close {
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: transparent;
  color: #fff;
  font-size: 20px;
  line-height: 1;
}

.gp-chat__messages {
  flex: 1;
  min-height: 210px;
  overflow-y: auto;
  padding: 14px;
}

.gp-chat__bubble {
  width: fit-content;
  max-width: 88%;
  margin-bottom: 10px;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.42;
}

.gp-chat__bubble_bot {
  background: #fffdf8;
  border: 1px solid #ece2d4;
}

.gp-chat__bubble_user {
  margin-left: auto;
  background: #173d2a;
  color: #fff;
}

.gp-chat__quick {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 14px 10px;
}

.gp-chat__quick button,
.gp-chat__actions button,
.gp-chat__actions a,
.gp-chat__lead-toggle {
  white-space: nowrap;
  border: 1px solid #d7c9b7;
  border-radius: 999px;
  background: #fffdf8;
  color: #173d2a;
  padding: 8px 10px;
  font-size: 12px;
  text-decoration: none;
  cursor: pointer;
}

.gp-chat__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 14px 10px;
}

.gp-chat__lead-toggle {
  justify-self: start;
  margin: 0 14px 10px;
}

.gp-chat__lead {
  display: grid;
  gap: 8px;
  padding: 0 14px 12px;
}

.gp-chat__lead[hidden] {
  display: none;
}

.gp-chat__lead input {
  width: 100%;
  border: 1px solid #d7c9b7;
  border-radius: 8px;
  background: #fffdf8;
  padding: 10px 11px;
  font-size: 14px;
}

.gp-chat__lead button,
.gp-chat__form button {
  border: 0;
  border-radius: 8px;
  background: #173d2a;
  color: #fff;
  padding: 10px 12px;
  font-weight: 700;
  cursor: pointer;
}

.gp-chat__note {
  color: #6b6258;
  font-size: 11px;
  line-height: 1.35;
}

.gp-chat__form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 12px 14px 14px;
  border-top: 1px solid #ece2d4;
  background: #fffdf8;
}

.gp-chat__form textarea {
  min-height: 42px;
  max-height: 110px;
  resize: vertical;
  border: 1px solid #d7c9b7;
  border-radius: 8px;
  padding: 10px 11px;
  font-size: 14px;
}

.gp-chat_booking {
  bottom: calc(86px + var(--gp-chat-bottom-offset, 0px));
}

@media (max-width: 640px) {
  .gp-chat {
    right: 12px;
    bottom: calc(12px + var(--gp-chat-bottom-offset, 0px));
  }

  .gp-chat_booking {
    bottom: calc(76px + var(--gp-chat-bottom-offset, 0px));
  }

  .gp-chat__button {
    min-width: 128px;
    min-height: 44px;
    padding: 0 14px;
    font-size: 13px;
  }

  .gp-chat__panel {
    width: calc(100vw - 24px);
    max-height: min(620px, calc(100vh - 88px));
  }

  .gp-chat__header {
    padding: 12px;
  }

  .gp-chat__messages {
    min-height: 138px;
    padding: 12px;
  }

  .gp-chat__quick {
    padding: 0 12px 10px;
  }

  .gp-chat__actions {
    padding: 0 12px 10px;
  }

  .gp-chat__lead-toggle {
    margin: 0 12px 10px;
  }

  .gp-chat__lead {
    padding: 0 12px 10px;
  }

  .gp-chat__form {
    grid-template-columns: 1fr;
    padding: 10px 12px 12px;
  }

  .gp-chat__form button {
    min-height: 38px;
  }
}
