.bizchat-launcher {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 120;
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, var(--bizchat-primary, #003b9a), #0877ff);
  box-shadow: 0 18px 42px rgba(0, 59, 154, .28);
  cursor: pointer;
  font-size: 24px;
}

.bizchat-launcher.left {
  left: 24px;
  right: auto;
}

.bizchat-panel {
  position: fixed;
  right: 24px;
  bottom: 88px;
  z-index: 121;
  width: min(340px, calc(100vw - 28px));
  max-height: calc(100dvh - 108px);
  display: none;
  overflow: hidden;
  border: 1px solid #dce6f5;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(0, 31, 92, .2);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
}

.bizchat-panel.left {
  left: 24px;
  right: auto;
}

.bizchat-panel.open {
  display: flex;
  flex-direction: column;
}

.bizchat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--bizchat-primary, #003b9a), #001943);
}

.bizchat-head strong,
.bizchat-head small {
  display: block;
  font-weight: 600;
}

.bizchat-head small {
  color: rgba(255,255,255,.78);
  font-weight: 500;
}

.bizchat-close {
  border: 0;
  color: #fff;
  background: transparent;
  cursor: pointer;
  font-size: 24px;
}

.bizchat-body {
  min-height: 150px;
  max-height: 235px;
  flex: 1 1 auto;
  overflow: auto;
  padding: 12px;
  background: #f7faff;
}

.bizchat-typing {
  padding: 8px 12px 0;
  color: #6b7f9d;
  background: #f7faff;
  font-size: 12px;
  font-style: italic;
}

.bizchat-msg {
  max-width: 86%;
  margin: 0 0 8px;
  padding: 9px 11px;
  border-radius: 12px;
  color: #17315f;
  background: #fff;
  box-shadow: 0 8px 20px rgba(0,31,92,.06);
  font-weight: 400;
}

.bizchat-msg.visitor {
  margin-left: auto;
  color: #fff;
  background: var(--bizchat-primary, #003b9a);
}

.bizchat-msg small {
  display: block;
  margin-top: 4px;
  opacity: .72;
  font-size: 10px;
  font-weight: 400;
}

.bizchat-form {
  display: grid;
  gap: 7px;
  padding: 10px;
  border-top: 1px solid #e4ebf6;
}

.bizchat-form input,
.bizchat-form select,
.bizchat-form textarea {
  width: 100%;
  border: 1px solid #dce6f5;
  border-radius: 10px;
  padding: 9px 10px;
  font: inherit;
  outline: none;
}

.bizchat-form textarea {
  min-height: 58px;
  resize: vertical;
}

.bizchat-actions {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 7px;
  align-items: center;
}

.bizchat-actions button,
.bizchat-upload-label {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  color: #061a44;
  background: var(--bizchat-secondary, #ffcc00);
  cursor: pointer;
  font-weight: 700;
}

.bizchat-end {
  color: #003b9a !important;
  background: #edf4ff !important;
}

.bizchat-upload-label {
  width: 36px;
  background: #edf4ff;
}

.bizchat-upload-label input {
  display: none;
}

.bizchat-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 0 10px 10px;
}

.bizchat-quick button {
  border: 1px solid #dce6f5;
  border-radius: 999px;
  padding: 7px 9px;
  color: #003b9a;
  background: #fff;
  cursor: pointer;
  font-weight: 500;
}

.bizchat-status {
  min-height: 14px;
  margin: 0;
  color: #6b7f9d;
  font-size: 11px;
  font-weight: 500;
}

.bizchat-rating {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-top: 1px solid #e4ebf6;
  text-align: center;
}

.bizchat-rating p {
  margin: 0;
  color: #17315f;
  font-weight: 600;
}

.bizchat-stars {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.bizchat-stars button {
  border: 0;
  color: #f1b800;
  background: transparent;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

@media (max-width: 520px) {
  .bizchat-panel {
    left: 12px;
    right: 12px;
    bottom: 82px;
    width: auto;
    max-height: calc(100dvh - 96px);
  }
}
