/* Base styles */
#wcp-wrapper {
  position: fixed;
  z-index: 9999;
  cursor: grab;
  /* default position: mid-right */
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
  /* allow smooth dragging on touch */
}

#wcp-fab {
  background-color: #25d366;
  color: white;
  border: none;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s, width 0.3s, height 0.3s;
  will-change: transform;
}

#wcp-fab:hover {
  transform: scale(1.05);
}

.wcp-fab-icon svg {
  width: 28px;
  height: 28px;
  transition: width 0.3s, height 0.3s;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  #wcp-fab {
    width: 54px;
    height: 54px;
  }

  .wcp-fab-icon svg {
    width: 24px;
    height: 24px;
  }
}

/* Modal styles */
.wcp-modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  /* stay in flow for animation */
  justify-content: center;
  align-items: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  /* prevent intercepting clicks when hidden */
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.wcp-modal-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.wcp-modal {
  background: rgba(0, 0, 0, 1);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  padding: 30px 25px;
  transform: translateY(20px);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  outline: none;
  border-style: solid;
  border-color: #FFCF00;
}

.wcp-modal-overlay.active .wcp-modal {
  transform: translateY(0);
}

.wcp-modal-close {
  justify-content: center;
  transition: background-color 0.2s;
}

.wcp-modal-close:hover {
  background-color: #f5f5f5;
}

.wcp-form-container {
  padding: 10px;
}

.wcp-form-progress {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
  gap: 8px;
}

.wcp-progress-step {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #e0e0e0;
  transition: background-color 0.3s, transform 0.3s;
}

.wcp-progress-step.active {
  background-color: #25d366;
  transform: scale(1.2);
}

.wcp-form-step {
  display: none;
}

.wcp-form-step.active {
  display: block;
  animation: fadeIn 0.25s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

h2 {
  color: #333;
  font-size: 1.25rem;
  margin-bottom: 25px;
  text-align: center;
  font-weight: 600;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 10px;
  font-weight: 500;
}

.form-group input[type="text"] {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input[type="text"]:focus {
  border-color: #25d366;
  box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.2);
  outline: none;
}

.wcp-error {
  color: #c93737;
  display: block;
  margin-top: 6px;
}

.wcp-option-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wcp-option {
  position: relative;
}

.wcp-option input[type="radio"],
.wcp-option input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.wcp-option label {
  display: block;
  padding: 16px 20px;
  border: 2px solid #eee;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  padding-left: 50px;
}

.wcp-option label:before {
  content: "";
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border: 2px solid #ccc;
  border-radius: 50%;
  transition: all 0.3s;
}

.wcp-option input[type="checkbox"]+label:before {
  border-radius: 5px;
}

.wcp-option input[type="radio"]:checked+label:before,
.wcp-option input[type="checkbox"]:checked+label:before {
  background-color: #25d366;
  border-color: #25d366;
}

.wcp-option input[type="radio"]:checked+label:after {
  content: "";
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  background-color: white;
  border-radius: 50%;
}

.wcp-option input[type="checkbox"]:checked+label:after {
  content: "✓";
  position: absolute;
  left: 19px;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  font-size: 14px;
}

.wcp-option input[type="radio"]:checked+label,
.wcp-option input[type="checkbox"]:checked+label {
  background-color: rgba(37, 211, 102, 0.12);
  border-color: #25d366;
  color: #25d366;
}

.wcp-option label:hover {
  border-color: #25d366;
}

.wcp-form-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}

button.wcp-next-btn,
button.wcp-prev-btn,
#wcp-connect-btn {
  padding: 14px 28px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.3s;
}

button.wcp-next-btn,
#wcp-connect-btn {
  background-color: #25d366;
  color: white;
}

button.wcp-next-btn:hover,
#wcp-connect-btn:hover {
  background-color: #128C7E;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

button.wcp-prev-btn {
  background-color: #f5f5f5;
  color: #666;
}

button.wcp-prev-btn:hover {
  background-color: #eaeaea;
}

/* Click animation */
@keyframes pulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.08);
  }

  100% {
    transform: scale(1);
  }
}

.wcp-click-animation {
  animation: pulse 0.3s ease;
}