/* This surface has no .mobile-consult or data-quick-consult hook: the
   inherited controller must not hide it or move its form into a dialog. */
body.selected-preview {
  --selected-contact-reserve: calc(72px + env(safe-area-inset-bottom, 0px));
  --consult-inset: 0px;
  padding-bottom: var(--selected-contact-current-height, var(--selected-contact-reserve));
}
html:has(body.selected-preview) {
  scroll-padding-bottom: calc(var(--selected-contact-current-height, 96px) + var(--selected-contact-keyboard-offset, 0px) + 16px);
}
.selected-preview .selected-contact {
  position: fixed;
  z-index: 35;
  inset: auto 0 var(--selected-contact-keyboard-offset, 0px);
  box-sizing: border-box;
  width: 100%;
  padding: 8px max(16px, env(safe-area-inset-right, 0px)) calc(8px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  color: #f3efe4;
  background: var(--green, #104b41);
  border-top: 1px solid #ffffff30;
  font-family: inherit;
}
.selected-preview .selected-contact *,
.selected-preview .selected-contact *::before,
.selected-preview .selected-contact *::after { box-sizing: border-box; }
.selected-preview .selected-contact__wide { display: none; }
.selected-preview .selected-contact__compact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 12px;
  max-width: 880px;
  margin-inline: auto;
}
.selected-preview .selected-contact__compact a {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 48px;
  text-decoration: none;
  font-size: 16px;
  font-weight: 750;
  line-height: 1.25;
}
.selected-preview .selected-contact__action,
.selected-preview .selected-contact .quick-submit {
  color: #063d31;
  background: var(--action, #ff8a24);
  border: 0;
  border-radius: 3px;
}
.selected-preview .selected-contact__action { padding: 10px 16px; }
.selected-preview .selected-contact__phone {
  flex-shrink: 0;
  width: 52px;
  padding: 10px;
  border-left: 1px solid #ffffff45;
  color: inherit;
}
.selected-preview .selected-contact__phone svg { display: block; flex: 0 0 24px; }
.selected-preview .selected-contact__phone-text {
  display: none;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.selected-preview .selected-contact a:focus-visible,
.selected-preview .selected-contact button:focus-visible,
.selected-preview .selected-contact input:focus-visible,
.selected-preview .selected-contact summary:focus-visible {
  outline: 2px solid #fffaf1;
  outline-offset: 3px;
}
.selected-preview .selected-contact__action:hover,
.selected-preview .selected-contact .quick-submit:hover:not(:disabled) {
  background: var(--action-hover, #ff8a24);
  box-shadow: none;
}
.selected-preview .selected-contact__phone:hover { background: #ffffff12; }
@media (min-width: 520px) {
  .selected-preview .selected-contact__phone { width: auto; padding-inline: 20px; }
  .selected-preview .selected-contact__phone-text { display: inline; }
}

@media (max-width: 760px) {
  .selected-preview .selected-offer .selected-button {
    display: flex;
    width: fit-content;
    min-width: min(100%, 208px);
    margin-inline: auto;
    padding-inline: 24px;
    gap: 12px;
  }
  .selected-preview .selected-contact {
    padding: 0;
    background: transparent;
    border-top: 0;
    pointer-events: none;
  }
  .selected-preview .selected-contact__compact {
    width: 100%;
    max-width: none;
    gap: 0;
    padding: 8px env(safe-area-inset-right, 0px) calc(8px + env(safe-area-inset-bottom, 0px)) env(safe-area-inset-left, 0px);
    background: var(--action, #ff8a24);
    border-radius: 0;
    box-shadow: none;
    pointer-events: auto;
  }
  .selected-preview .selected-contact__compact a { min-height: 52px; border-radius: 0; }
  .selected-preview .selected-contact__action,
  .selected-preview .selected-contact__action:hover,
  .selected-preview .selected-contact__phone:hover {
    background: transparent;
    box-shadow: none;
  }
  .selected-preview .selected-contact__phone {
    width: 52px;
    padding-inline: 10px;
    border-left: 1px solid rgb(6 61 49 / 16%);
    color: #063d31;
  }
  .selected-preview .selected-contact__phone-text { display: none; }
}

/* Keep this query in step with contact.mjs. Switch before English consent and
   three fields begin squeezing a tablet-width layout. */
@media (min-width: 1440px) and (min-height: 700px) {
  body.selected-preview {
    --selected-contact-reserve: calc(160px + env(safe-area-inset-bottom, 0px));
  }
  .selected-preview .selected-contact {
    padding: 12px max(24px, env(safe-area-inset-right, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) max(24px, env(safe-area-inset-left, 0px));
  }
  .selected-preview .selected-contact__compact { display: none; }
  .selected-preview .selected-contact__wide {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    align-items: start;
    column-gap: 24px;
    row-gap: 8px;
    max-width: 1512px;
    margin-inline: auto;
  }
  .selected-preview .selected-contact__number {
    display: grid;
    gap: 6px;
    min-width: 0;
    min-height: 64px;
    align-content: center;
    color: inherit;
    text-decoration: none;
  }
  .selected-preview .selected-contact__number > span { font-size: 13px; line-height: 1.35; }
  .selected-preview .selected-contact__number strong {
    font-size: 24px;
    line-height: 1.25;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
  }
  .selected-preview .selected-contact__form { min-width: 0; }
  .selected-preview .selected-contact .quick-consult-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 212px 140px;
    align-items: start;
    gap: 12px 18px;
    width: 100%;
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: 0;
  }
  .selected-preview .selected-contact .quick-fields {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    min-width: 0;
    margin: 0;
    padding: 0;
  }
  .selected-preview .selected-contact .quick-field { grid-column: auto; min-width: 0; margin: 0; }
  .selected-preview .selected-contact .quick-field label {
    display: block;
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 600;
    line-height: 18px;
  }
  .selected-preview .selected-contact .quick-field input {
    display: block;
    width: 100%;
    min-width: 0;
    height: 44px;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 3px;
    background: #fffaf1;
    color: #00443f;
    font-family: inherit;
    font-size: 16px;
    line-height: 22px;
  }
  .selected-preview .selected-contact .quick-field input[aria-invalid="true"] { border: 2px solid #ffbe96; }
  .selected-preview .selected-contact .quick-consent { min-width: 0; margin: 24px 0 0; padding: 0; }
  .selected-preview .selected-contact .quick-consent > label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    min-height: 24px;
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    line-height: 19px;
    cursor: pointer;
  }
  .selected-preview .selected-contact .quick-consent input[type="checkbox"] {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    margin: 0;
    accent-color: var(--orange);
  }
  .selected-preview .selected-contact .quick-privacy > summary {
    width: fit-content;
    margin-left: 30px;
    padding-block: 6px;
    font-size: 12px;
    line-height: 18px;
  }
  .selected-preview .selected-contact .quick-privacy__copy {
    position: absolute;
    z-index: 2;
    inset: auto 0 calc(100% + 20px) auto;
    width: min(440px, calc(100vw - 48px));
    max-height: min(420px, 55dvh);
    overflow: auto;
    padding: 24px;
    color: #00443f;
    background: #f3efe4;
    font-size: 14px;
    line-height: 1.6;
  }
  .selected-preview .selected-contact .quick-submit {
    align-self: start;
    width: 100%;
    min-width: 0;
    height: 44px;
    min-height: 44px;
    margin: 24px 0 0;
    padding: 10px 12px;
    font-size: 17px;
    font-weight: 750;
    line-height: 24px;
    white-space: nowrap;
  }
  .selected-preview .selected-contact .field-error {
    position: static;
    width: auto;
    max-width: none;
    margin: 6px 0 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #ffe3d2;
    box-shadow: none;
    font-size: 12px;
    line-height: 1.45;
    overflow-wrap: anywhere;
  }
  .selected-preview .selected-contact .quick-result {
    position: static;
    grid-column: 1 / -1;
    width: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 12px 16px;
    color: #00443f;
    background: #f3efe4;
    font-size: 14px;
    line-height: 1.5;
    box-shadow: none;
  }
}
