/* ---------------------------------------------------
   RCWP Registration — Floating labels + Spinner
   --------------------------------------------------- */

/* Container geral */
.rcwp-registration-form {
  max-width: 400px;
  margin: 50px auto;
  padding: 40px 30px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  font-family: 'Poppins', sans-serif;
}

/* Cada campo em seu group para floating label */
.rcwp-registration-form .form-group {
  position: relative;
  margin-bottom: 24px;
}

/* Inputs sem placeholder visível (usamos label) */
.rcwp-registration-form .form-group input {
  width: 100%;
  padding: 16px 12px;
  border: 2px solid #ccc;
  border-radius: 8px;
  background: none;
  font-size: 1rem;
  color: #333;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}

/* Placeholder hack: precisa estar presente para :placeholder-shown */
.rcwp-registration-form .form-group input::placeholder {
  color: transparent;
}

/* Label posicionado por cima do input */
.rcwp-registration-form .form-group label {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: #fff;
  padding: 0 4px;
  color: #999;
  font-size: 1rem;
  pointer-events: none;
  transition: all 0.2s ease;
}

/* Quando o input estiver focado ou preenchido, sobe a label */
.rcwp-registration-form .form-group input:focus + label,
.rcwp-registration-form .form-group input:not(:placeholder-shown) + label {
  top: -8px;
  font-size: 0.85rem;
  color: #6c63ff;
}

/* Efeito de foco no input */
.rcwp-registration-form .form-group input:focus {
  border-color: #6c63ff;
  box-shadow: 0 0 8px rgba(108,99,255,0.3);
}

/* Botão Registrar */
.rcwp-registration-form button[type="submit"] {
  width: 100%;
  padding: 14px 0;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #6c63ff, #00bfa6);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
}

/* Hover / active */
.rcwp-registration-form button[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
.rcwp-registration-form button[type="submit"]:active {
  transform: translateY(0);
  box-shadow: none;
}

/* Spinner no botão */
.rcwp-registration-form button.loading {
  pointer-events: none;
  opacity: 0.8;
}
.rcwp-registration-form button.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 16px;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  border: 2px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Mensagem de erro/sucesso */
.rcwp-message {
  margin-bottom: 20px;
  padding: 12px 16px;
  background: #ffecec;
  border-left: 4px solid #ff6b6b;
  border-radius: 4px;
  color: #721c24;
  font-size: 0.95rem;
  line-height: 1.4;
}

/* Responsivo */
@media (max-width: 480px) {
  .rcwp-registration-form {
    margin: 20px;
    padding: 30px 20px;
  }
}
