/* Developer Lead Form Styles - Mountain View */

:root {
  --dev-primary: #BE9E44;
  --dev-primary-dark: #8B6F47;
  --dev-accent: #D4AF8E;
  --dev-light-bg: #F9F8F5;
  --dev-border: rgba(190, 158, 68, 0.15);
  --dev-font: 'Cairo', 'Noto Kufi Arabic', sans-serif;
  --dev-radius: 8px;
}

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

.hidden.active {
  display: block !important;
}

/* Form Container */
.dev-lead-form {
  font-family: var(--dev-font);
  background: white;
  border-radius: var(--dev-radius);
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--dev-border);
}

.dev-lead-form.compact {
  padding: 1.5rem;
}

/* Intent Section */
.dev-lead-intent {
  margin-bottom: 2rem;
}

.intent-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: #001F2D;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.intent-cards {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.intent-card {
  flex: 1;
  min-width: 150px;
  padding: 1.25rem;
  border: 2px solid #E2E8F0;
  border-radius: var(--dev-radius);
  background: #F9F9F9;
  cursor: pointer;
  text-align: center;
  transition: all 0.3s ease;
  color: #64748B;
  font-weight: 600;
  font-size: 0.95rem;
}

.intent-card:hover {
  border-color: var(--dev-primary);
  background: rgba(190, 158, 68, 0.05);
}

.intent-card.active {
  border-color: var(--dev-primary);
  background: rgba(190, 158, 68, 0.1);
  color: var(--dev-primary);
  box-shadow: 0 4px 12px rgba(190, 158, 68, 0.15);
}

.intent-card.inactive {
  border-color: #E2E8F0;
  background: #F9F9F9;
  color: #64748B;
}

/* Form Fields */
.form-field {
  margin-bottom: 1.5rem;
}

.form-field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #001F2D;
  margin-bottom: 0.5rem;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  font-size: 0.95rem;
  font-family: var(--dev-font);
  color: #001F2D;
  background: white;
  border: 1px solid #E2E8F0;
  border-radius: var(--dev-radius);
  outline: none;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.uniform-select,
select.uniform-select,
.form-field select,
select.form-input-lux,
select.input-lux {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M5.5 7.5L10 12L14.5 7.5' stroke='%230F172A' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 14px 14px;
  padding-right: 2.75rem;
}

.form-field input:hover,
.form-field select:hover,
.form-field textarea:hover {
  border-color: #CBD5E1;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--dev-primary);
  background: #FFFDF8;
  box-shadow: 0 0 0 3px rgba(190, 158, 68, 0.1);
}

.form-field input::placeholder {
  color: #94A3B8;
}

/* Phone Field Error */
.phone-error {
  font-size: 0.75rem;
  color: #DC2626;
  font-weight: 600;
  margin-top: 0.5rem;
  display: block;
  text-align: right;
  line-height: 1.4;
}

.phone-error.hidden {
  display: none;
}

/* Extra spacing after phone field to prevent overlap with next field */
.form-field:has(input[type="tel"]),
.form-field:has(.iti .iti__tel-input) {
  margin-bottom: 2.5rem;
}

/* intl-tel-input Integration */
.iti {
  width: 100% !important;
  display: block !important;
  position: relative !important;
  direction: ltr !important;
  text-align: left !important;
}

.iti .iti__tel-input {
  width: 100%;
  padding: 0.875rem 1rem !important;
  padding-left: 80px !important;
  font-size: 0.95rem;
  font-family: var(--dev-font);
  color: #001F2D;
  border: 1px solid #E2E8F0 !important;
  border-radius: var(--dev-radius);
  background: white;
  outline: none;
  transition: all 0.3s ease;
  box-sizing: border-box !important;
  direction: ltr !important;
  text-align: left !important;
}

/* Extra spacing after phone field to prevent overlap */
.form-field:has(input[type="tel"]) {
  margin-bottom: 2rem;
}

.iti .iti__tel-input:focus {
  border-color: var(--dev-primary) !important;
  background: #FFFDF8;
  box-shadow: 0 0 0 3px rgba(190, 158, 68, 0.1);
}

.iti .iti__tel-input:hover {
  border-color: #CBD5E1 !important;
}

.iti .iti__tel-input.border-red-500 {
  border-color: #DC2626 !important;
}

/* Message Textarea (Customer Service) */
.intent-message-wrapper {
  max-height: 300px;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.4s ease, margin 0.4s ease;
  opacity: 1;
}

.intent-message-wrapper.hidden {
  max-height: 0;
  opacity: 0;
  margin: 0;
  overflow: hidden;
}

.intent-message-wrapper textarea {
  min-height: 100px;
  resize: vertical;
  font-family: var(--dev-font);
}

/* Budget Wrapper */
.form-budget-wrapper {
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.form-budget-wrapper.hidden {
  opacity: 0;
  visibility: hidden;
  display: none;
  max-height: 0;
}

/* Submit Button */
.form-submit {
  width: 100%;
  padding: 1rem;
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--dev-font);
  color: white;
  background: linear-gradient(135deg, var(--dev-primary) 0%, var(--dev-accent) 100%);
  border: none;
  border-radius: var(--dev-radius);
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 1.5rem;
  box-shadow: 0 4px 12px rgba(190, 158, 68, 0.2);
}

.form-submit:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--dev-primary-dark) 0%, var(--dev-primary) 100%);
  box-shadow: 0 6px 16px rgba(190, 158, 68, 0.3);
  transform: translateY(-2px);
}

.form-submit:active:not(:disabled) {
  transform: translateY(0);
}

.form-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Consent Text */
.form-consent {
  font-size: 0.75rem;
  color: #64748B;
  margin-top: 1rem;
  text-align: center;
  line-height: 1.6;
}

.form-consent a {
  color: var(--dev-primary);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.form-consent a:hover {
  color: var(--dev-primary-dark);
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
  .dev-lead-form {
    padding: 1.5rem 1rem;
  }

  .intent-cards {
    gap: 0.75rem;
  }

  .intent-card {
    min-width: 130px;
    padding: 1rem;
    font-size: 0.9rem;
  }

  .form-field {
    margin-bottom: 1.25rem;
  }

  .form-submit {
    padding: 0.875rem;
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .dev-lead-form {
    padding: 1.25rem 1rem;
  }

  .intent-cards {
    flex-direction: column;
    gap: 0.75rem;
  }

  .intent-card {
    min-width: auto;
  }

  .form-field input,
  .form-field select,
  .form-field textarea {
    font-size: 16px; /* Prevents zoom on iOS */
  }

  .iti .iti__tel-input {
    font-size: 16px; /* Prevents zoom on iOS */
  }
}
