#lhd-widget,
#lhd-widget * {
  box-sizing: border-box;
}

#lhd-widget {
  --lhd-green: #9ccb2f;
  --lhd-green-dark: #89b628;
  --lhd-text: #3f472f;
  --lhd-text-soft: #5f6875;
  --lhd-navy: #061835;
  --lhd-white: #ffffff;
  --lhd-light: #f7f8fa;
  --lhd-border: #dde3ea;
  --lhd-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
  font-family: Arial, sans-serif;
}

/* toggle */
#lhd-widget .lhd-toggle-btn {
  position: fixed;
  right: 33px;
  bottom: 33px;
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 50%;
  padding: 0;
  margin: 0;
  background: var(--lhd-green) !important;
  background-image: none !important;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
  z-index: 100050;
  transition: transform 0.2s ease, background 0.2s ease;
}

#lhd-widget .lhd-toggle-btn:hover,
#lhd-widget .lhd-toggle-btn:focus {
  background: var(--lhd-green-dark) !important;
  outline: none;
  transform: scale(1.03);
}

#lhd-widget .lhd-toggle-btn svg {
  width: 21px;
  height: 21px;
  fill: #fff;
  display: block;
  pointer-events: none;
}

/* popup */
#lhd-widget .lhd-popup {
  position: fixed;
  right: 16px;
  bottom: 78px;
  width: 310px;
  max-width: calc(100vw - 24px);
  background: #fff;
  border: 1px solid #edf0f3;
  border-radius: 16px;
  box-shadow: var(--lhd-shadow);
  overflow: hidden;
  z-index: 100040;
}

#lhd-widget .lhd-hidden {
  display: none !important;
}

/* header */
#lhd-widget .lhd-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 14px;
  background: var(--lhd-green);
  color: #fff;
}

#lhd-widget .lhd-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
}

#lhd-widget .lhd-close-btn {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  padding: 0;
  margin: 0;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

#lhd-widget .lhd-close-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* body */
#lhd-widget .lhd-body {
  padding: 14px;
  background: #fff;
}

#lhd-widget .lhd-greet,
#lhd-widget .lhd-desc {
  margin: 0 0 10px 0;
  color: var(--lhd-text-soft);
  font-size: 13px;
  line-height: 1.5;
}

#lhd-widget .lhd-greet strong {
  color: var(--lhd-text);
  font-size: 16px;
  font-weight: 700;
}

/* option buttons */
#lhd-widget .lhd-option-btn {
  display: block;
  width: 100%;
  text-align: center;
  text-decoration: none;
  border: 1px solid var(--lhd-border);
  border-radius: 11px;
  padding: 11px 12px;
  margin: 0 0 9px 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: none;
  transition: all 0.2s ease;
}

#lhd-widget button.lhd-option-btn {
  font-family: inherit;
}

#lhd-widget .lhd-option-btn:hover,
#lhd-widget .lhd-option-btn:focus {
  transform: translateY(-1px);
  outline: none;
}

#lhd-widget .lhd-option-light {
  background: var(--lhd-light);
  color: var(--lhd-text);
}

#lhd-widget .lhd-option-dark {
  background: var(--lhd-navy);
  color: #fff;
  border-color: var(--lhd-navy);
}

#lhd-widget .lhd-option-green {
  background: var(--lhd-green);
  color: #fff;
  border-color: var(--lhd-green);
}

/* ai block */
#lhd-widget .lhd-ai-message {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}

#lhd-widget .lhd-avatar {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 50%;
  overflow: hidden;
  background: #eef6dc;
  display: flex;
  align-items: center;
  justify-content: center;
}

#lhd-widget .lhd-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

#lhd-widget .lhd-bubble {
  flex: 1;
  background: #f8fafc;
  border: 1px solid #e7ebf0;
  border-radius: 12px;
  padding: 10px 11px;
}

#lhd-widget .lhd-bubble p {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--lhd-text);
}

#lhd-widget .lhd-textarea {
  width: 100%;
  min-height: 90px;
  border: 1px solid #d8e6b6;
  border-radius: 12px;
  padding: 11px 12px;
  font-size: 13px;
  color: var(--lhd-text);
  resize: vertical;
  outline: none;
  font-family: inherit;
  box-shadow: none;
}

#lhd-widget .lhd-textarea:focus {
  border-color: var(--lhd-green);
  box-shadow: 0 0 0 3px rgba(156, 203, 47, 0.16);
}

#lhd-widget .lhd-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

#lhd-widget .lhd-actions .lhd-option-btn {
  flex: 1 1 130px;
  margin-bottom: 0;
}

/* mobile */
@media (max-width: 768px) {
  #lhd-widget .lhd-toggle-btn {
    top: 48px;
    right: 12px;
    bottom: auto;
    width: 48px;
    height: 48px;
    z-index: 100050;
  }

  #lhd-widget .lhd-toggle-btn svg {
    width: 16px;
    height: 16px;
  }

  #lhd-widget .lhd-popup {
    top: 46px;
    right: 8px;
    bottom: auto;
    width: min(280px, calc(100vw - 16px));
    max-width: calc(100vw - 16px);
    border-radius: 14px;
  }

  #lhd-widget .lhd-header {
    padding: 11px 12px;
  }

  #lhd-widget .lhd-title {
    font-size: 14px;
  }

  #lhd-widget .lhd-close-btn {
    width: 28px;
    height: 28px;
    font-size: 22px;
  }

  #lhd-widget .lhd-body {
    padding: 12px;
  }

  #lhd-widget .lhd-greet,
  #lhd-widget .lhd-desc {
    font-size: 12px;
    margin-bottom: 8px;
  }

  #lhd-widget .lhd-greet strong {
    font-size: 14px;
  }

  #lhd-widget .lhd-option-btn {
    font-size: 12px;
    padding: 10px 10px;
    border-radius: 10px;
    margin-bottom: 8px;
  }

  #lhd-widget .lhd-avatar {
    width: 34px;
    height: 34px;
    min-width: 34px;
  }

  #lhd-widget .lhd-textarea {
    min-height: 78px;
    font-size: 12px;
  }
}