/* Specimen-only adjustments; source CSS snapshots are unchanged.
   The iframe already provides the gallery frame. No sticky CTA is present.
   In-flow form presentation lets the parent ResizeObserver measure actual content. */
html { scroll-padding-top: 0; }
body.lp-redesign { padding-bottom: 0; }
body.lp-redesign .page-frame { border-inline: 0; }
/* Daniel's explicit current decisions override historical component radius. */
body.lp-redesign .button,
body.lp-redesign #hero .button,
body.lp-redesign #lead-dialog,
body.lp-redesign #hero .lp-service-highlight { border-radius: 0 !important; }
body.lp-redesign .button,
body.lp-redesign .button:hover,
body.lp-redesign .button:active {
  background: #FE4A23 !important;
  border-color: #FE4A23 !important;
  color: #fff !important;
}
/* Preserve actual form width, typography, fields and spacing in an iframe. */
body[data-specimen="formularz"] #lead-dialog {
  position: relative;
  inset: auto;
  margin: 24px auto;
  height: auto;
  max-height: none;
}

/* Currency ranges need a complete line in narrow form previews. */
@media (max-width: 480px) {
  body.lp-redesign #lead-dialog .form-options:has(input[name="budget"]) {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* WebKit's native menu style collapses the source select to 27px.
   Retain the source field geometry while keeping the native option picker. */
body.lp-redesign #lead-dialog .form-field select {
  -webkit-appearance: none;
  appearance: none;
  min-height: 50px;
  /* Contain WebKit native selected-text overflow; full value is below. */
  overflow: hidden;
  padding: 12px 44px 12px 14px;
  border: 1px solid #d9dad4;
  border-radius: 0;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23262626' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px 16px;
}

/* Long chosen answers and validation stay readable in the document flow. */
body.lp-redesign #lead-dialog :is(.selected-answer, .field-validation-error) {
  margin: 8px 0 0;
  max-width: 100%;
  font-size: 16px;
  line-height: 24px;
  white-space: normal;
  overflow-wrap: anywhere;
  color: #262626;
}
body.lp-redesign #lead-dialog .field-validation-error {
  padding: 12px;
  background: #FFF2ED;
}
body.lp-redesign #lead-dialog .selected-answer[hidden] { display: none; }

/* Keep the source controls usable in the area above a mobile keyboard. */
@media (max-width: 600px) {
  body.lp-redesign:not([data-specimen="formularz"]) #lead-dialog {
    position: fixed;
    top: var(--form-visible-top, 0px);
    bottom: auto;
    height: var(--form-visible-height, 100dvh);
    max-height: var(--form-visible-height, 100dvh);
    margin-block: 0;
  }
  body.lp-redesign #lead-dialog .form-actions {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 10px;
    padding-block: 10px calc(10px + env(safe-area-inset-bottom));
  }
  body.lp-redesign #lead-dialog .form-actions .button {
    display: block;
    flex: 1;
    min-width: 0;
    width: auto;
    white-space: normal;
    line-height: 22px;
    gap: 4px;
  }
  body.lp-redesign #lead-dialog .back-button { flex: 0 0 auto; }
  body.lp-redesign #lead-dialog .form-field { scroll-margin-block: 12px; }
  body.lp-redesign #lead-dialog.form-compact-viewport .dialog-top { position: static; }
  /* In-flow specimens scroll with the catalog; no overlay may cover a field. */
  body[data-specimen="formularz"] #lead-dialog { overflow: visible; }
  body[data-specimen="formularz"] #lead-dialog .dialog-top,
  body[data-specimen="formularz"] #lead-dialog .form-actions { position: static; }
}

@media (max-width: 600px) {
  body.lp-redesign #lead-dialog.form-compact-viewport .form-field:has(.field-validation-error) .field-help { display: none; }
}

@media (max-width: 600px) {
  body.lp-redesign #lead-dialog.form-compact-viewport .phone-control { padding-block: 0; }
}
