/* Custom styles for the public lead capture form */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: #001524;
  color: #ffffff;
  line-height: 1.6;
  margin: 0;
  padding: 0;
}

/* Dark mode body styling */
.dark body {
  background-color: #111827 !important;
  color: #f9fafb !important;
}

/* Set the background color for the entire screen */
.min-h-screen {
  background-color: #001524;
}

.dark .min-h-screen {
  background-color: #111827 !important;
}

.form-logo {
  max-width: 180px;
  height: auto;
  margin: 0 auto 1.5rem;
  display: block;
}

.form-header {
  text-align: center;
  margin-bottom: 2rem;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

.form-header h2 {
  color: #0f172a;
  margin-bottom: 0.5rem;
}

.dark .form-header h2 {
  color: #f9fafb !important;
}

.form-card {
  background-color: #ffffff;
  border-radius: 0.75rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  padding: 1.5rem;
  margin-bottom: 2rem;
  border: 1px solid #e2e8f0;
  width: 100%;
}

.dark .form-card {
  background-color: #1f2937 !important;
  border-color: #374151 !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2) !important;
}

@media (min-width: 640px) {
  .form-card {
    padding: 2rem;
  }
}

@media (min-width: 768px) {
  .form-card {
    padding: 2.5rem;
  }
}

@media (min-width: 1024px) {
  .form-card {
    padding: 3rem;
  }
}

.form-footer {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.875rem;
  color: #64748b;
}

.dark .form-footer {
  color: #9ca3af !important;
}

/* Form field styling */
.form-field {
  margin-bottom: 1.5rem;
  width: 100%;
}

.form-label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: #334155;
  font-size: 0.95rem;
}

.dark .form-label {
  color: #d1d5db !important;
}

.form-input {
  width: 100%;
  padding: 0.75rem 0.875rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  font-size: 1rem;
  color: #1e293b;
  background-color: #ffffff !important; /* Force white background */
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.dark .form-input {
  background-color: #374151 !important;
  border-color: #4b5563 !important;
  color: #f9fafb !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
}

/* Ensure textarea also has white background */
textarea.form-input {
  background-color: #ffffff !important;
  min-height: 100px;
  resize: vertical;
}

.dark textarea.form-input {
  background-color: #374151 !important;
}

.form-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.dark .form-input:focus {
  border-color: #60a5fa !important;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.25) !important;
}

.form-input:hover {
  border-color: #94a3b8;
}

.dark .form-input:hover {
  border-color: #6b7280 !important;
}

/* Improve accessibility for form inputs */
.form-input::placeholder {
  color: #94a3b8;
}

.dark .form-input::placeholder {
  color: #9ca3af !important;
}

.form-error {
  color: #dc2626;
  font-size: 0.875rem;
}

.dark .form-error {
  color: #f87171 !important;
}

/* Required field indicator */
.required-field::after {
  content: "*";
  color: #ef4444;
  margin-left: 0.25rem;
  font-weight: 700;
}

.dark .required-field::after {
  color: #f87171 !important;
}

/* Required field explanation */
.required-field-note {
  font-size: 0.875rem;
  color: #64748b;
  margin-top: 0.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e2e8f0;
}

.dark .required-field-note {
  color: #9ca3af !important;
  border-bottom-color: #374151 !important;
}

.required-field-note::before {
  content: "*";
  margin-right: 0.25rem;
}

.form-error {
  margin-top: 0.5rem;
  font-weight: 500;
}

.form-button {
  display: block;
  width: 100%;
  padding: 0.875rem 1.5rem;
  background-color: #001524;
  color: white;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s, box-shadow 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
}

.dark .form-button {
  background-color: #1f2937 !important;
  color: #f9fafb !important;
}

.form-button:hover {
  background-color: #00253e;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
}

.dark .form-button:hover {
  background-color: #374151 !important;
}

.form-button:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 21, 36, 0.4);
}

.dark .form-button:focus {
  box-shadow: 0 0 0 3px rgba(31, 41, 55, 0.4) !important;
}

.form-button:active {
  transform: translateY(1px);
}

.form-button:disabled {
  background-color: #64748b;
  cursor: not-allowed;
  opacity: 0.7;
}

.dark .form-button:disabled {
  background-color: #4b5563 !important;
}

/* Success message styling */
.success-message {
  text-align: center;
  padding: 2.5rem 2rem;
  border-radius: 0.75rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.dark .success-message {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2) !important;
}

.success-icon {
  color: #10b981;
  font-size: 3rem;
  margin-bottom: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ecfdf5;
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  box-shadow: 0 4px 6px rgba(16, 185, 129, 0.1);
}

.dark .success-icon {
  color: #34d399 !important;
  background: #064e3b !important;
}

/* Accessibility improvements */
[aria-invalid="true"] {
  border-color: #dc2626;
}

.dark [aria-invalid="true"] {
  border-color: #f87171 !important;
}

[aria-invalid="true"]:focus {
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.25);
}

.dark [aria-invalid="true"]:focus {
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.25) !important;
}

/* High contrast mode support */
@media (forced-colors: active) {
  .form-button {
    border: 2px solid transparent;
  }
  
  .form-input:focus,
  .form-button:focus {
    outline: 2px solid CanvasText;
  }
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .form-card {
    padding: 1.5rem;
    border-radius: 0.5rem;
  }
  
  .form-field {
    margin-bottom: 1.25rem;
  }
}
