/* AutoDetective.ai - Lead Capture Styles */

/* Lead Capture Card */
.lead-capture-card {
  margin: 2rem 0;
  animation: slideUp 0.3s ease-out;
}

.lead-capture-card .card-header {
  border-bottom: 2px solid var(--accent-color);
}

.lead-capture-card .form-control:focus,
.lead-capture-card .form-select:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 0.2rem rgba(255, 193, 7, 0.25);
}

.lead-capture-card .form-control.is-valid,
.lead-capture-card .form-select.is-valid {
  border-color: var(--success-color);
}

.lead-capture-card .form-control.is-invalid,
.lead-capture-card .form-select.is-invalid {
  border-color: var(--danger-color);
}

.lead-capture-card .btn-warning:hover {
  background-color: var(--accent-dark);
  border-color: var(--accent-dark);
  transform: translateY(-1px);
}

.lead-capture-card .btn-warning:active {
  transform: translateY(0);
}

/* Mobile Sticky Bar */
.lead-sticky-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border-top: 2px solid var(--accent-color);
  z-index: 1040;
  animation: slideUp 0.3s ease-out;
  color: white;
}

.lead-sticky-bar .btn-warning {
  padding: 0.375rem 1rem;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Exit Intent Popup */
.lead-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.lead-popup-content {
  background: white;
  border-radius: 0.5rem;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.5rem;
  position: relative;
  animation: popIn 0.3s ease-out;
}

@keyframes popIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.lead-popup-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--secondary-color);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  line-height: 1;
  transition: color 0.2s;
}

.lead-popup-close:hover {
  color: var(--dark-color);
}

/* Popup form adjustments */
.lead-popup-content .lead-capture-card {
  margin: 0;
  border: none;
  box-shadow: none;
}

.lead-popup-content .lead-capture-card .card-header {
  display: none;
}

.lead-popup-content .lead-capture-card .card-body {
  padding: 0;
}

/* Success state styling */
#lead-success .bi-check-circle-fill {
  animation: scaleIn 0.3s ease-out;
}

@keyframes scaleIn {
  from {
    transform: scale(0);
  }
  to {
    transform: scale(1);
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .lead-capture-card {
    margin: 1.5rem 0;
  }

  .lead-capture-card .card-body {
    padding: 1rem;
  }

  .lead-sticky-bar .container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .lead-popup-content {
    padding: 1rem;
    margin: 0.5rem;
  }
}

/* Print - hide lead capture elements */
@media print {
  .lead-capture-card,
  .lead-sticky-bar,
  .lead-popup-overlay {
    display: none !important;
  }
}
