.sybel-ai-chat {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 80;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.sybel-ai-chat__toggle {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff4a24, #ffb22e);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 18px 45px rgba(74, 18, 9, 0.2);
}

.sybel-ai-chat__toggle span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.5);
  font-weight: 900;
}

.sybel-ai-chat__panel {
  position: absolute;
  right: 0;
  bottom: 78px;
  display: none;
  width: min(380px, calc(100vw - 32px));
  overflow: hidden;
  border: 1px solid #f0ddd3;
  border-radius: 8px;
  background: #fffaf6;
  box-shadow: 0 18px 45px rgba(74, 18, 9, 0.18);
}

.sybel-ai-chat.is-open .sybel-ai-chat__panel {
  display: block;
}

.sybel-ai-chat__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  background: linear-gradient(135deg, #fff7ef, #ffffff);
  border-bottom: 1px solid #f0ddd3;
}

.sybel-ai-chat__header strong,
.sybel-ai-chat__header span {
  display: block;
}

.sybel-ai-chat__header strong {
  color: #201416;
}

.sybel-ai-chat__header span {
  color: #74656a;
  font-size: 0.82rem;
}

.sybel-ai-chat__close {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 74, 36, 0.24);
  border-radius: 50%;
  background: #fff;
  color: #ff4a24;
  cursor: pointer;
  font-weight: 900;
}

.sybel-ai-chat__messages {
  display: grid;
  gap: 10px;
  max-height: 360px;
  padding: 16px;
  overflow-y: auto;
  background: #fff;
}

.sybel-ai-chat__message {
  max-width: 88%;
  padding: 11px 13px;
  border-radius: 8px;
  color: #201416;
  font-size: 0.92rem;
  line-height: 1.45;
}

.sybel-ai-chat__message--assistant {
  justify-self: start;
  background: #fff0df;
}

.sybel-ai-chat__message--user {
  justify-self: end;
  background: #ff4a24;
  color: #fff;
}

.sybel-ai-chat__form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 14px;
  border-top: 1px solid #f0ddd3;
  background: #fffaf6;
}

.sybel-ai-chat__form textarea {
  min-height: 46px;
  max-height: 120px;
  resize: vertical;
  border: 1px solid #f0ddd3;
  border-radius: 8px;
  padding: 10px 12px;
  color: #201416;
  font: inherit;
}

.sybel-ai-chat__form button {
  align-self: end;
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  background: #ff4a24;
  color: #fff;
  cursor: pointer;
  font-weight: 900;
}

.sybel-ai-chat__form button:disabled {
  cursor: wait;
  opacity: 0.7;
}

@media (max-width: 560px) {
  .sybel-ai-chat {
    right: 14px;
    bottom: 14px;
  }

  .sybel-ai-chat__panel {
    right: -2px;
    width: calc(100vw - 28px);
  }
}
