/* ── QUOTE-REQUEST.CSS ─────────────────────────────────────────────────────────
   Customer-facing quote request form.
   Design: warm off-white body, navy/blue/red brand, Outfit + DM Sans fonts.
   Loads after theme.css which provides :root tokens.
   ───────────────────────────────────────────────────────────────────────────── */

.qr-page { background: #faf9f7; min-height: 100vh; }

.qr-hero {
  background: linear-gradient(135deg, #1a2744 0%, #0f172a 100%);
  padding: 56px 24px 48px;
  position: relative;
  overflow: hidden;
}
.qr-hero::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -15%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(59,130,246,0.12) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.qr-hero::after {
  content: '';
  position: absolute;
  bottom: -20%;
  left: -5%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(220,38,38,0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.qr-hero-inner {
  max-width: 640px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.qr-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.8);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.qr-badge .dot {
  width: 6px;
  height: 6px;
  background: #34d399;
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.qr-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: #ffffff;
  margin-bottom: 12px;
}
.qr-hero h1 em { font-style: normal; color: #3b82f6; }
.qr-hero-sub {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.75);
  line-height: 1.7;
  max-width: 480px;
}
.qr-trust-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}
.qr-trust-pills span {
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255,255,255,0.65);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 100px;
  padding: 4px 12px;
}

/* ── MAIN CONTENT ── */
.qr-main { padding: 48px 24px 80px; }

.qr-container {
  max-width: 680px;
  margin: 0 auto;
}

/* ── FORM ── */
.qr-form-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 36px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04), 0 8px 32px rgba(0,0,0,0.04);
}

.qr-section-label {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid #e5e7eb;
  display: flex;
  align-items: center;
  gap: 10px;
}

.qr-section-label .num {
  width: 28px;
  height: 28px;
  background: var(--blue);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
  flex-shrink: 0;
}

.qr-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}
.qr-field-group:last-child { margin-bottom: 0; }

.qr-field-row { display: flex; gap: 14px; }
.qr-field-row > * { flex: 1; }

label, .qr-label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  font-family: var(--font-body);
  letter-spacing: 0.1px;
}

.required-mark { color: var(--red); font-size: 0.85em; }

.qr-input,
.qr-select,
input[type="text"],
input[type="tel"],
input[type="email"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  min-height: 46px;
  background: #f9fafb;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 16px;
  color: #1f2937;
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
  -webkit-appearance: none;
}

.qr-input:focus,
.qr-select:focus,
input[type="text"]:focus,
input[type="tel"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(30,64,175,0.1);
  background: #ffffff;
}

.qr-input::placeholder,
input::placeholder,
textarea::placeholder { color: #9ca3af; }

.qr-select {
  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='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}

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

.qr-hint {
  font-size: 12px;
  color: #9ca3af;
  line-height: 1.5;
  margin-top: 4px;
}

/* ── INPUT ERROR STATES ── */
.qr-input.qr-input-error,
.qr-select.qr-input-error {
  border-color: var(--red);
  background: rgba(220,38,38,0.04);
}

.qr-field-error {
  font-size: 12px;
  color: var(--red);
  margin-top: 2px;
}

/* ── VIN UPPERCASE ── */
.qr-vin-input { text-transform: uppercase; }

/* ── SECTION SPACING ── */
.qr-section { margin-bottom: 28px; }
.qr-section:last-of-type { margin-bottom: 0; }

/* ── GLASS TYPE GRID ── */
.qr-glass-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.qr-glass-opt {
  cursor: pointer;
  position: relative;
}

.qr-glass-opt input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.qr-glass-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 10px;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  background: #f9fafb;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  text-align: center;
  cursor: pointer;
}

.qr-glass-icon { font-size: 22px; line-height: 1; }

.qr-glass-name {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  color: #374151;
  line-height: 1.3;
}

.qr-glass-opt:hover .qr-glass-label {
  border-color: #93c5fd;
  background: #eff6ff;
}

.qr-glass-opt input:checked + .qr-glass-label,
.qr-glass-opt.selected .qr-glass-label {
  border-color: var(--blue);
  background: rgba(30,64,175,0.06);
  box-shadow: 0 0 0 3px rgba(30,64,175,0.1);
}

/* ── INSURANCE CHOICE ── */
.qr-insurance-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.qr-ins-opt {
  cursor: pointer;
  position: relative;
}

.qr-ins-opt input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.qr-ins-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  background: #f9fafb;
  transition: border-color 0.2s, background 0.2s;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
}

.qr-ins-icon { font-size: 18px; flex-shrink: 0; }

.qr-ins-opt:hover .qr-ins-label {
  border-color: #93c5fd;
  background: #eff6ff;
}

.qr-ins-opt input:checked + .qr-ins-label,
.qr-ins-opt.selected .qr-ins-label {
  border-color: var(--blue);
  background: rgba(30,64,175,0.06);
}

/* ── INSURANCE CARRIER REVEAL ── */
.qr-insurance-details {
  display: none;
  margin-top: 16px;
  padding: 20px;
  background: rgba(30,64,175,0.04);
  border: 1px solid rgba(30,64,175,0.15);
  border-radius: 12px;
  animation: slideDown 0.25s ease;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.qr-insurance-details.visible { display: block; }

/* ── SUBMIT BUTTON ── */
.qr-submit-row {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #e5e7eb;
}

.btn-qr-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px 24px;
  background: var(--red);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  letter-spacing: 0.2px;
}

.btn-qr-submit:hover {
  background: #b91c1c;
  transform: translateY(-2px);
}

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

.qr-submit-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 0.78rem;
  color: #9ca3af;
}
.qr-submit-trust svg { flex-shrink: 0; }

/* ── ERROR ── */
.qr-error {
  background: rgba(220,38,38,0.06);
  border: 1px solid rgba(220,38,38,0.25);
  border-left: 4px solid var(--red);
  color: #b91c1c;
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 15px;
  margin-bottom: 20px;
  font-weight: 500;
}

/* ── CONFIRMATION CARD ── */
.qr-confirm-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 48px 40px;
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
}

.qr-confirm-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: #ffffff;
  font-size: 28px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  box-shadow: 0 8px 24px rgba(34,197,94,0.25);
}

.qr-confirm-heading {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #111827;
  margin-bottom: 12px;
}

.qr-confirm-body {
  color: #6b7280;
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 28px;
}

.qr-confirm-details {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 28px;
  text-align: left;
}

.qr-confirm-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  font-size: 14px;
  border-bottom: 1px solid #e5e7eb;
}
.qr-confirm-row:last-child { border-bottom: none; }
.qr-confirm-label { color: #9ca3af; }
.qr-confirm-value { font-weight: 600; color: #1f2937; }

.qr-confirm-ctas {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.btn-qr-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  background: var(--red);
  color: #ffffff;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s;
  min-width: 200px;
}
.btn-qr-primary:hover { background: #b91c1c; }

.btn-qr-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  color: #374151;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}
.btn-qr-secondary:hover { border-color: #3b82f6; color: #1e40af; }

.qr-confirm-reassurance {
  margin-top: 20px;
  padding: 14px 18px;
  background: rgba(34,197,94,0.07);
  border: 1px solid rgba(34,197,94,0.2);
  border-radius: 10px;
  font-size: 0.88rem;
  color: #15803d;
  font-weight: 500;
  line-height: 1.6;
}

/* ── SIDEBAR TRUST CARD (desktop) ── */
.qr-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 28px;
  max-width: 940px;
  margin: 0 auto;
  align-items: start;
}

.qr-trust-sidebar { position: sticky; top: 80px; }

.qr-trust-card {
  background: linear-gradient(135deg, #1a2744 0%, #0f172a 100%);
  border-radius: 14px;
  padding: 24px 22px;
  color: #e8e6e1;
}

.qr-trust-card-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: #3b82f6;
  margin-bottom: 16px;
}

.qr-trust-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13px;
  color: rgba(255,255,255,0.75);
  line-height: 1.4;
}

.qr-trust-list .check {
  color: #3b82f6;
  font-weight: 700;
  margin-right: 6px;
}

.qr-trust-divider {
  height: 1px;
  background: rgba(255,255,255,0.1);
  margin: 16px 0;
}

.qr-trust-phone {
  display: block;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: #3b82f6;
  text-decoration: none;
  margin-bottom: 8px;
  transition: opacity 0.2s;
}
.qr-trust-phone:hover { opacity: 0.8; }

.qr-trust-addr {
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  line-height: 1.6;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .qr-layout { grid-template-columns: 1fr; }
  .qr-trust-sidebar { position: static; order: 2; }
  .qr-form-card { order: 1; }
}

@media (max-width: 600px) {
  .qr-hero { padding: 40px 16px 36px; }
  .qr-hero h1 { font-size: 1.9rem; }
  .qr-main { padding: 28px 16px 60px; }
  .qr-form-card { padding: 24px 16px; }
  .qr-glass-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .qr-insurance-grid { grid-template-columns: 1fr; }
  .qr-field-row { flex-direction: column; gap: 12px; }
  .qr-confirm-card { padding: 32px 20px; }
  label, .qr-label { font-size: 15px; }
  .btn-qr-submit {
    min-height: 52px;
    font-size: 1.05rem;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }
}

@media (max-width: 400px) {
  .qr-glass-grid { grid-template-columns: repeat(2, 1fr); }
}