/* =============================================
   DEALERSHIP LEAD FORM - Dedicated Styles
   All classes prefixed with dealership-lead-,
   dealership-form-, dealership-section-cta-,
   or dealership-inline- to prevent conflicts.
   ============================================= */

/* ============================================
   SECTION CTA AREA
   Compact CTA at the bottom of each homepage section
   ============================================ */
.dealership-section-cta {
  text-align: center;
  padding: 32px 24px 8px;
  margin-top: 16px;
  border-top: 1px dashed rgba(22, 163, 74, 0.15);
}

.dealership-section-cta--dark {
  border-top-color: rgba(255, 255, 255, 0.12);
}

.dealership-section-cta--on-dark {
  border-top-color: rgba(255, 255, 255, 0.12);
  padding-bottom: 0;
}

.dealership-section-cta-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 30px;
  background: linear-gradient(135deg, #ff6a00, #ff9800);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 700;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(255, 106, 0, 0.25);
  transition: all 0.3s ease;
  font-family: var(--font-body, 'Plus Jakarta Sans', sans-serif);
  line-height: 1.4;
  letter-spacing: 0.2px;
}

.dealership-section-cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 106, 0, 0.35);
}

.dealership-section-cta-button[aria-expanded="true"] {
  background: linear-gradient(135deg, #16a34a, #15803d);
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.25);
}

.dealership-section-cta-button[aria-expanded="true"]:hover {
  box-shadow: 0 8px 25px rgba(22, 163, 74, 0.35);
}

/* ============================================
   INLINE FORM SLOT
   Uses grid-template-rows for smooth accordion
   ============================================ */
.dealership-inline-form-slot {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition:
    grid-template-rows 0.45s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.3s ease,
    margin-top 0.35s ease;
  margin-top: 0;
}

.dealership-inline-form-slot.is-open {
  grid-template-rows: 1fr;
  opacity: 1;
  margin-top: 24px;
}

.dealership-inline-form-slot > * {
  overflow: hidden;
  min-height: 0;
}

/* ============================================
   FORM CONTAINER (inside slot)
   ============================================ */
.dealership-form-container {
  /* No max-height animation needed - grid handles it */
}

.dealership-form-container[hidden] {
  display: none;
}

/* --- Form Wrapper Card --- */
.dealership-lead-form-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 28px;
  background: #fff;
  border: 1px solid rgba(22, 163, 74, 0.15);
  border-radius: 20px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
  font-family: var(--font-body, 'Plus Jakarta Sans', sans-serif);
}

/* --- Header --- */
.dealership-lead-header {
  text-align: center;
  margin-bottom: 24px;
}

.dealership-lead-title {
  font-family: var(--font-display, 'Playfair Display', serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900, #111827);
  margin: 0 0 6px;
}

.dealership-lead-subtitle {
  font-size: 0.9rem;
  color: var(--gray-600, #4b5563);
  margin: 0;
}

/* --- Form Grid --- */
.dealership-lead-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

/* --- Field --- */
.dealership-lead-field {
  display: flex;
  flex-direction: column;
}

/* --- Label --- */
.dealership-lead-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-700, #374151);
  margin-bottom: 6px;
}

.dealership-lead-required {
  color: #ef4444;
}

/* --- Input / Select --- */
.dealership-lead-input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--gray-800, #1f2937);
  background: #fff;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  outline: none;
  box-sizing: border-box;
}

.dealership-lead-input:focus {
  border-color: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

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

.dealership-lead-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

/* --- Error Message --- */
.dealership-lead-error {
  font-size: 0.78rem;
  color: #ef4444;
  min-height: 18px;
  margin-top: 2px;
}

/* --- Checkbox Row --- */
.dealership-lead-checkbox-row {
  margin-bottom: 20px;
}

.dealership-lead-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--gray-700, #374151);
  cursor: pointer;
  user-select: none;
}

.dealership-lead-checkbox {
  width: 18px;
  height: 18px;
  accent-color: #16a34a;
  cursor: pointer;
  flex-shrink: 0;
}

/* --- Submit Button --- */
.dealership-lead-button {
  width: 100%;
  padding: 14px 24px;
  background: linear-gradient(135deg, #ff6a00, #ff9800);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 14px rgba(255, 106, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
}

.dealership-lead-button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 106, 0, 0.4);
}

.dealership-lead-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* --- Spinner --- */
.dealership-lead-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: dealershipSpin 0.6s linear infinite;
}

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

/* --- Success / Error Message --- */
.dealership-lead-message {
  text-align: center;
  margin-top: 16px;
  font-size: 0.9rem;
  font-weight: 600;
  min-height: 24px;
}

.dealership-lead-message.dealership-lead-msg-success {
  color: #16a34a;
}

.dealership-lead-message.dealership-lead-msg-error {
  color: #ef4444;
}

/* ============================================
   LEGACY TRIGGER BUTTON (for non-slot pages)
   ============================================ */
.dealership-apply-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: linear-gradient(135deg, #ff6a00, #ff9800);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(255, 106, 0, 0.3);
  transition: all 0.3s ease;
  font-family: inherit;
  text-decoration: none;
  line-height: 1.4;
}

.dealership-apply-trigger:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 106, 0, 0.4);
}

.dealership-apply-trigger.dealership-trigger-active {
  background: linear-gradient(135deg, #16a34a, #15803d);
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.3);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .dealership-section-cta {
    padding: 24px 16px 6px;
    margin-top: 12px;
  }

  .dealership-section-cta-button {
    padding: 12px 24px;
    font-size: 0.85rem;
  }

  .dealership-inline-form-slot.is-open {
    margin-top: 18px;
  }
}

@media (max-width: 680px) {
  .dealership-lead-form-wrap {
    padding: 24px 18px;
    border-radius: 16px;
  }

  .dealership-lead-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .dealership-lead-title {
    font-size: 1.25rem;
  }

  .dealership-lead-button {
    padding: 13px 20px;
    font-size: 0.92rem;
  }
}

@media (max-width: 480px) {
  .dealership-lead-form-wrap {
    padding: 20px 14px;
  }

  .dealership-lead-input {
    padding: 11px 14px;
    font-size: 0.85rem;
  }

  .dealership-section-cta {
    padding: 20px 12px 4px;
  }
}
@media (max-width: 480px) {
  .dealership-lead-form-wrap {
    padding: 20px 14px;
  }

  .dealership-lead-input {
    padding: 11px 14px;
    font-size: 0.85rem;
  }

  .dealership-section-cta {
    padding: 20px 12px 4px;
  }
}
/* === GLOBAL DEALERSHIP CTA CLICK FIX === */

/* Keep CTA above section content and decorative layers */
.dealership-section-cta {
  position: relative !important;
  z-index: 100 !important;
  pointer-events: auto !important;
  isolation: isolate;
}

/* Keep button clickable */
.dealership-section-cta-button,
.dealership-apply-trigger,
[data-dealership-form-trigger] {
  position: relative !important;
  z-index: 101 !important;
  pointer-events: auto !important;
  cursor: pointer !important;
}

/* Keep opened form clickable */
.dealership-inline-form-slot,
[data-dealership-form-slot],
.dealership-form-container,
.dealership-lead-form-wrap {
  position: relative !important;
  z-index: 100 !important;
  pointer-events: auto !important;
}

/* Decorative section layers must never block clicks */
section::before,
section::after {
  pointer-events: none !important;
}