@layer base {
  .reviewForm {
    max-width: 28rem;
    width: 100%;
  }

  .title {
    text-align: center;
    margin-bottom: var(--spacing-4);
  }

  .form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-6);
  }

  .userInfo {
    display: flex;
    align-items: center;
    gap: var(--spacing-3);
    padding: var(--spacing-4);
    background: var(--muted);
    border-radius: var(--radius);
    border: 1px solid var(--border);
  }

  .avatar {
    width: 3rem;
    height: 3rem;
    flex-shrink: 0;
  }

  .userDetails {
    flex: 1;
  }

  .userName {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 var(--spacing-1) 0;
    color: var(--foreground);
  }

  .rideContext {
    display: flex;
    align-items: center;
    gap: var(--spacing-1);
    font-size: 0.875rem;
    color: var(--muted-foreground);
  }

  .rideContext svg {
    color: var(--primary);
  }

  .ratingSection {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-3);
  }

  .ratingLabel {
    font-size: 1rem;
    font-weight: 500;
    color: var(--foreground);
  }

  .required {
    color: var(--error);
  }

  .starsContainer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-2);
  }

  .stars {
    display: flex;
    gap: var(--spacing-1);
  }

  .star {
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-1);
    border-radius: var(--radius);
    transition: all var(--animation-duration-fast) ease;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .star:hover {
    background: var(--muted);
    transform: scale(1.1);
  }

  .star:focus-visible {
    outline: none;
    box-shadow: var(--shadow-focus);
  }

  .starEmpty svg {
    color: var(--muted-foreground);
    fill: transparent;
    stroke: currentColor;
    stroke-width: 1.5;
  }

  .starFilled svg {
    color: var(--accent);
    fill: currentColor;
    stroke: currentColor;
    stroke-width: 1;
  }

  .ratingText {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--muted-foreground);
    min-height: 1.25rem;
    text-align: center;
  }

  .commentSection {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-2);
  }

  .commentLabel {
    font-size: 1rem;
    font-weight: 500;
    color: var(--foreground);
  }

  .commentTextarea {
    resize: vertical;
    min-height: 6rem;
  }

  .characterCount {
    font-size: 0.75rem;
    color: var(--muted-foreground);
    text-align: right;
  }

  .error {
    padding: var(--spacing-3);
    background: color-mix(in srgb, var(--error) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--error) 30%, transparent);
    border-radius: var(--radius);
    color: var(--error);
    font-size: 0.875rem;
    text-align: center;
  }

  @media (max-width: 768px) {
    .reviewForm {
      max-width: 95vw;
      margin: var(--spacing-4);
    }

    .userInfo {
      padding: var(--spacing-3);
    }

    .avatar {
      width: 2.5rem;
      height: 2.5rem;
    }

    .userName {
      font-size: 1rem;
    }

    .stars {
      gap: var(--spacing-2);
    }

    .star {
      padding: var(--spacing-2);
    }

    .starEmpty svg,
    .starFilled svg {
      width: 20px;
      height: 20px;
    }
  }

  @media (prefers-reduced-motion: reduce) {
    .star {
      transition: none;
    }

    .star:hover {
      transform: none;
    }
  }
}