/* === Address Autocomplete Dropdown === */
.address-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 2px);
  z-index: 100;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  max-height: 220px;
  overflow-y: auto;
}
.address-option {
  padding: 9px 12px;
  font-size: 13.5px;
  color: #1f2937;
  cursor: pointer;
  border-bottom: 1px solid #f3f4f6;
  outline: none;
  transition: background 0.1s;
}
.address-option:last-child { border-bottom: none; }
.address-option:hover,
.address-option:focus {
  background: #eff6ff;
  color: #1d4ed8;
}

/* === Loading spinner === */
@keyframes spin {
  to { transform: rotate(360deg); }
}
.animate-spin {
  animation: spin 1s linear infinite;
}

/* === Form styles === */
input:invalid:not(:placeholder-shown):not(:focus),
select:invalid:not(:focus).touched {
  border-color: #ef4444;
}
input:valid:not(:placeholder-shown),
select:valid.touched {
  border-color: #22c55e;
}
section {
  animation: fadeInUp 0.3s ease-out;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === Warranty Document Styles === */
.warranty-page {
  max-width: 8.5in;
  margin: 0 auto;
  padding: 0.5in 0.6in;
  background: white;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11px;
  color: #1a1a1a;
  line-height: 1.4;
}
.w-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}
.w-logo { max-height: 90px; }
.w-header-right {
  text-align: right;
  font-size: 10px;
  color: #333;
  line-height: 1.5;
}
.w-title {
  font-size: 18px;
  font-weight: bold;
  color: #000;
  margin-bottom: 2px;
}
.w-subtitle {
  font-size: 14px;
  font-weight: bold;
  color: #2980b9;
  font-style: italic;
  margin-bottom: 12px;
}
.w-section {
  border: 1px solid #ccc;
  padding: 10px 12px;
  margin-bottom: 10px;
}
.w-section-title {
  font-size: 13px;
  font-weight: bold;
  text-transform: uppercase;
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid #999;
}
.w-row {
  display: flex;
  gap: 20px;
  margin-bottom: 6px;
}
.w-field { flex: 1; }
.w-label {
  font-weight: bold;
  font-size: 10px;
  color: #555;
}
.w-value {
  font-size: 12px;
  color: #000;
  padding: 2px 0;
  border-bottom: 1px solid #ddd;
  min-height: 18px;
}
.w-vin {
  font-family: monospace;
  letter-spacing: 1px;
}

/* Warranty details */
.w-details-title {
  font-size: 12px;
  font-weight: bold;
  margin-top: 12px;
  margin-bottom: 6px;
  border-bottom: 2px solid #333;
  padding-bottom: 3px;
}
.w-details-border {
  border-top: 2px solid #333;
  padding-top: 8px;
  margin-bottom: 8px;
}
.w-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 40px;
}
.w-detail {
  display: flex;
  gap: 8px;
  padding: 3px 0;
}
.w-detail-label {
  font-weight: bold;
  font-size: 11px;
  min-width: 120px;
}
.w-detail-value { font-size: 11px; }

/* Terms */
.w-terms {
  margin-top: 10px;
  padding-top: 6px;
}
.w-terms-title {
  font-size: 12px;
  font-weight: bold;
  margin-bottom: 6px;
  border-bottom: 2px solid #333;
  padding-bottom: 3px;
}
.w-terms ul {
  padding-left: 14px;
  font-size: 9px;
  line-height: 1.45;
  color: #222;
}
.w-terms li { margin-bottom: 4px; }

/* Signatures */
.w-signatures {
  display: flex;
  justify-content: space-between;
  margin-top: 18px;
  gap: 40px;
}
.w-sig-block { flex: 1; }
.w-sig-label { font-size: 10px; color: #555; margin-bottom: 4px; }
.w-sig-line {
  border-bottom: 1px solid #000;
  height: 30px;
  line-height: 30px;
  margin-bottom: 4px;
  font-size: 10px;
  color: #999;
}
.w-sig-name { font-size: 10px; color: #333; }

/* Dealer footer */
.w-dealer-footer {
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid #ccc;
  font-size: 9.5px;
  font-style: italic;
  color: #444;
}
.w-dealer-info {
  font-style: normal;
  font-weight: bold;
  margin-top: 3px;
  font-size: 10px;
}

/* === Disclosure Pages === */
.page-break {
  page-break-before: always;
}
.disc-heading {
  font-size: 12px;
  font-weight: bold;
  color: #000;
  margin-top: 14px;
  margin-bottom: 4px;
  padding-bottom: 2px;
  border-bottom: 1px solid #ccc;
}
.disc-subheading {
  font-size: 11px;
  font-weight: bold;
  color: #1a1a1a;
  margin-top: 10px;
  margin-bottom: 3px;
}
.disc-sub {
  font-weight: bold;
  font-size: 10px;
  margin-top: 6px;
  margin-bottom: 2px;
}
.warranty-page p {
  font-size: 9.5px;
  line-height: 1.5;
  color: #222;
  margin-bottom: 4px;
}
.disc-list {
  padding-left: 16px;
  font-size: 9.5px;
  line-height: 1.5;
  color: #222;
  margin-bottom: 6px;
}
.disc-list li {
  margin-bottom: 2px;
}

/* === Print === */
@media print {
  .no-print {
    display: none !important;
  }
  body {
    background: white;
    margin: 0;
    padding: 0;
  }
  .warranty-page {
    padding: 0.4in 0.5in;
    max-width: none;
    box-shadow: none;
  }
  .page-break {
    page-break-before: always;
  }
  #warrantyDocument {
    display: block !important;
  }
}

/* Screen-only: give the document a paper look */
@media screen {
  .warranty-page {
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    margin-top: 12px;
    margin-bottom: 40px;
  }
  .page-break {
    border-top: 2px dashed #ccc;
    padding-top: 20px;
  }
}
