/* ════════════════════════════════════════════════════════════
   PEREGO CARS — Forms component library
   v1.0.0 — 2026-05-21
   Native form UI shared by contact.html + leasing demande + future forms.
   Uses brand tokens from brand-overlay.css.
   ════════════════════════════════════════════════════════════ */

:root {
  --pcf-ink:        #1A1A1A;
  --pcf-ink-soft:   #4A4A4A;
  --pcf-muted:      #8A8A8A;
  --pcf-line:       #E5E5E2;
  --pcf-line-soft:  #F0F0EC;
  --pcf-bg:         #FFFFFF;
  --pcf-bg-soft:    #FAFAF7;
  --pcf-orange:     #FF4605;
  --pcf-orange-dk:  #D63A00;
  --pcf-green:      #16A34A;
  --pcf-red:        #DC2626;
  --pcf-shadow:     0 1px 2px rgba(15,17,21,.04), 0 4px 12px -4px rgba(15,17,21,.08);
  --pcf-shadow-h:   0 1px 2px rgba(15,17,21,.04), 0 12px 28px -8px rgba(15,17,21,.18);
}

/* ── Shell ────────────────────────────────────────────────── */
.pcf-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 24px 80px;
  font-family: "Lato", -apple-system, BlinkMacSystemFont, "Inter", sans-serif;
  color: var(--pcf-ink);
}
.pcf-shell--split {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 48px;
}
@media (max-width: 900px) {
  .pcf-shell--split { grid-template-columns: 1fr; gap: 32px; }
}

.pcf-hero {
  text-align: center;
  margin-bottom: 48px;
}
.pcf-hero-eyebrow {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--pcf-orange);
  background: rgba(255, 70, 5, .08);
  border: 1px solid rgba(255, 70, 5, .15);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.pcf-hero-title {
  font-family: "Crimson Pro", Georgia, serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.5px;
  margin: 0 0 12px;
  line-height: 1.1;
}
.pcf-hero-title em {
  color: var(--pcf-orange);
  font-style: italic;
}
.pcf-hero-sub {
  font-size: 1rem;
  color: var(--pcf-ink-soft);
  max-width: 580px;
  margin: 0 auto;
  line-height: 1.55;
}

/* ── Card ─────────────────────────────────────────────────── */
.pcf-card {
  background: var(--pcf-bg);
  border: 1px solid var(--pcf-line);
  border-radius: 14px;
  padding: 36px;
  box-shadow: var(--pcf-shadow);
}
@media (max-width: 600px) {
  .pcf-card { padding: 24px; border-radius: 12px; }
}

/* ── Progress bar (multi-step wizard) ─────────────────────── */
.pcf-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--pcf-line);
}
.pcf-progress-step {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--pcf-muted);
  transition: color .2s;
}
.pcf-progress-step.is-active { color: var(--pcf-ink); }
.pcf-progress-step.is-done   { color: var(--pcf-green); }
.pcf-progress-num {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--pcf-bg-soft);
  border: 1.5px solid var(--pcf-line);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  transition: all .2s;
}
.pcf-progress-step.is-active .pcf-progress-num {
  background: var(--pcf-ink);
  border-color: var(--pcf-ink);
  color: #fff;
}
.pcf-progress-step.is-done .pcf-progress-num {
  background: var(--pcf-green);
  border-color: var(--pcf-green);
  color: #fff;
}
.pcf-progress-bar {
  flex: 1;
  height: 2px;
  background: var(--pcf-line);
  border-radius: 1px;
  overflow: hidden;
  position: relative;
}
.pcf-progress-bar:after {
  content: ;
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: var(--pcf-progress-pct, 0%);
  background: var(--pcf-orange);
  transition: width .3s ease;
}

/* ── Step pane ───────────────────────────────────────────── */
.pcf-step { display: none; animation: pcf-fade-in .25s ease; }
.pcf-step.is-active { display: block; }
@keyframes pcf-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.pcf-step-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 6px;
}
.pcf-step-sub {
  font-size: 0.875rem;
  color: var(--pcf-ink-soft);
  margin: 0 0 24px;
}

/* ── Field row / grid ─────────────────────────────────────── */
.pcf-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.pcf-grid--3 { grid-template-columns: repeat(3, 1fr); }
.pcf-grid--4 { grid-template-columns: repeat(4, 1fr); }
.pcf-field--full { grid-column: 1 / -1; }
@media (max-width: 600px) {
  .pcf-grid, .pcf-grid--3, .pcf-grid--4 { grid-template-columns: 1fr; }
}

/* ── Field (input/select/textarea) ────────────────────────── */
.pcf-field { display: flex; flex-direction: column; gap: 6px; }
.pcf-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--pcf-ink-soft);
}
.pcf-label .pcf-req { color: var(--pcf-orange); margin-left: 2px; }

.pcf-input,
.pcf-select,
.pcf-textarea {
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  color: var(--pcf-ink);
  background: var(--pcf-bg);
  border: 1px solid var(--pcf-line);
  border-radius: 8px;
  padding: 12px 14px;
  transition: border-color .15s, box-shadow .15s;
  box-sizing: border-box;
}
.pcf-input:focus,
.pcf-select:focus,
.pcf-textarea:focus {
  outline: none;
  border-color: var(--pcf-orange);
  box-shadow: 0 0 0 3px rgba(255, 70, 5, .12);
}
.pcf-input::placeholder,
.pcf-textarea::placeholder {
  color: var(--pcf-muted);
}
.pcf-textarea { min-height: 120px; resize: vertical; }
.pcf-select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' stroke='%231A1A1A' stroke-width='1.5' fill='none'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px;
  padding-right: 40px;
}

.pcf-help {
  font-size: 12px;
  color: var(--pcf-muted);
  margin-top: 2px;
}
.pcf-error {
  font-size: 12px;
  color: var(--pcf-red);
  display: none;
  margin-top: 4px;
}
.pcf-field.has-error .pcf-input,
.pcf-field.has-error .pcf-select,
.pcf-field.has-error .pcf-textarea { border-color: var(--pcf-red); }
.pcf-field.has-error .pcf-error { display: block; }

/* ── Radio / checkbox tiles (visual cards) ────────────────── */
.pcf-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}
.pcf-tile { position: relative; }
.pcf-tile input {
  position: absolute;
  opacity: 0;
  inset: 0;
  width: 100%; height: 100%;
  cursor: pointer;
}
.pcf-tile-body {
  border: 1.5px solid var(--pcf-line);
  border-radius: 10px;
  padding: 14px 12px;
  text-align: center;
  cursor: pointer;
  transition: all .15s;
  background: var(--pcf-bg);
}
.pcf-tile input:checked + .pcf-tile-body {
  border-color: var(--pcf-orange);
  background: rgba(255, 70, 5, .04);
  box-shadow: 0 0 0 3px rgba(255, 70, 5, .08);
}
.pcf-tile-label {
  font-size: 14px;
  font-weight: 600;
}
.pcf-tile-sub {
  font-size: 11px;
  color: var(--pcf-muted);
  margin-top: 2px;
  letter-spacing: 0.5px;
}

/* ── Checkbox single (consent) ────────────────────────────── */
.pcf-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--pcf-ink-soft);
  line-height: 1.5;
  margin-top: 8px;
  cursor: pointer;
}
.pcf-check input[type=checkbox] {
  width: 18px; height: 18px;
  margin-top: 2px;
  accent-color: var(--pcf-orange);
  flex-shrink: 0;
  cursor: pointer;
}
.pcf-check a { color: var(--pcf-orange); text-decoration: underline; }

/* ── Buttons / actions ───────────────────────────────────── */
.pcf-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
}
.pcf-actions--end { justify-content: flex-end; }

.pcf-btn {
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 14px 28px;
  border-radius: 8px;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s, background .15s;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.pcf-btn--primary {
  background: var(--pcf-orange);
  color: #fff;
  box-shadow: 0 6px 14px -4px rgba(255, 70, 5, .4);
}
.pcf-btn--primary:hover:not(:disabled) {
  background: var(--pcf-orange-dk);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px -4px rgba(255, 70, 5, .5);
}
.pcf-btn--ghost {
  background: transparent;
  color: var(--pcf-ink-soft);
  border: 1px solid var(--pcf-line);
}
.pcf-btn--ghost:hover { border-color: var(--pcf-ink); color: var(--pcf-ink); }
.pcf-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }

.pcf-btn--loading .pcf-btn-label { opacity: .6; }
.pcf-btn-spinner {
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: pcf-spin .8s linear infinite;
  display: none;
}
.pcf-btn--loading .pcf-btn-spinner { display: inline-block; }
@keyframes pcf-spin { to { transform: rotate(360deg); } }

/* ── Success state ───────────────────────────────────────── */
.pcf-success {
  display: none;
  text-align: center;
  padding: 24px 12px;
  animation: pcf-pop .35s cubic-bezier(.2,.7,.2,1);
}
.pcf-success.is-visible { display: block; }
@keyframes pcf-pop {
  0% { opacity: 0; transform: scale(.95); }
  100% { opacity: 1; transform: scale(1); }
}
.pcf-success-icon {
  width: 68px; height: 68px;
  border-radius: 50%;
  background: rgba(22, 163, 74, .1);
  color: var(--pcf-green);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.pcf-success-title {
  font-family: "Crimson Pro", Georgia, serif;
  font-size: 1.6rem;
  font-weight: 600;
  margin: 0 0 8px;
}
.pcf-success-sub { color: var(--pcf-ink-soft); margin: 0 0 24px; line-height: 1.55; }

/* ── Side panel (contact info) ───────────────────────────── */
.pcf-side {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.pcf-side-card {
  border: 1px solid var(--pcf-line);
  border-radius: 12px;
  padding: 24px;
  background: var(--pcf-bg-soft);
}
.pcf-side-label {
  font-size: 10px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--pcf-orange);
  font-weight: 700;
  margin-bottom: 8px;
}
.pcf-side-val {
  font-size: 16px;
  color: var(--pcf-ink);
  line-height: 1.5;
}
.pcf-side-val a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--pcf-line); }
.pcf-side-val a:hover { border-color: var(--pcf-orange); color: var(--pcf-orange); }

/* ── Vehicle summary card (leasing form step 1) ──────────── */
.pcf-veh-card {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--pcf-line);
  border-radius: 10px;
  background: var(--pcf-bg-soft);
  align-items: center;
  margin-bottom: 16px;
}
.pcf-veh-img {
  width: 80px; height: 60px;
  background: #E5E5E2 center/cover no-repeat;
  border-radius: 6px;
}
.pcf-veh-title { font-weight: 700; font-size: 14px; }
.pcf-veh-sub   { font-size: 12px; color: var(--pcf-muted); margin-top: 2px; }
.pcf-veh-price { font-weight: 700; color: var(--pcf-orange); font-size: 15px; white-space: nowrap; }

/* ── File upload (drop zone + chip list) — v1.1.0 add-on ───────── */
.pcf-file-drop {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 28px 20px;
  border: 1.5px dashed var(--pcf-line);
  border-radius: 10px;
  background: var(--pcf-bg-soft);
  cursor: pointer;
  transition: border-color .15s, background .15s;
  text-align: center;
}
.pcf-file-drop:hover,
.pcf-file-drop.is-over {
  border-color: var(--pcf-orange);
  background: rgba(255, 70, 5, .03);
}
.pcf-file-drop input[type=file] {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  opacity: 0;
  cursor: pointer;
}
.pcf-file-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--pcf-bg);
  border: 1px solid var(--pcf-line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--pcf-ink-soft);
  margin-bottom: 4px;
}
.pcf-file-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--pcf-ink);
}
.pcf-file-hint {
  font-size: 11px;
  letter-spacing: 0.5px;
  color: var(--pcf-muted);
}

.pcf-file-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.pcf-file-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 6px 12px;
  background: rgba(255, 70, 5, .08);
  border: 1px solid rgba(255, 70, 5, .25);
  border-radius: 999px;
  font-size: 12px;
  color: var(--pcf-ink);
  max-width: 100%;
}
.pcf-file-chip-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 220px;
}
.pcf-file-chip-size {
  color: var(--pcf-muted);
  font-size: 11px;
}
.pcf-file-chip-x {
  border: none;
  background: transparent;
  color: var(--pcf-ink-soft);
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
  font-size: 16px;
}
.pcf-file-chip-x:hover { color: var(--pcf-red); }
