@tailwind base;
@tailwind components;
@tailwind utilities;

/* Affiliate Registration Form - Custom Styles */

@layer components {
  .aff-reg-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  }
}

@layer utilities {
  /* Smooth transitions for form inputs */
  .aff-reg-container input[type="text"],
  .aff-reg-container input[type="email"],
  .aff-reg-container textarea {
    transition: all 0.2s ease-in-out;
  }

  .aff-reg-container input[type="text"]:focus,
  .aff-reg-container input[type="email"]:focus,
  .aff-reg-container textarea:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  }

  /* Checkbox custom styling */
  .aff-reg-container input[type="checkbox"] {
    cursor: pointer;
  }

  .aff-reg-container input[type="checkbox"]:hover {
    transform: scale(1.05);
  }

  /* Button hover effects */
  #aff-submit-btn {
    position: relative;
    overflow: hidden;
  }

  #aff-submit-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
  }

  #aff-submit-btn:hover::before {
    width: 300px;
    height: 300px;
  }

  #aff-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
  }

  /* Message animations */
  #aff-success-message,
  #aff-error-message {
    animation: slideDown 0.3s ease-out;
  }

  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  /* Form validation states */
  .aff-reg-container input.border-red-500 {
    border-color: #ef4444 !important;
  }

  .aff-reg-container input.border-red-500:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
  }

  .aff-reg-container input.border-yellow-500 {
    border-color: #f59e0b !important;
  }

  /* Accessibility improvements */
  .aff-reg-container label {
    cursor: pointer;
  }

  .aff-reg-container input:focus,
  .aff-reg-container textarea:focus,
  .aff-reg-container button:focus {
    outline: none;
  }

  /* Link styles */
  .aff-reg-container a {
    transition: color 0.2s ease-in-out;
  }

  /* Gradient text for header */
  .gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  /* Smooth scroll behavior */
  html {
    scroll-behavior: smooth;
  }
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .aff-reg-container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .aff-reg-container .px-8 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .aff-reg-container .py-10 {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }
}
