/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  line-height: 1.6;
  color: #000;
  background-color: #fff;
}

/* Utility classes */
.hidden {
  display: none !important;
}

/* Success Screen Styles */
.success-screen {
  min-height: 100vh;
  background-color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem 1rem;
}

.success-container {
  text-align: center;
  max-width: 24rem;
}

.success-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.confetti-container {
  margin-bottom: 2rem;
}

.confetti-image {
  width: 120px;
  height: 120px;
  object-fit: contain;
}

.success-title {
  font-size: 1.875rem;
  font-weight: 700;
  color: #000;
  margin-bottom: 0.5rem;
}

.success-description {
  margin-bottom: 2rem;
  color: #5f6875;
  font-size: 1rem;
  line-height: 1.5;
}

.return-home-btn {
  width: 100%;
  height: 3rem;
  background-color: #149dff;
  color: #fff;
  font-weight: 500;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
  font-size: 1rem;
}

.return-home-btn:hover {
  background-color: rgba(20, 157, 255, 0.8);
}

/* Main Form Styles */
.main-form {
  min-height: 100vh;
  background-color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem 1rem;
}

.form-container {
  margin: 0 auto;
  width: 100%;
  max-width: 28rem;
}

/* Logo */
.logo-container {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
  width: 100%;
}

.logo {
  width: 200px;
  height: 100px;
  cursor: pointer;
  object-fit: contain;
}

/* Title */
.title-container {
  text-align: center;
  margin-bottom: 2rem;
}

.main-title {
  font-size: 1.875rem;
  font-weight: 700;
  color: #000;
  margin-bottom: 0.5rem;
}

/* Form Styles */
.waitlist-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.name-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-weight: 500;
  color: #000;
  font-size: 0.875rem;
}

.optional-text {
  color: #6b7280;
  font-weight: 400;
}

.form-input,
.form-select {
  height: 2.5rem;
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #e2e2ea;
  border-radius: 0.375rem;
  background-color: #fff;
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: #149dff;
  box-shadow: 0 0 0 3px rgba(20, 157, 255, 0.1);
}

/* Remove browser validation styling */
.form-input:invalid,
.form-select:invalid {
  border-color: #e2e2ea;
  box-shadow: none;
}

/* Only show error styling when we explicitly add the error class */
.form-input.error,
.form-select.error {
  border-color: #ef4444;
}

.phone-input-container {
  display: flex;
  gap: 0.5rem;
}

.country-select {
  width: 8rem;
  height: 2.5rem;
  background-color: #fff;
  border: 1px solid #e2e2ea;
  border-radius: 0.375rem;
  padding-left: 0.5rem;
  padding-right: 0.75rem;
  font-size: 1rem;
  cursor: pointer;
}

.country-select:focus {
  outline: none;
  border-color: #149dff;
  box-shadow: 0 0 0 3px rgba(20, 157, 255, 0.1);
}

.phone-input {
  flex: 1;
}

.form-select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.5rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  padding-right: 2.5rem;
  appearance: none;
}

.error-message {
  color: #ef4444;
  font-size: 0.75rem;
  margin-top: 0.25rem;
  display: none;
}

.error-message.show {
  display: block;
}

/* Submit Button */
.submit-btn {
  width: 100%;
  height: 3rem;
  background-color: #149dff;
  color: #fff;
  font-weight: 500;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.submit-btn:hover:not(:disabled) {
  background-color: rgba(20, 157, 255, 0.8);
}

.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 640px) {
  .name-row {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .main-title {
    font-size: 1.5rem;
  }

  .success-title {
    font-size: 1.5rem;
  }

  .phone-input-container {
    flex-direction: column;
  }

  .country-select {
    width: 100%;
  }
}

@media (min-width: 1024px) {
  .form-container {
    max-width: 32rem;
  }
}

/* Loading state */
.submit-btn.loading {
  position: relative;
}

.submit-btn.loading #submit-text {
  display: none;
}

.submit-btn.loading #loading-text {
  display: block;
}

/* Focus styles for accessibility */
.form-input:focus-visible,
.form-select:focus-visible,
.submit-btn:focus-visible,
.return-home-btn:focus-visible {
  outline: 2px solid #149dff;
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .form-input,
  .form-select {
    border-width: 2px;
  }

  .submit-btn,
  .return-home-btn {
    border: 2px solid #000;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}
