@import './variables.scss';

.registration-section {
  padding-block: 8rem;
  padding-inline: 1rem;
  min-height: 100vh;
  background-color: #f9fafb; /* Light background to make the white form pop */

  .form-container {
    max-width: 700px;
    margin: 0 auto;
    background-color: white;
    padding: 3rem;
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);

    h1 {
      text-align: center;
      color: $primary;
      font-size: 2.5rem;
      margin-bottom: 1.5rem;
    }

    .description-text {
      margin-bottom: 2.5rem;
      p {
        font-size: 1rem;
        line-height: 1.6;
        color: #4a4a4a;
        margin-bottom: 1rem;
      }
      .privacy-notice {
        font-size: 0.85rem;
        font-style: italic;
        color: #6b7280;
      }
    }

    /* Eligibility Card */
    .eligibility-card {
      background-color: $background-accent;
      padding: 1.5rem;
      border-radius: 0.5rem;
      border-left: 4px solid $secondary;
      
      h3 { margin-bottom: 1rem; color: $dark; }
      
      .radio-group {
        margin-bottom: 1.5rem;
        p { margin-bottom: 0.5rem; font-weight: 600; }
        label {
          display: inline-block;
          margin-right: 1.5rem;
          cursor: pointer;
          input { margin-right: 0.5rem; }
        }
      }
    }

    /* Hidden Utilities */
    .hidden-message {
      display: none;
      text-align: center;
      padding: 2rem;
      background-color: #fef2f2;
      border: 1px solid #fca5a5;
      border-radius: 0.5rem;
      p { color: #991b1b; font-weight: 600; margin-bottom: 0.5rem; }
      
      &.success {
        background-color: #f0fdf4;
        border-color: #86efac;
        h3 { color: #166534; font-size: 1.5rem; margin-bottom: 1rem; }
        p { color: #15803d; }
      }
    }

    .hidden-form { display: none; }

    /* Main Form Styling */
    form {
      margin-top: 2rem;
      h3 {
        color: $primary;
        margin-bottom: 1.5rem;
        padding-bottom: 0.5rem;
        border-bottom: 2px solid $background-accent;
      }

      .input-group {
        margin-bottom: 1.5rem;

        label {
          display: block;
          font-weight: 700;
          margin-bottom: 0.5rem;
          color: $dark;

          span {
            font-weight: 400;
            font-size: 0.8rem;
            color: #6b7280;
          }
        }

        input[type="text"],
        input[type="tel"],
        input[type="email"],
        select,
        textarea {
          width: 100%;
          padding: 0.75rem;
          border: 1px solid #d1d5db;
          border-radius: 0.5rem;
          font-family: inherit;
          font-size: 1rem;
          transition: border-color 0.2s ease;

          &:focus {
            outline: none;
            border-color: $primary;
            box-shadow: 0 0 0 3px rgba(128, 0, 0, 0.1);
          }
        }

        textarea { resize: vertical; }
      }
    }

    /* Buttons */
    .submit-btn {
      display: block;
      width: 100%;
      background-color: $primary;
      color: white;
      font-size: 1.1rem;
      font-weight: 700;
      padding: 1rem;
      border: none;
      border-radius: 0.5rem;
      cursor: pointer;
      transition: background-color 0.2s ease;

      &:hover {
        background-color: darken($primary, 10%);
      }
    }
  }
}

/* Mobile Adjustments */
@media screen and (max-width: 768px) {
  .registration-section {
    padding-top: 6rem;
    .form-container {
      padding: 1.5rem;
      h1 { font-size: 2rem; }
    }
  }
}
