#chat-lead-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  font-family: inherit;
  color: #fff;
}

#chat-lead-toggle {
  background-color: #FFD700;
  color: #111;
  border: none;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, background-color 0.2s ease;
  position: absolute;
  bottom: 0;
  right: 0;
}

#chat-lead-toggle:hover {
  transform: scale(1.05);
  background-color: #e5c100;
}

#chat-lead-toggle svg {
  width: 32px;
  height: 32px;
  fill: currentColor;
}

.chat-lead-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: #e74c3c;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #222;
}

#chat-lead-window {
  display: none;
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 320px;
  background-color: #222;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border: 1px solid #333;
  overflow: hidden;
  transform-origin: bottom right;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.3s ease, transform 0.3s ease;
  flex-direction: column;
}

#chat-lead-window.chat-open {
  display: flex;
  opacity: 1;
  transform: scale(1);
}

.chat-lead-header {
  background-color: #1a1a1a;
  padding: 15px;
  border-bottom: 2px solid #FFD700;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-lead-title {
  display: flex;
  flex-direction: column;
}

.chat-lead-title h4 {
  margin: 0;
  font-size: 16px;
  color: #FFD700;
  font-weight: bold;
}

.chat-lead-title p {
  margin: 2px 0 0;
  font-size: 12px;
  color: #aaa;
}

.chat-lead-close {
  background: none;
  border: none;
  color: #bbb;
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  padding: 0 5px;
  transition: color 0.1s;
}

.chat-lead-close:hover {
  color: #fff;
}

.chat-lead-body {
  padding: 15px;
}

.chat-lead-group {
  margin-bottom: 12px;
}

.chat-lead-group label {
  display: block;
  font-size: 13px;
  color: #ccc;
  margin-bottom: 5px;
}

.chat-lead-input, .chat-lead-textarea {
  width: 100%;
  background-color: #333;
  border: 1px solid #444;
  color: #fff;
  border-radius: 6px;
  padding: 10px;
  font-family: inherit;
  font-size: 14px;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.chat-lead-input:focus, .chat-lead-textarea:focus {
  outline: none;
  border-color: #FFD700;
}

.chat-lead-textarea {
  resize: vertical;
  min-height: 70px;
  max-height: 150px;
}

.chat-lead-hint {
  font-size: 11px;
  color: #888;
  margin-top: 4px;
  margin-bottom: 0;
  line-height: 1.3;
}

.chat-lead-submit {
  width: 100%;
  background-color: #FFD700;
  color: #111;
  border: none;
  padding: 12px;
  font-size: 15px;
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.chat-lead-submit:hover {
  background-color: #e5c100;
}

.chat-lead-submit:disabled {
  background-color: #666;
  color: #aaa;
  cursor: not-allowed;
}

.chat-lead-message {
  display: none;
  padding: 10px;
  margin-top: 10px;
  border-radius: 6px;
  font-size: 14px;
  text-align: center;
}

.chat-lead-message.error {
  display: block;
  background-color: rgba(231, 76, 60, 0.2);
  color: #e74c3c;
  border: 1px solid #e74c3c;
}

.chat-lead-message.success {
  display: block;
  background-color: rgba(46, 204, 113, 0.2);
  color: #2ecc71;
  border: 1px solid #2ecc71;
}

.hp-field {
  display: none;
  opacity: 0;
  position: absolute;
  top: -9999px;
  left: -9999px;
}

@media (max-width: 480px) {
  #chat-lead-window {
    width: calc(100vw - 40px);
    right: 0;
    bottom: 80px;
  }
}
