.quote-dialog {
  width: min(674px, calc(100% - 40px));
  max-height: 92dvh;
  color: var(--ink);
  border-radius: 16px;
}

.quote-dialog .quote-header {
  align-items: start;
  padding: 19px 28px 17px;
  background: #f7f3ec;
  border-bottom: 1px solid #e8dece;
}

.quote-header .display {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 3.1rem);
  line-height: .99;
}

.quote-intro,
.quote-helper,
.quote-privacy {
  margin: 0;
  color: var(--muted);
  font-size: .83rem;
}

.quote-intro { margin-top: 7px; }

.quote-dialog .packages-dialog-content { padding: 16px 28px 20px; }
.quote-form { margin: 0; }
.quote-form [hidden] { display: none; }

.quote-progress {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 0;
  margin: 0 0 16px;
  list-style: none;
  color: var(--muted);
  font-size: .8rem;
  font-weight: 650;
}

.quote-progress li { padding-bottom: 6px; border-bottom: 2px solid var(--line-soft); }
.quote-progress [aria-current="step"] { border-color: var(--teal); color: var(--petrol); font-weight: 800; }
.quote-step { display: grid; gap: 11px; }
.quote-section-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.quote-step h3 { margin: 0; font: 600 1.68rem/1.1 var(--serif); color: var(--petrol); }

.quote-form label, .quote-group legend, .quote-ages legend {
  color: var(--ink);
  font-size: .83rem;
  font-weight: 750;
}

.quote-form label { display: grid; min-width: 0; gap: 4px; }
.quote-form input:not([type="checkbox"], [type="radio"]) {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 7px 10px;
  border: 1px solid #c2bcc1;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font: 500 .95rem var(--sans);
}

.quote-form input::placeholder { color: #74727c; opacity: 1; }
.quote-form :focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.quote-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.quote-dates input { display: block; max-width: 100%; text-align: start; }
.quote-dates input::-webkit-date-and-time-value { min-height: 1.25em; text-align: start; }

.quote-trip-type, .quote-group, .quote-ages { min-width: 0; margin: 0; padding: 0; border: 0; }
.quote-trip-type {
  display: flex;
  padding: 3px;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f6f3ed;
}

.quote-trip-type legend,
.quote-trip-type input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.quote-form .quote-trip-type label {
  display: flex;
  align-items: center;
  min-height: 33px;
  padding-inline: 10px;
  border: 1px solid transparent;
  border-radius: 5px;
  cursor: pointer;
  white-space: nowrap;
}

.quote-trip-type label:has(:checked) { background: #fff; border-color: #dfd1bb; color: var(--teal); }
.quote-trip-type label:has(:focus-visible) { outline: 2px solid var(--teal); outline-offset: 1px; }

.quote-group {
  display: grid;
  gap: 6px;
  padding-top: 7px;
  border-top: 1px solid var(--line);
}

.quote-group legend { padding: 0 9px 0 0; }
.quote-group small, .quote-counter small { color: var(--muted); font-size: .75rem; font-weight: 500; }
.quote-group legend small { margin-left: 4px; }
.quote-counter {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}

.quote-counter label { gap: 0; }
.quote-counter small { display: block; }
.quote-stepper {
  display: grid;
  grid-template-columns: 40px 35px 40px;
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid #d8cdbd;
  border-radius: 7px;
}

.quote-stepper button {
  min-height: 40px;
  padding: 0;
  border: 0;
  background: #f8f4ee;
  color: var(--petrol);
  font: 700 1rem var(--sans);
}

.quote-form .quote-stepper input {
  min-height: 40px;
  padding-inline: 0;
  border: 0;
  border-radius: 0;
  appearance: textfield;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.quote-stepper input::-webkit-inner-spin-button,
.quote-stepper input::-webkit-outer-spin-button { appearance: none; margin: 0; }
.quote-stepper button:disabled { opacity: .45; cursor: default; }
.quote-stepper :focus-visible { outline-offset: -3px; }

.quote-form .quote-inline-check,
.quote-form .quote-consent,
.quote-form .quote-option {
  display: flex;
  align-items: center;
  gap: 8px;
}

.quote-form input[type="checkbox"] { width: 17px; height: 17px; flex: none; margin: 0; accent-color: var(--teal); }
.quote-form .quote-inline-check { width: fit-content; min-height: 32px; font-weight: 600; cursor: pointer; }
.quote-child-fields { display: grid; gap: 8px; }
.quote-child-fields > label { max-width: 22ch; }
.quote-ages legend { margin-bottom: 5px; }
.quote-ages-grid, .quote-extras-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }

.quote-form .quote-option {
  min-height: 42px;
  padding: 7px 9px;
  border: 1px solid #e0d7cb;
  border-radius: 7px;
  background: #fbf9f6;
  font-weight: 650;
  cursor: pointer;
}

.quote-form .quote-option:has(:checked) { border-color: #a77b36; background: #f7eddd; }
.quote-form .quote-bag { width: fit-content; }

.quote-review {
  padding: 12px 14px;
  border: 1px solid #ebdfca;
  border-left: 3px solid var(--teal);
  border-radius: 7px;
  background: #faf6ef;
}

.quote-review p { margin: 0; overflow-wrap: anywhere; }
.quote-review-route { color: var(--petrol); font: 600 1.55rem/1.12 var(--serif); }
.quote-review-details { padding-top: 5px; color: var(--muted); font-size: .79rem; }

.quote-form .quote-consent { align-items: start; font-size: .79rem; font-weight: 550; }
.quote-form .quote-consent input { margin-top: 2px; }
.quote-privacy a { color: var(--teal); text-decoration: underline; text-underline-offset: 2px; }
.quote-actions { display: flex; flex-wrap: wrap; justify-content: end; gap: 9px; padding-top: 3px; }
.quote-actions button { min-height: 44px; border-radius: 7px; padding: 9px 18px; }
.quote-actions .quote-next { min-width: 156px; }
.quote-actions button[type="submit"]:disabled { opacity: .68; cursor: wait; }

.quote-status { margin: 10px 0 0; padding: 12px; border: 1px solid var(--line); border-radius: 7px; font-size: .85rem; }
.quote-status[data-state="success"] { background: #eff8f3; color: #145234; }
.quote-status[data-state="error"] { background: #fff1ef; color: #8c2824; }

@media (max-width: 600px) {
  html:has(.quote-dialog[open]) { overflow: hidden; }
  .quote-dialog { position: fixed; inset: 0; width: 100%; max-width: none; height: 100dvh; max-height: none; margin: 0; overflow: hidden; border-radius: 0; }
  .quote-dialog .quote-header { padding: 14px 17px; }
  .quote-dialog .packages-dialog-content { min-height: 0; overflow-x: hidden; padding: 13px 17px max(20px, env(safe-area-inset-bottom)); }
  .quote-ages-grid, .quote-extras-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quote-counts .quote-counter { display: grid; align-content: space-between; }
  .quote-actions .btn-solid { flex-grow: 1; }
  [data-quote-step="contato"] .quote-actions { display: grid; grid-template-columns: auto minmax(0, 1fr); }
  [data-quote-step="contato"] .quote-actions button { padding-inline: 10px; text-align: center; }
}

@media (max-width: 420px) {
  .quote-dates { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 340px) {
  .quote-section-head { align-items: start; flex-direction: column; }
  .quote-route { grid-template-columns: minmax(0, 1fr); }
}
