.supabase-form {
  max-width: 500px;
  margin: 0 auto;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(138, 43, 226, 0.1);
  margin-top: 10px;
}

.supabase-form__field {
  margin-bottom: 1.5rem;
}

.supabase-form__label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #333;
  font-size: 0.9rem;
}

.supabase-form__input,
.supabase-form__select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  background: white;
  box-sizing: border-box;
}

.supabase-form__input:focus,
.supabase-form__select:focus {
  outline: none;
  border-color: #8a2be2;
  box-shadow: 0 0 0 3px rgba(138, 43, 226, 0.1);
}

.supabase-form__button {
  width: 100%;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #8a2be2 0%, #9932cc 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 0.5rem;
}

.supabase-form__button:hover:not(:disabled) {
  background: linear-gradient(135deg, #7b1fa2 0%, #8e24aa 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(138, 43, 226, 0.3);
}

.supabase-form__button:disabled,
.supabase-form__button--disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
  opacity: 0.6;
}

.supabase-form__message {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
  font-weight: 500;
}

.supabase-form__message--success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.supabase-form__message--error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.supabase-form__message--hidden {
  display: none;
}

.supabase-form__required {
  color: #e74c3c;
}

/* Add to your existing CSS */
.loading-spinner {
  margin-left: 8px;
  display: inline-flex;
  align-items: center;
}

.loading-spinner svg {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 768px) {
  .supabase-form {
    padding: 1.5rem;
  }

  .supabase-form__input,
  .supabase-form__select,
  .supabase-form__button {
    font-size: 16px; /* Prevents zoom on iOS */
  }
}
