.ssp-chatbot-root {
  position: fixed;
  left: 18px;
  bottom: 22px;
  z-index: 99999;
  font-family: Inter, Arial, sans-serif;
}

.ssp-chatbot-launcher {
  height: 52px !important;
  width: auto !important;
  min-width: 52px !important;
  padding: 0 18px !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 26px !important;
  background: #1D4ED8 !important;
  color: #fff !important;
  cursor: pointer;
  position: relative;
  box-shadow: 0 14px 28px rgba(29, 78, 216, 0.28);
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0 !important;
  text-decoration: none !important;
}

.ssp-chatbot-launcher:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 18px 32px rgba(29, 78, 216, 0.35);
}

.ssp-chatbot-launcher__ring {
  position: absolute;
  inset: -4px;
  border-radius: 30px;
  background: #1D4ED8;
  opacity: 0.15;
  z-index: 0;
}

.ssp-chatbot-launcher__icon {
  position: relative;
  z-index: 1;
  width: 32px !important;
  height: 32px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #1D4ED8 !important;
  border-radius: 50% !important;
  padding: 3px !important;
  box-sizing: border-box !important;
  flex-shrink: 0 !important;
  color: #ffffff !important;
}

.ssp-chatbot-launcher__text {
  position: relative;
  z-index: 1;
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
}

.ssp-chatbot-launcher__icon svg {
  width: 100%;
  height: 100%;
}

.ssp-chatbot-launcher__icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ssp-chatbot-panel__brand-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ssp-chatbot-launcher__icon svg,
.ssp-chatbot-panel__brand-icon svg {
  width: 100%;
  height: 100%;
}

.ssp-chatbot-launcher__badge {
  position: absolute;
  top: -3px;
  left: -3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: #00c853;
  z-index: 2;
}

.ssp-chatbot-panel {
  width: 360px;
  max-width: calc(100vw - 24px);
  height: 560px;
  max-height: calc(100vh - 110px);
  margin-bottom: 12px;
  background: #fff;
  border: 1px solid #dce6f6;
  border-radius: 16px;
  box-shadow: 0 24px 44px rgba(28, 32, 38, 0.2);
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  overflow: hidden;
}

.ssp-chatbot-panel[hidden] {
  display: none !important;
}

.ssp-chatbot-panel__header {
  background: #202b93;
  color: #fff;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ssp-chatbot-panel__brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ssp-chatbot-panel__brand-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1D4ED8;
  border-radius: 50%;
  padding: 3px;
  color: #ffffff;
}

.ssp-chatbot-panel__brand-icon svg {
  width: 100%;
  height: 100%;
}

.ssp-chatbot-panel__brand small {
  display: block;
  opacity: 0.88;
}

.ssp-chatbot-panel__close {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}

.ssp-chatbot-panel__messages {
  padding: 12px;
  background: #f7fbff;
  overflow-y: auto;
  overflow-x: hidden;
}

.ssp-chatbot-msg {
  margin: 0 0 10px;
  display: flex;
}

.ssp-chatbot-msg--bot {
  justify-content: flex-start;
}

.ssp-chatbot-msg--user {
  justify-content: flex-end;
}

.ssp-chatbot-msg__bubble {
  max-width: 85%;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.ssp-chatbot-msg--bot .ssp-chatbot-msg__bubble {
  background: #fff;
  border: 1px solid #dce6f6;
}

.ssp-chatbot-msg--user .ssp-chatbot-msg__bubble {
  background: #202b93;
  color: #fff;
}

.ssp-chatbot-panel__quick-actions {
  padding: 8px 10px;
  border-top: 1px solid #edf3fc;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  overflow: hidden;
  background: #f9fcff;
}

.ssp-chatbot-quick-btn {
  border: 1px solid #b8d3fb;
  background: linear-gradient(180deg, #ffffff, #f0f7ff);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 600;
  color: #1c2026;
  cursor: pointer;
  white-space: normal;
  flex: 1 1 calc(50% - 8px);
  min-width: 120px;
  text-align: left;
  line-height: 1.3;
}

.ssp-chatbot-quick-btn:hover {
  border-color: #0890f1;
  background: #eaf4ff;
}

#ssp-chatbot-form.ssp-chatbot-panel__input-wrap {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 64px !important;
  column-gap: 6px !important;
  padding: 8px;
  border-top: 1px solid #edf3fc;
  background: #fff;
  align-items: center !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

#ssp-chatbot-input {
  display: block !important;
  border: 1px solid #cfe0fa;
  border-radius: 8px !important;
  padding: 0 10px !important;
  min-width: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  min-height: 38px !important;
  height: 38px !important;
  font-size: 14px;
  line-height: 38px !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

#ssp-chatbot-send {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 0 !important;
  border-radius: 8px !important;
  padding: 0 !important;
  min-width: 64px !important;
  width: 64px !important;
  max-width: 64px !important;
  min-height: 38px !important;
  height: 38px !important;
  background: #0890f1;
  color: #fff;
  font-size: 13px;
  line-height: 38px !important;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  margin: 0 !important;
  box-sizing: border-box !important;
}

.ssp-chatbot-panel__close:hover {
  opacity: 0.85;
}

@media (max-width: 640px) {
  .ssp-chatbot-root {
    left: 10px;
    bottom: 10px;
  }
  .ssp-chatbot-panel {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 90px);
  }
}

@media (max-width: 360px) {
  .ssp-chatbot-root {
    left: 8px;
    right: auto;
    bottom: 8px;
  }

  .ssp-chatbot-launcher {
    max-width: calc(100vw - 16px);
    height: 44px !important;
    padding: 6px 12px 6px 8px !important;
    gap: 8px !important;
  }

  .ssp-chatbot-launcher__icon {
    width: 28px !important;
    height: 28px !important;
  }

  .ssp-chatbot-launcher__label {
    max-width: 145px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
  }

  .ssp-chatbot-panel {
    width: calc(100vw - 16px);
    height: min(460px, calc(100vh - 72px));
    max-height: calc(100vh - 72px);
  }
}
