/* ===========================================================================
   Érdeklődési űrlapok (tesztvezetés / kapcsolat / árajánlat)
   ---------------------------------------------------------------------------
   Ezek az űrlapok korábban a third-party "carussel dealer-toolkit" widgetből
   jöttek (`DWT.Webform.render`), ami a saját CRM-jébe küldte a beküldéseket,
   és a widget bundle időnként be sem töltött (végtelen spinner). Most saját
   markup + saját backend (mail-backend) küldi az emailt.

   A tulajdonos kérése (2026-08-22): mindhárom oldalon PONTOSAN ugyanez az
   űrlap, ugyanazokkal a mezőkkel. A méretek/színek a tulajdonos által
   megadott referencia-képernyőképből és az eredeti widget kiszámított
   stílusaiból (assets/css/generated/kapcsolat-*-styled.css) származnak:
     input 48px magas, 6px radius, 1px #b4bbbf border, 15px szöveg
     cím 40px (960px alatt 32px), mezőoszlop 38px alsó margó
     2 hasáb 16px hézaggal, submit gomb 327px, XPENG zöld #96b414
     jogi szöveg 15px/22px, linkek félkövér + aláhúzott, feketék
=========================================================================== */

:root {
  --xp-green: #96b414;
  --xp-green-soft: #e6f0dc;
  --xp-border: #b4bbbf;
  --xp-error: #ba4e00;
  --xp-muted: #6b7378;
  --xp-font: "BasisGrotesqueArabicPro", Arial, sans-serif;
}

.xp-form-wrap {
  max-width: 1280px;
  margin: auto;
  width: 100%;
  font-family: var(--xp-font);
  color: #000;
}

.xp-form {
  margin: auto;
  max-width: 1280px;
  padding: 32px 0 80px;
}

/* --- Cím és bevezető ----------------------------------------------------- */

.xp-form-title {
  position: relative;
  justify-content: center;
  height: fit-content;
  font-size: 40px;
  font-style: normal;
  font-weight: 400;
  line-height: 150%;
  text-align: center;
  padding-bottom: 16px;
  margin: 0;
  font-family: var(--xp-font);
}

.xp-form-description {
  font-size: 16px;
  font-style: normal;
  font-weight: 300;
  line-height: 150%;
  margin: 0 0 64px;
  text-align: center;
  padding-left: 10px;
  padding-right: 10px;
  font-family: var(--xp-font);
}

.xp-form-description p {
  margin: 0;
}

/* --- Mezőrács ----------------------------------------------------------- */

.xp-form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 16px;
}

.xp-field {
  margin-bottom: 38px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.xp-field--full {
  grid-column: 1 / -1;
}

/* A Cégnév mező csak "Vállalkozó" ügyféltípus esetén jelenik meg (a JS
   állítja a `hidden` attribútumot). Explicit szabály kell, mert a
   `.xp-field { display: flex }` egyébként legyőzné a böngésző
   `[hidden] { display: none }` szabályát. */
.xp-field[hidden] {
  display: none;
}

.xp-field > label {
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: 20px;
  display: flex;
  align-items: flex-end;
  word-break: break-word;
  color: #000;
  margin-bottom: 4px;
}

.xp-required {
  word-break: break-word;
  font-size: 16px;
  padding-top: 4px;
  margin-left: 5px;
  color: #000;
}

/* --- Szövegmezők -------------------------------------------------------- */

.xp-field input[type="text"],
.xp-field input[type="tel"],
.xp-field input[type="email"] {
  color: #000;
  padding: 8px 16px;
  appearance: none;
  -webkit-appearance: none;
  background-color: transparent;
  box-sizing: border-box;
  font-family: var(--xp-font);
  height: 48px;
  width: 100%;
  font-size: 15px;
  line-height: 20px;
  box-shadow: none;
  outline: none;
  border-radius: 6px;
  border: 1px solid var(--xp-border);
}

.xp-field textarea {
  color: #000;
  padding: 8px 16px;
  appearance: none;
  background-color: transparent;
  box-sizing: border-box;
  font-family: var(--xp-font);
  min-height: 96px;
  width: 100%;
  font-size: 15px;
  line-height: 20px;
  box-shadow: none;
  outline: none;
  border-radius: 6px;
  border: 1px solid var(--xp-border);
  resize: vertical;
}

.xp-field input::placeholder,
.xp-field textarea::placeholder {
  color: #8b9296;
  opacity: 1;
}

.xp-field input:focus,
.xp-field textarea:focus {
  outline: none;
  border-color: #000;
}

.xp-field.is-invalid input,
.xp-field.is-invalid textarea {
  border-color: var(--xp-error);
}

.xp-field-error {
  word-break: break-word;
  color: var(--xp-error);
  display: none;
  font-size: 14px;
  line-height: 18px;
  font-family: var(--xp-font);
  font-weight: 400;
  margin-top: 4px;
}

.xp-field.is-invalid .xp-field-error {
  display: block;
}

/* A Cégnév csak vállalkozás esetén kötelező, ezért a csillagát a JS
   elrejti/megjeleníti. `visibility` és nem `display`, hogy a címke magassága
   ne változzon – különben a Magánszemély/Vállalkozó váltásnál megugrana a
   mezősor, és a sorok magassága sem lenne egyenletes. */
.xp-field .xp-required[hidden] {
  display: block;
  visibility: hidden;
}

/* --- Rádiógombok (Ügyfél adatok) ---------------------------------------- */

.xp-radio-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 0;
  width: 100%;
  min-height: 30px;
}

.xp-radio {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  margin-right: 48px;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  font-family: var(--xp-font);
  color: #000;
}

.xp-radio input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.xp-radio-mark {
  cursor: pointer;
  border-radius: 50%;
  position: relative;
  box-sizing: border-box;
  width: 16px;
  height: 16px;
  border: 1px solid #b4b4b4;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #fff;
  margin-right: 10px;
  flex: 0 0 auto;
}

.xp-radio-mark::after {
  content: "";
  position: absolute;
  display: none;
  border-radius: 50%;
  background-color: var(--xp-green);
  width: 8px;
  height: 8px;
}

.xp-radio input:checked + .xp-radio-mark::after {
  display: block;
}

.xp-radio input:focus-visible + .xp-radio-mark {
  outline: 2px solid #000;
  outline-offset: 2px;
}

/* --- Modellválasztó (képes csempék) ------------------------------------- */
/* Csak a tesztvezetés és az árajánlat oldalon van; a kapcsolat oldalon nincs.
   A csempék képei (assets/images/models/*.webp) átlátszó hátterűek, és a
   modellnév vízjele bele van égetve a képbe – ezért üt át alattuk a kijelölt
   csempe zöld háttere. */

.xp-model-picker {
  margin-bottom: 38px;
}

.xp-model-picker > label {
  display: block;
  width: 100%;
  color: #000;
  word-break: break-word;
  font-family: var(--xp-font);
  padding-inline: 0 10px;
  text-transform: none;
  margin-bottom: 2px;
  font-size: 24px;
  font-style: normal;
  font-weight: 400;
  line-height: 150%;
  box-sizing: border-box;
}

.xp-model-picker > label .xp-required {
  display: inline-flex;
  align-items: flex-end;
  font-size: 16px;
  margin-left: 6px;
  color: #000;
}

.xp-model-tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
  padding: 0;
  border: 0;
  width: 100%;
  box-sizing: border-box;
}

.xp-model-tile {
  display: flex;
  flex-flow: column;
  gap: 12px;
  height: 100%;
  margin: 0;
  padding: 12px;
  cursor: pointer;
  background: transparent;
  border-radius: 0;
  box-sizing: border-box;
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.xp-model-tile input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.xp-model-tile img {
  width: 100%;
  height: auto;
  max-height: 226px;
  margin: 0;
  object-fit: contain;
  display: block;
}

.xp-model-tile-text {
  font-family: var(--xp-font);
  color: #000;
  font-weight: 400;
  font-size: 16px;
  line-height: 150%;
  text-align: center;
  margin-top: auto;
}

.xp-model-tile:hover {
  background: #f4f7ee;
}

.xp-model-tile.is-selected {
  background: var(--xp-green-soft);
  box-shadow: 0 4px 8px -2px rgba(16, 24, 40, 0.1), 0 2px 4px -2px rgba(16, 24, 40, 0.06);
}

.xp-model-tile input:focus-visible ~ .xp-model-tile-text {
  outline: 2px solid #000;
  outline-offset: 2px;
}

.xp-model-picker.is-invalid .xp-model-tiles {
  border: 1px solid var(--xp-error);
  border-radius: 10px;
}

.xp-model-picker .xp-field-error {
  margin-top: 8px;
}

.xp-model-picker.is-invalid .xp-field-error {
  display: block;
}

/* --- Jogi szövegblokk --------------------------------------------------- */

.xp-legal {
  font-family: var(--xp-font);
  font-size: 15px;
  font-weight: 400;
  line-height: 22px;
  color: #000;
  word-break: break-word;
  margin: 0;
}

.xp-legal p {
  margin: 0 0 22px;
}

.xp-legal p:last-child {
  margin-bottom: 0;
}

/* A referencián a jogi linkek félkövér, aláhúzott, fekete szövegek –
   nem a szokásos zöld linkstílus. */
.xp-legal a {
  color: #000;
  font-weight: 700;
  text-decoration: underline;
}

.xp-legal a:hover {
  color: var(--xp-green);
}

.xp-legal strong,
.xp-legal b {
  font-weight: 700;
}

/* --- Marketing csatorna jelölőnégyzetek (egy sorban) -------------------- */

.xp-channels {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 40px 0;
}

.xp-check {
  display: inline-flex;
  align-items: center;
  margin-right: 24px;
}

.xp-check input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.xp-check-mark {
  position: relative;
  box-sizing: border-box;
  border: 1px solid #000;
  margin-right: 10px;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background-color: transparent;
}

.xp-check-mark::after {
  content: "";
  width: 9px;
  height: 5px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translateY(-1px);
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
}

.xp-check input:checked + .xp-check-mark {
  border-color: transparent;
  background-color: #000;
}

.xp-check input:checked + .xp-check-mark::after {
  opacity: 1;
}

.xp-check input:focus-visible + .xp-check-mark {
  outline: 2px solid #000;
  outline-offset: 2px;
}

/* A jelölőnégyzet-doboz maga is <label for>, hogy kattintható legyen –
   ezért a méretezését nem szabad a szövegcímkével együtt felülírni. */
.xp-check label:not(.xp-check-mark) {
  line-height: 20px;
  font-size: 14px;
  font-family: var(--xp-font);
  color: #000;
  cursor: pointer;
  white-space: nowrap;
}

/* --- Beküldés ----------------------------------------------------------- */

.xp-form-actions {
  display: flex;
  justify-content: center;
  min-width: 327px;
  max-width: 327px;
  margin: 48px auto 0;
  box-sizing: border-box;
}

.xp-submit {
  font-family: var(--xp-font);
  font-size: 12px;
  font-style: normal;
  font-weight: 400;
  line-height: 120%;
  padding: 12px 20px;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  box-sizing: border-box;
  text-decoration: none;
  min-width: max-content;
  border-radius: 4px;
  width: 100%;
  justify-content: center;
  color: #000;
  background: transparent;
  border: 1px solid #000;
  position: relative;
  overflow: hidden;
  z-index: 0;
  transition: 0.55s cubic-bezier(0, 0.545, 0.19, 1);
}

.xp-submit::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background-color: var(--xp-green);
  z-index: -1;
  transition: left 0.55s cubic-bezier(0, 0.545, 0.19, 1);
}

.xp-submit:hover:not(:disabled) {
  border: 1px solid var(--xp-green);
  color: #fff;
}

.xp-submit:hover:not(:disabled)::after {
  left: 0;
}

.xp-submit:disabled {
  cursor: progress;
  opacity: 0.6;
}

.xp-form-message {
  text-align: center;
  color: var(--xp-error);
  padding: 10px;
  margin: 24px 0 0;
  font-family: var(--xp-font);
  font-size: 15px;
  line-height: 22px;
  display: none;
}

.xp-form-message.is-visible {
  display: block;
}

/* --- reCAPTCHA ---------------------------------------------------------- */

/* A lebegő badge (Google inline stílussal jobb alul pozicionálja magát)
   elrejtve: a tulajdonos szerint mindkét alsó sarok "foglalt" (bal alul
   zavaró volt tartalommal, jobb alul a jövőbeli AI chatbot helye lesz).
   A Google szabályzata szerint a badge elrejthető, HA a kötelező jogi
   szöveg máshol, láthatóan szerepel az oldalon — ez megvan a submit gomb
   alatt (.xp-recaptcha-note, ld. lejjebb), tehát ez szabályos. */
.grecaptcha-badge {
  visibility: hidden !important;
}

.xp-recaptcha-note {
  font-family: var(--xp-font);
  font-size: 12px;
  font-weight: 400;
  line-height: 18px;
  color: var(--xp-muted);
  text-align: center;
  margin: 16px auto 0;
  max-width: 520px;
}

.xp-recaptcha-note a {
  color: var(--xp-muted);
  text-decoration: underline;
}

/* --- Sikeres beküldés modal --------------------------------------------- */

.xp-modal-scrim {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.xp-modal {
  background: #fff;
  color: #000;
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 40px 36px 32px;
  position: relative;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(17, 29, 34, 0.12), 0 2px 4px rgba(17, 29, 34, 0.08);
  font-family: "BasisGrotesqueArabicPro", Arial, sans-serif;
  text-align: center;
}

.xp-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
  color: #6b7378;
  padding: 0;
}

.xp-modal-close:hover {
  color: #000;
}

.xp-modal-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: #e6f0dc;
  display: flex;
  align-items: center;
  justify-content: center;
}

.xp-modal-icon::after {
  content: "";
  width: 22px;
  height: 11px;
  border-left: 3px solid #96b414;
  border-bottom: 3px solid #96b414;
  transform: rotate(-45deg) translate(1px, -2px);
}

.xp-modal h2 {
  font-size: 26px;
  font-weight: 400;
  line-height: 140%;
  margin: 0 0 12px;
  color: #000;
}

.xp-modal p {
  font-size: 16px;
  font-weight: 300;
  line-height: 150%;
  margin: 0 0 8px;
  color: #000;
}

.xp-modal-actions {
  margin-top: 28px;
}

.xp-modal-actions .xp-submit {
  max-width: 260px;
  margin: 0 auto;
}

/* --- Reszponzív (az eredeti widget breakpointjai) ----------------------- */

@media (max-width: 1280px) {
  .xp-form {
    padding: 32px 40px 80px;
  }
}

@media (max-width: 960px) {
  .xp-form {
    padding: 16px;
    max-width: 700px;
  }

  .xp-form-title {
    font-size: 32px;
  }

  .xp-model-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .xp-form-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .xp-radio {
    margin-right: 28px;
  }
}

@media (max-width: 450px) {
  .xp-form-wrap {
    padding: 16px;
    box-sizing: border-box;
  }

  .xp-form {
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(17, 29, 34, 0.12), 0 2px 4px rgba(17, 29, 34, 0.08);
  }

  .xp-field {
    margin-bottom: 24px;
  }

  .xp-form-description {
    margin-bottom: 32px;
  }

  .xp-model-picker {
    margin-bottom: 24px;
  }

  .xp-model-picker > label {
    font-size: 20px;
  }

  .xp-model-tiles {
    grid-template-columns: minmax(0, 1fr);
  }

  .xp-channels {
    margin: 28px 0;
  }

  .xp-form-actions {
    min-width: unset;
    max-width: unset;
    margin-top: 32px;
  }

  .xp-modal {
    padding: 32px 24px 24px;
  }
}
