.ib-chat {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 120;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #180900;
}

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

.ib-chat-launcher {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  border: 0;
  border-radius: 999px;
  padding: 12px 16px 12px 13px;
  background: linear-gradient(135deg, #ffbd35, #ff6b1a);
  color: #180900;
  box-shadow: 0 18px 48px rgba(24, 9, 0, .34);
  cursor: pointer;
  font-weight: 1000;
}

.ib-chat-launcher-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: #180900;
  color: #ffbd35;
  font-size: 17px;
}

.ib-chat-launcher small {
  display: block;
  color: rgba(24, 9, 0, .72);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.1;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.ib-chat-panel {
  position: absolute;
  right: 0;
  bottom: 72px;
  display: none;
  width: min(390px, calc(100vw - 28px));
  max-height: min(690px, calc(100vh - 104px));
  overflow: hidden;
  padding: 0 !important;
  border: 1px solid rgba(255, 232, 184, .34);
  border-radius: 26px;
  background: #fff8ec;
  box-shadow: 0 28px 80px rgba(24, 9, 0, .42);
}

.ib-chat.open .ib-chat-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}

.ib-chat-head {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(255, 189, 53, .2), transparent 30%),
    linear-gradient(135deg, #180900, #5a170a 58%, #c82618);
  color: #fff8ec;
}

.ib-chat-logo {
  width: 46px;
  height: 46px;
  overflow: hidden;
  border: 1px solid rgba(255, 232, 184, .28);
  border-radius: 16px;
  background: #110700;
}

.ib-chat-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.34);
}

.ib-chat-title {
  min-width: 0;
}

.ib-chat-title strong {
  display: block;
  font-size: 15px;
  line-height: 1.05;
}

.ib-chat-title span {
  display: block;
  margin-top: 4px;
  color: #ffbd35;
  font-size: 11px;
  font-weight: 950;
  line-height: 1.2;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.ib-chat-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 232, 184, .25);
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  color: #fff8ec;
  cursor: pointer;
  font-size: 20px;
}

.ib-chat-quick {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 9px 12px;
  border-bottom: 1px solid rgba(24, 9, 0, .08);
  background: #fff8ec;
}

.ib-chat-body {
  display: grid;
  gap: 12px;
  align-content: start;
  min-height: 236px;
  max-height: 438px;
  overflow: auto;
  padding: 12px 14px 14px;
  background:
    radial-gradient(circle at 16% 0%, rgba(255, 189, 53, .2), transparent 30%),
    linear-gradient(180deg, #fff8ec, #fff0cf);
}

.ib-msg {
  display: grid;
  gap: 8px;
  max-width: 88%;
}

.ib-msg.user {
  justify-self: end;
}

.ib-msg-bubble {
  border-radius: 18px;
  padding: 12px 13px;
  font-size: 14px;
  line-height: 1.42;
  box-shadow: 0 8px 24px rgba(56, 20, 0, .08);
}

.ib-msg.bot .ib-msg-bubble {
  border: 1px solid rgba(24, 9, 0, .08);
  background: #fffdf8;
  color: #321608;
}

.ib-msg.user .ib-msg-bubble {
  background: #180900;
  color: #fff8ec;
}

.ib-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.ib-action,
.ib-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid rgba(24, 9, 0, .1);
  border-radius: 999px;
  background: #fff;
  color: #180900;
  padding: 8px 11px;
  font-size: 12px;
  font-weight: 1000;
  line-height: 1.15;
  text-decoration: none;
  cursor: pointer;
}

.ib-action.primary,
.ib-chip.primary {
  border-color: #ffbd35;
  background: linear-gradient(135deg, #ffbd35, #ff7a1a);
}

.ib-action.dark {
  border-color: #180900;
  background: #180900;
  color: #fff8ec;
}

.ib-chip {
  flex: 0 0 auto;
  white-space: nowrap;
}

.ib-chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid rgba(24, 9, 0, .08);
  background: #fff8ec;
}

.ib-chat-input {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(24, 9, 0, .14);
  border-radius: 16px;
  background: #fffaf0;
  color: #180900;
  padding: 11px 12px;
  font: inherit;
  font-size: 14px;
}

.ib-chat-submit {
  min-width: 78px;
  border: 0;
  border-radius: 16px;
  background: #180900;
  color: #ffbd35;
  padding: 0 14px;
  cursor: pointer;
  font-weight: 1000;
}

@media (max-width: 700px) {
  .ib-chat {
    right: 10px;
    bottom: 10px;
  }

  .ib-chat-launcher {
    min-height: 50px;
    padding: 10px 12px;
  }

  .ib-chat-launcher small {
    display: none;
  }

  .ib-chat-panel {
    right: -2px;
    bottom: 64px;
    width: calc(100vw - 20px);
    max-height: calc(100svh - 88px);
    border-radius: 24px;
  }

  .ib-chat-body {
    min-height: 220px;
    max-height: calc(100svh - 276px);
  }
}
