/* Form Styles for Monia Lead Capture Form */

/* Form Input Styles */
.form-input {
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  background-color: white !important;
  color: #111827 !important;
}

.form-input:focus {
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
  background-color: white !important;
}

.form-input::placeholder {
  color: #6b7280 !important;
}

/* Ensure select elements also have proper styling */
select.form-input {
  background-color: white !important;
  color: #111827 !important;
}

select.form-input option {
  background-color: white !important;
  color: #111827 !important;
}

.form-input.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-input.success {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Form Group Styles */
.form-group {
  position: relative;
}

.form-group label {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 500;
}

/* Error Message Styles */
.error-message {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.error-message.show {
  opacity: 1;
  transform: translateY(0);
}

/* Success Message Animation */
.success-message {
  animation: slideInUp 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Error Message Animation */
.error-message-container {
  animation: slideInDown 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

/* Checkbox Styles */
input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  position: relative;
  cursor: pointer;
}

input[type="checkbox"]:checked {
  background-color: #10b981;
  border-color: #10b981;
}

input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 12px;
  font-weight: bold;
}

input[type="checkbox"]:focus {
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Select Styles */
select.form-input {
  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 12px center;
  background-repeat: no-repeat;
  background-size: 16px;
  padding-right: 40px;
}

select.form-input:focus {
  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='%2310b981' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
}

/* Phone Input Styles */
.phone-input-container {
  position: relative;
}

.phone-prefix {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #6b7280;
  pointer-events: none;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 500;
}

/* Ensure phone input has proper left padding */
input[type="tel"] {
  padding-left: 96px !important;
}

/* Form Validation States */
.form-group.validating .form-input {
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.form-group.valid .form-input {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.form-group.invalid .form-input {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Loading Spinner */
.loading-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s ease-in-out infinite;
  display: inline-block;
  margin-right: 8px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Form Progress Indicator */
.form-progress {
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 24px;
}

.form-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #06d6a0);
  border-radius: 2px;
  transition: width 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  width: 0%;
}

/* Mobile Optimizations */
@media (max-width: 640px) {
  .form-input {
    font-size: 16px; /* Prevents zoom on iOS */
    padding: 14px 16px;
  }
  
  .form-group label {
    font-size: 14px;
  }
  
  .phone-prefix {
    left: 12px;
    font-size: 14px;
  }
  
  input[type="tel"] {
    padding-left: 88px !important;
  }
}

/* Accessibility Improvements */
.form-input:focus-visible {
  outline: 2px solid #10b981;
  outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .form-input {
    border-width: 2px;
  }
  
  .form-input:focus {
    border-color: #ffffff;
    box-shadow: 0 0 0 3px #10b981;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .form-input,
  .error-message,
  .success-message,
  .error-message-container {
    transition: none;
    animation: none;
  }
}

/* Print styles */
@media print {
  .gradient-button {
    background: #10b981 !important;
    color: white !important;
    box-shadow: none !important;
  }
}