/* Apertura Ajánlatkérő 1.0.0 */
.apert-quote-app {
  --apert-quote-ink: var(--apert-ink, #17191a);
  --apert-quote-paper: var(--apert-paper, #f4f1ea);
  --apert-quote-sand: var(--apert-sand, #c6a779);
  --apert-quote-line: var(--apert-line, #d9d4cb);
  --apert-quote-muted: var(--apert-muted, #676866);
  max-width: 1180px;
  margin-inline: auto;
}

.apert-quote-app *,
.apert-quote-app *::before,
.apert-quote-app *::after { box-sizing: border-box; }

.apert-quote-intro {
  max-width: 820px;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.apert-quote-intro h2 {
  margin: .35rem 0 1rem;
  font-size: clamp(1.8rem, 3.4vw, 2.7rem);
  line-height: 1.08;
}

.apert-quote-intro > p:last-child {
  color: var(--apert-quote-muted);
  font-size: 1.02rem;
  line-height: 1.65;
}

.apert-quote-progress {
  display: grid;
  grid-template-columns: repeat(5, minmax(0,1fr));
  margin: 0 0 2rem;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--apert-quote-line);
  border-left: 1px solid var(--apert-quote-line);
}

.apert-quote-progress li {
  display: flex;
  min-height: 72px;
  align-items: center;
  gap: .65rem;
  padding: .8rem 1rem;
  border-right: 1px solid var(--apert-quote-line);
  border-bottom: 1px solid var(--apert-quote-line);
  background: #fff;
  color: var(--apert-quote-muted);
  font-size: .84rem;
  font-weight: 800;
}

.apert-quote-progress li span {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: .72rem;
}

.apert-quote-progress li.is-active {
  background: var(--apert-quote-ink);
  color: #fff;
}

.apert-quote-progress li.is-complete {
  color: #765b39;
}

.apert-quote-form {
  position: relative;
  border: 1px solid var(--apert-quote-line);
  background: #fff;
}

.apert-quote-step {
  padding: clamp(1.5rem, 4vw, 3rem);
}

.apert-quote-step[hidden] { display: none !important; }

.apert-quote-step__head {
  max-width: 820px;
  margin-bottom: 2rem;
}

.apert-quote-step__head h3 {
  margin: .35rem 0 .7rem;
  font-size: clamp(1.55rem, 2.8vw, 2.15rem);
  line-height: 1.1;
}

.apert-quote-step__head p:last-child {
  color: var(--apert-quote-muted);
}

.apert-quote-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 1.15rem;
}

.apert-field {
  margin-top: 1.15rem;
}

.apert-field label,
.apert-choice-fieldset legend {
  display: block;
  margin-bottom: .45rem;
  color: var(--apert-quote-ink);
  font-size: .9rem;
  font-weight: 800;
}

.apert-field input,
.apert-field select,
.apert-field textarea {
  width: 100%;
  min-height: 50px;
  border: 1px solid #bbb6ad;
  border-radius: 0;
  padding: .75rem .85rem;
  background: #fff;
  color: var(--apert-quote-ink);
  font: inherit;
}

.apert-field textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.55;
}

.apert-field input:focus,
.apert-field select:focus,
.apert-field textarea:focus,
.apert-upload-box input:focus-visible {
  outline: 3px solid rgb(198 167 121 / 40%);
  outline-offset: 2px;
  border-color: #8f714d;
}

.apert-choice-fieldset {
  margin: 1.2rem 0 0;
  border: 1px solid var(--apert-quote-line);
  padding: 1rem 1.1rem;
}

.apert-choice-fieldset label {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  margin: .25rem 1.1rem .25rem 0;
}

.apert-quote-item {
  margin-top: 1rem;
  padding: clamp(1.1rem, 2vw, 1.5rem);
  border: 1px solid var(--apert-quote-line);
  background: var(--apert-quote-paper);
}

.apert-quote-item:first-child { margin-top: 0; }

.apert-quote-item__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.apert-quote-item__head h4 {
  margin: 0;
  font-size: 1.12rem;
}

.apert-quote-remove-item,
.apert-quote-add-item {
  appearance: none;
  border: 0;
  padding: .45rem 0;
  background: transparent;
  color: var(--apert-quote-ink);
  font: inherit;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: .18em;
  cursor: pointer;
}

.apert-quote-add-item {
  margin-top: 1.1rem;
  color: #765b39;
}

.apert-upload-box {
  border: 1px dashed #9f978b;
  padding: clamp(1.25rem, 3vw, 2rem);
  background: var(--apert-quote-paper);
}

.apert-upload-box__label {
  display: block;
  margin-bottom: 1rem;
  cursor: pointer;
}

.apert-upload-box__label strong {
  display: block;
  margin-bottom: .25rem;
  font-size: 1.05rem;
}

.apert-upload-box__label span {
  color: var(--apert-quote-muted);
  font-size: .9rem;
}

.apert-upload-box input[type=file] {
  max-width: 100%;
}

.apert-upload-preview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: .8rem;
  margin-top: 1rem;
}

.apert-upload-preview:empty { display: none; }

.apert-upload-preview__item {
  min-width: 0;
  border: 1px solid var(--apert-quote-line);
  background: #fff;
}

.apert-upload-preview__item img {
  display: block;
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}

.apert-upload-preview__item span {
  display: block;
  overflow: hidden;
  padding: .55rem .6rem;
  font-size: .75rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.apert-upload-status {
  grid-column: 1/-1;
  color: var(--apert-quote-muted);
}

.apert-form-note {
  margin-top: 1rem;
  padding-left: 1rem;
  border-left: 3px solid var(--apert-quote-sand);
  color: var(--apert-quote-muted);
  font-size: .9rem;
  line-height: 1.55;
}

.apert-privacy-check {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: .7rem;
  align-items: start;
  margin-top: 1.5rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--apert-quote-line);
  background: var(--apert-quote-paper);
  line-height: 1.5;
}

.apert-privacy-check input {
  width: 20px;
  height: 20px;
  margin-top: .1rem;
  accent-color: var(--apert-quote-ink);
}

.apert-privacy-check a {
  color: inherit;
  text-underline-offset: .18em;
}

.apert-quote-actions {
  display: flex;
  justify-content: space-between;
  gap: .8rem;
  padding: 1.1rem clamp(1.5rem, 4vw, 3rem);
  border-top: 1px solid var(--apert-quote-line);
  background: var(--apert-quote-paper);
}

.apert-quote-button {
  min-height: 48px;
  border: 1px solid var(--apert-quote-ink);
  border-radius: 0;
  padding: .75rem 1.2rem;
  background: var(--apert-quote-ink);
  color: #fff;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.apert-quote-button--secondary {
  background: transparent;
  color: var(--apert-quote-ink);
}

.apert-quote-button:hover,
.apert-quote-button:focus-visible {
  outline: 3px solid rgb(198 167 121 / 40%);
  outline-offset: 2px;
}

.apert-quote-button:disabled {
  opacity: .55;
  cursor: wait;
}

.apert-quote-processing {
  padding: 1rem clamp(1.5rem, 4vw, 3rem);
  border-top: 1px solid var(--apert-quote-line);
  color: var(--apert-quote-muted);
}

.apert-quote-notice {
  margin-bottom: 1.5rem;
  border: 1px solid var(--apert-quote-line);
  padding: 1rem 1.1rem;
}

.apert-quote-notice--error {
  border-left: 4px solid #8c2d26;
}

.apert-quote-success {
  max-width: 820px;
  margin-inline: auto;
  padding: clamp(2rem, 5vw, 4rem);
  border: 1px solid var(--apert-quote-line);
  background: #fff;
}

.apert-quote-success h2 {
  margin-top: .3rem;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.05;
}

.apert-quote-success__id {
  margin: 1.5rem 0;
  padding: .85rem 1rem;
  background: var(--apert-quote-paper);
}

.apert-quote-hp {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.apert-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (max-width: 820px) {
  .apert-quote-progress {
    grid-template-columns: 1fr;
  }

  .apert-quote-progress li {
    display: none;
    min-height: 54px;
  }

  .apert-quote-progress li.is-active {
    display: flex;
  }

  .apert-quote-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .apert-upload-preview {
    grid-template-columns: repeat(2, minmax(0,1fr));
  }
}

@media (max-width: 520px) {
  .apert-quote-step {
    padding: 1.15rem;
  }

  .apert-quote-actions {
    padding: 1rem 1.15rem;
  }

  .apert-upload-preview {
    grid-template-columns: 1fr;
  }

  .apert-choice-fieldset label {
    display: flex;
    margin-right: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .apert-quote-app * { scroll-behavior: auto !important; }
}

@media (forced-colors: active) {
  .apert-quote-form,
  .apert-quote-item,
  .apert-field input,
  .apert-field select,
  .apert-field textarea,
  .apert-choice-fieldset,
  .apert-upload-box,
  .apert-privacy-check {
    border-color: CanvasText;
  }
}


/* 1.1.0 – finomított kérdéslogika és előzetes ajánlati figyelmeztetés */
.apert-choice-fieldset--stacked {
  margin-top: 2rem;
}

.apert-check-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: .45rem 1rem;
}

.apert-check-grid label,
.apert-mini-options label {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  margin: 0;
  line-height: 1.45;
}

.apert-check-grid input,
.apert-mini-options input {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  margin-top: .12rem;
  accent-color: var(--apert-quote-ink);
}

.apert-mini-options {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem 1.1rem;
  margin: 1.15rem 0 0;
  border: 0;
  border-top: 1px solid var(--apert-quote-line);
  padding: 1rem 0 0;
}

.apert-mini-options legend {
  width: 100%;
  margin-bottom: .65rem;
  color: var(--apert-quote-ink);
  font-size: .86rem;
  font-weight: 800;
}

.apert-quote-preliminary-note {
  margin-top: 1.6rem;
  padding: 1.15rem 1.25rem;
  border-left: 4px solid var(--apert-quote-sand);
  background: #f7f4ee;
}

.apert-quote-preliminary-note h4 {
  margin: 0 0 .45rem;
  font-size: 1rem;
}

.apert-quote-preliminary-note p {
  margin: 0;
  color: #505250;
  font-size: .92rem;
  line-height: 1.6;
}

.apert-quote-success__note {
  margin-top: 1.25rem;
  padding: 1rem 1.1rem;
  border-left: 3px solid var(--apert-quote-sand);
  background: var(--apert-quote-paper);
  color: var(--apert-quote-muted);
  font-size: .9rem;
  line-height: 1.55;
}

@media (max-width: 680px) {
  .apert-check-grid {
    grid-template-columns: 1fr;
  }

  .apert-mini-options {
    display: grid;
    grid-template-columns: 1fr;
  }
}


/* 1.4.0 – intelligens termékspecifikus kérdések */
.apert-product-details {
  margin: 1.15rem 0 .35rem;
  padding: 1rem 1.05rem 1.1rem;
  border: 1px solid var(--apert-quote-line);
  background: #faf8f4;
}
.apert-product-details[hidden],
.apert-product-detail-field[hidden] { display:none !important; }
.apert-product-details__head {
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:1rem;
  margin-bottom:.9rem;
}
.apert-product-details__head strong { color:var(--apert-quote-ink); font-size:.88rem; }
.apert-product-details__head span {
  color:var(--apert-quote-muted);
  font-size:.78rem;
  line-height:1.4;
  text-align:right;
}
.apert-product-details__grid { margin:0; }
@media (max-width:680px) {
  .apert-product-details__head { align-items:flex-start; flex-direction:column; gap:.3rem; }
  .apert-product-details__head span { text-align:left; }
}


/* 1.5.0 – Cloudflare Turnstile az ajánlatkérő utolsó lépésében */
.apert-quote-turnstile {
  margin-top: 1.35rem;
  padding: 1rem 1.05rem;
  border: 1px solid var(--apert-quote-line);
  background: #faf8f4;
}
.apert-quote-turnstile__label {
  margin: 0 0 .65rem;
  color: var(--apert-quote-ink);
  font-size: .85rem;
  font-weight: 800;
}
.apert-quote-turnstile .cf-turnstile,
.apert-quote-turnstile iframe {
  max-width: 100%;
}
@media (max-width: 420px) {
  .apert-quote-turnstile { overflow-x:auto; overflow-y:hidden; }
}
