/* Base & Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #ebf1f5;
  color: #1e293b;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem 1rem;
}

/* Center card structure */
.form-container {
  width: 100%;
  max-width: 480px;
  display: flex;
  justify-content: center;
}

.lead-card {
  width: 100%;
  background-color: #ffffff;
  border-radius: 24px;
  padding: 2.5rem 2.25rem;
  box-shadow: 0 15px 35px rgba(15, 30, 54, 0.04);
  position: relative;
  overflow: hidden;
}

/* Logo Box styling */
.logo-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.logo-box {
  background-color: #ffffff;
  border: 1px solid #eef2f5;
  border-radius: 12px;
  width: 170px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
}

.logo-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Typography */
.form-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: #0f1e36;
  text-align: center;
  margin-bottom: 0.5rem;
  letter-spacing: -0.5px;
}

.form-subtitle {
  font-size: 0.875rem;
  color: #64748b;
  text-align: center;
  margin-bottom: 2rem;
  line-height: 1.45;
}

/* Form inputs & grids */
.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 1.25rem;
  position: relative;
}

.form-row {
  display: flex;
  gap: 1rem;
  width: 100%;
}

.date-row {
  margin-bottom: 1.25rem;
}

.date-row .form-group {
  margin-bottom: 0;
}

.col-4 {
  width: calc(33.33% - 0.66rem);
  flex: 1;
}

label {
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: 700;
  color: #5a6a85;
  letter-spacing: 0.8px;
  margin-bottom: 0.5rem;
  display: inline-block;
}

input[type="text"],
input[type="tel"],
input[type="email"],
input[type="url"],
input[type="number"],
select,
textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 1.15rem;
  font-family: inherit;
  font-size: 0.95rem;
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  color: #1e293b;
  transition: all 0.2s ease-in-out;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #007a87;
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(0, 122, 135, 0.08);
}

/* Select element overrides */
select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 8.25l-7.5 7.5-7.5-7.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 0.9rem;
  padding-right: 2.5rem;
  cursor: pointer;
}

select:invalid {
  color: #94a3b8;
}

textarea {
  resize: vertical;
  min-height: 80px;
}

/* Error states */
.error-msg {
  font-size: 0.75rem;
  color: #ef4444;
  margin-top: 0.25rem;
  min-height: 1rem;
}

input.user-invalid,
select.user-invalid {
  border-color: #ef4444;
  background-color: #fffafb;
}

input.user-invalid:focus,
select.user-invalid:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.08);
}

/* Accordion details panel */
.accordion-container {
  margin-bottom: 1.5rem;
}

.accordion-toggle {
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  padding: 0.5rem 0;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: #007a87;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  outline: none;
  transition: color 0.2s ease;
}

.accordion-toggle:hover {
  color: #005a63;
}

.accordion-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease-out;
}

.accordion-panel.show {
  max-height: 800px;
  transition: max-height 0.3s ease-in;
}

.accordion-content {
  padding: 0.75rem 0.25rem 0.5rem 0.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

/* Button style matching teal logo theme */
.submit-btn {
  width: 100%;
  min-height: 50px;
  background-color: #007a87;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.submit-btn:hover {
  background-color: #00636d;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 122, 135, 0.15);
}

.submit-btn:active {
  transform: translateY(0);
}

.btn-arrow {
  font-size: 1.1rem;
  transition: transform 0.2s ease;
}

.submit-btn:hover .btn-arrow {
  transform: translateX(3px);
}

/* Status overlays */
.status-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.96);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 2rem;
}

.status-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.overlay-card {
  text-align: center;
  max-width: 320px;
  width: 100%;
}

.status-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: scaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Spinner anim */
.spinner {
  width: 42px;
  height: 42px;
  border: 3px solid #e2e8f0;
  border-top-color: #007a87;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 1.25rem;
}

.status-text {
  font-size: 1rem;
  font-weight: 500;
  color: #64748b;
}

/* Success / Error States */
.status-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.status-icon.success {
  background-color: #e6f4ea;
  color: #137333;
}

.status-icon.error {
  background-color: #fce8e6;
  color: #c5221f;
}

.status-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #0f1e36;
  margin-bottom: 0.5rem;
}

.status-desc {
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.btn-dismiss {
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  color: #475569;
  font-family: inherit;
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.5rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-dismiss:hover {
  background-color: #f8fafc;
  border-color: #94a3b8;
}

/* Animations */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

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

.hidden {
  display: none !important;
}

/* iOS zoom prevention */
@media (pointer: coarse) {
  input, select, textarea {
    min-height: 52px;
  }
}
