/*
 * The quote forms' controls, unlayered (inc/forms.php enqueues this file after the framework's Gravity skin,
 * umv-theme assets/css/gravity.css, on every page that renders a form): the move-date calendar, the field focus ring,
 * the busy step button and the error messages. Gravity's own CSS is dropped (Forms\GravityStyles) and the skin is
 * unlayered, so these rules are too; selectors match or out-rank the skin's and come after it.
 *
 * UX review 14 Nov 2026 (A1, A3, A10, A11). The form's fields, labels and choices are the CRM contract: nothing here
 * changes what is submitted, only how the controls look and where the calendar sits.
 */

/*
 * A1 — the calendar is a popup under the date field, as on the sister sites (owner, 25 Nov 2026: "we never want the
 * calendar like this — do it how we have it": the 14 Nov review had put it in the form's flow, where it pushed the
 * step's fields and buttons down). It floats from the input, over whatever follows, at the field's width (at most
 * 24rem), so on a phone it never runs out of the card sideways; the card and the hero let it out (overflow below), so
 * nothing clips its foot. It closes on a chosen or typed day, Esc, Tab or a tap outside (assets/js/forms.js). Seven
 * columns share the panel's width; every day is at least 44px tall.
 */
.umv-gform .ginput_container_date {
  position: relative;
}
.umv-gform .ginput_container_date .gform-datepicker-calendar {
  position: absolute;
  z-index: var(--umv-z-overlay, 50);
  inset-block-start: calc(100% + var(--wp--preset--spacing--10, 0.5rem));
  inset-inline-start: 0;
  box-sizing: border-box;
  inline-size: min(100%, 24rem);
  margin: 0;
  padding: var(--wp--preset--spacing--10, 0.5rem);
  border: 1px solid var(--wp--preset--color--hairline);
  border-radius: var(--wp--custom--radius--md, 12px);
  background: var(--wp--preset--color--base);
  color: var(--wp--preset--color--ink);
  box-shadow: 0 12px 32px color-mix(in srgb, var(--wp--preset--color--ink) 18%, transparent), 0 2px 6px color-mix(in srgb, var(--wp--preset--color--ink) 10%, transparent);
}
/* The calendar icon stays centred on the input. */
.umv-gform .ginput_container_date .gform-datepicker-toggle {
  inset-block-start: calc(var(--wp--custom--input--height, 3.5rem) / 2);
}
/* Its hit area reaches the 44px tap size, centred on the 24px icon (final accessibility pass, 14 Nov 2026); it stays
   inside the input's end padding, which is reserved for the icon, so it never covers typed text. */
.umv-gform .gform-datepicker-toggle::after {
  content: "";
  position: absolute;
  inset-block-start: 50%;
  inset-inline-start: 50%;
  inline-size: var(--wp--custom--target--tap, 2.75rem);
  block-size: var(--wp--custom--target--tap, 2.75rem);
  translate: -50% -50%;
}
.umv-gform .ginput_container_date .gform-datepicker-calendar table.calendar {
  inline-size: 100%;
  table-layout: fixed;
}
/* The header's arrows take a day's column (the skin fixed them at 34px, which a fixed table would keep). */
.umv-gform .ginput_container_date .gform-datepicker-calendar td.nav.btn {
  inline-size: auto;
}
.umv-gform .ginput_container_date .gform-datepicker-calendar td.nav.btn > span {
  inline-size: 2.75rem;
  block-size: 2.75rem;
  border-radius: var(--wp--custom--radius--pill, 999px);
}
.umv-gform .ginput_container_date .gform-datepicker-calendar .monthSelector select {
  block-size: 2.75rem;
  font-family: var(--wp--preset--font-family--heading);
  font-size: var(--wp--preset--font-size--title-sm, 1.25rem);
  font-weight: var(--wp--custom--font-weight--heading, 500);
  letter-spacing: 0;
}
.umv-gform .ginput_container_date .gform-datepicker-calendar tr.monthSelector > td {
  padding-block-end: var(--wp--preset--spacing--10, 0.5rem);
}
.umv-gform .ginput_container_date .gform-datepicker-calendar th.week {
  padding-block: var(--wp--preset--spacing--10, 0.5rem) 0.25rem;
}
.umv-gform .ginput_container_date .gform-datepicker-calendar :is(td.day, td.empty) {
  inline-size: auto;
  block-size: 2.75rem;
}
.umv-gform .ginput_container_date .gform-datepicker-calendar td.day {
  border-radius: var(--wp--custom--radius--sm, 8px);
  font-size: var(--wp--preset--font-size--small, 1rem);
  font-weight: var(--wp--custom--font-weight--label, 600);
}
/* A day is a choice, not an action: the hover is a quiet grey, the chosen day ink (as a chosen lane chip). */
.umv-gform .ginput_container_date .gform-datepicker-calendar td.day:not(.disabled):hover {
  background: var(--wp--preset--color--hairline);
}
.umv-gform .ginput_container_date .gform-datepicker-calendar td.day:is(.selected, [aria-selected='true']) {
  background: var(--wp--preset--color--ink);
  color: var(--wp--preset--color--card, #fff);
}
/* Nothing typed yet: today keeps its ring and nothing reads as chosen (the skin's rule, at this file's weight). */
.umv-gform .gfield--type-date:has(input:placeholder-shown) .ginput_container_date .gform-datepicker-calendar td.day:is(.selected, [aria-selected='true']) {
  background: none;
  color: inherit;
}
.umv-gform .ginput_container_date .gform-datepicker-calendar :is(td.day, td.nav.btn, select):focus-visible {
  outline: 2px solid var(--wp--preset--color--ink);
  outline-offset: -2px;
}

/*
 * A10 — focus is ink, red is for errors. The skin drew a focused field with a red border and a red ring, the error
 * state's colour, so a valid field being typed in read as wrong. Ink on the white sign is far above 3:1; a field
 * that has failed keeps its red border while focused, with the ink ring outside it.
 */
.umv-gform :is(.gfield input, .gfield select, .gfield textarea):focus-visible {
  border-color: var(--wp--preset--color--ink);
  outline: 2px solid var(--wp--preset--color--ink);
  outline-offset: 2px;
}
.umv-gform .gfield_error :is(input, select, textarea):focus-visible {
  border-color: var(--wp--preset--color--error);
}

/*
 * A11 — the step button says it is working. Gravity marks the pressed button (`gform-has-spinner`, aria-busy) and puts
 * an empty `.gform-loader` in it while the step is checked on the server (≈0.4s locally, longer on production); with
 * its CSS dropped the loader drew nothing. Here it is a small ring at the pill's end, the label dims a step and the
 * buttons take no second press (assets/js/forms.js mirrors the state as aria-disabled).
 */
.umv-gform .gform-has-spinner {
  position: relative;
  cursor: progress;
}
.umv-gform .gform-has-spinner,
.umv-gform :is(.gform_page_footer, .gform_footer):has(.gform-has-spinner) :is(button, input[type='submit'], input[type='button']) {
  pointer-events: none;
}
.umv-gform :is(.gform_page_footer, .gform_footer):has(.gform-has-spinner) .gform_previous_button {
  opacity: 0.5;
}
.umv-gform :is(.gform_page_footer, .gform_footer) .gform-has-spinner:not(.gform_previous_button) {
  color: color-mix(in srgb, var(--wp--preset--color--card, #fff) 78%, transparent);
}
.umv-gform .gform-has-spinner > .gform-loader {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-end: var(--wp--preset--spacing--40, 1.25rem);
  box-sizing: border-box;
  inline-size: 1.125rem;
  block-size: 1.125rem;
  margin-block-start: -0.5625rem;
  border: 2px solid currentColor;
  border-inline-end-color: transparent;
  border-radius: 50%;
  animation: fprice-form-busy 0.7s linear infinite;
}
/* Safari: Gravity hides the label itself (an inline transparent text fill), so the ring takes the pill's centre. */
.umv-gform .gform-has-spinner[style*='text-fill-color'] > .gform-loader {
  inset-inline: 50% auto;
  margin-inline-start: -0.5625rem;
}
/* Back is a quiet text control: it dims with the footer and draws no ring. */
.umv-gform .gform_previous_button > .gform-loader {
  display: none;
}
@keyframes fprice-form-busy {
  to {
    rotate: 1turn;
  }
}
@media (prefers-reduced-motion: reduce) {
  .umv-gform .gform-has-spinner > .gform-loader {
    animation: none;
  }
}

/*
 * A3 — a message reads as one line. Set a step under the labels, weight 500, so "This field is required." keeps to
 * one line in a full-width field; the paired fields (the ZIPs on a phone) are handled where they pair (hero cover.css,
 * quote-form card.css, post-form.css).
 */
.umv-gform .gfield :is(.validation_message, .gfield_validation_message) {
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.35;
}

/*
 * The last step's submit is Continue one step later (design pass 14 Nov 2026): the skin sizes Continue
 * (`.gform_next_button`) at the lede step, 60px tall, but the final step's submit sits in the same page footer without
 * that class and fell back to the global button's meta size — "Get a Quote" at 14px where "Continue" had been 20px.
 * Same size, padding and leading; the colours are the button's own.
 */
.umv-gform .gform_page_footer .gform_button {
  min-block-size: var(--wp--custom--target--tap, 44px);
  padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--70);
  font-size: var(--wp--preset--font-size--lede);
  line-height: var(--wp--custom--line-height--flat);
}

/*
 * The consent field's group name, "Consent", printed as a label over a checkbox whose own words ("I agree with the
 * Terms & Conditions") say the same thing (design pass 14 Nov 2026): it read as a field with nothing to fill, one more
 * line between the last field and the submit. The legend stays for assistive tech (the group is announced as
 * "Consent, required"); only its drawing goes. The stored label is unchanged.
 */
.umv-gform .gfield--type-consent > legend.gfield_label {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* "Terms & Conditions" in the consent label is a link to the Terms (inc/forms.php): underlined in the label's colour. */
.umv-gform .gfield--type-consent label a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: var(--wp--custom--underline--offset, 0.15em);
}

/* The step title takes focus after a step change (assets/js/hero-steps.js, final accessibility pass 14 Nov 2026) as
   the place to read from, not a control: out of the Tab order and drawn without a ring. */
.umv-gform :is(.hero__card-title, .read__quote-title)[tabindex='-1']:focus {
  outline: none;
}

/*
 * The international phone with its country picker (Gravity's "International (formatted)" phone, /quote/ field 25 —
 * owner, 25 Nov 2026: "use it with the dropdown"). Gravity's own CSS is dropped by the framework, so the picker is
 * drawn here, on the field tokens: the country button is the input's height, border and ground, joined to the number
 * box; the list opens under the field as a popup (like the calendar), searchable, each country a 44px row. The flags
 * are phone-flags.css (generated from the plugin). The country and number sub-labels stay for screen readers; the
 * field's own label names it on screen.
 */
.umv-gform .gform-phone {
  position: relative;
}
.umv-gform .gform-phone__input-wrapper {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
}
.umv-gform .gfield--type-phone :is(.ginput_country-selector_container, .ginput_phone_container) > label {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.umv-gform .gform-phone__country-selector {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  box-sizing: border-box;
  min-block-size: var(--wp--custom--input--height, var(--wp--custom--target--tap));
  block-size: 100%;
  margin-inline-end: -1px;
  padding-block: 0;
  padding-inline: 0.75rem 0.625rem;
  border: var(--wp--custom--input--border, var(--wp--custom--border--rule));
  border-start-end-radius: 0;
  border-end-end-radius: 0;
  border-start-start-radius: var(--wp--custom--radius--sm);
  border-end-start-radius: var(--wp--custom--radius--sm);
  background: var(--wp--custom--input--background, var(--wp--preset--color--base));
  color: var(--wp--preset--color--ink);
  font: inherit;
  font-size: var(--wp--preset--font-size--small, 1rem);
  cursor: pointer;
}
.umv-gform .gform-phone__country-selector::after {
  content: "";
  inline-size: 0.5rem;
  block-size: 0.5rem;
  margin-inline-start: 0.125rem;
  border-inline-end: 2px solid currentcolor;
  border-block-end: 2px solid currentcolor;
  rotate: 45deg;
  translate: 0 -0.125rem;
}
.umv-gform .gform-phone__country-selector:focus-visible {
  position: relative;
  z-index: 2;
  outline: 2px solid var(--wp--preset--color--ink);
  outline-offset: 2px;
}
.umv-gform .gform-phone__dial-code {
  display: none;
  font-variant-numeric: tabular-nums;
}
.umv-gform .gform-phone--show-dial-code .gform-phone__dial-code {
  display: inline;
}
.umv-gform .gfield .gform-phone__input {
  border-start-start-radius: 0;
  border-end-start-radius: 0;
}
.umv-gform .gform-phone__dropdown {
  position: absolute;
  z-index: var(--umv-z-overlay, 50);
  inset-block-start: calc(100% + var(--wp--preset--spacing--10, 0.5rem));
  inset-inline: 0;
  box-sizing: border-box;
  border: 1px solid var(--wp--preset--color--hairline);
  border-radius: var(--wp--custom--radius--md, 12px);
  background: var(--wp--preset--color--base);
  color: var(--wp--preset--color--ink);
  box-shadow: 0 12px 32px color-mix(in srgb, var(--wp--preset--color--ink) 18%, transparent), 0 2px 6px color-mix(in srgb, var(--wp--preset--color--ink) 10%, transparent);
  overflow: hidden;
}
.umv-gform .gform-phone__dropdown--hidden {
  display: none;
}
.umv-gform .gform-phone__search-wrapper {
  padding: var(--wp--preset--spacing--10, 0.5rem);
  border-block-end: 1px solid var(--wp--preset--color--hairline);
}
.umv-gform .gfield .gform-phone__search {
  inline-size: 100%;
  min-block-size: var(--wp--custom--target--tap, 2.75rem);
}
.umv-gform .gform-phone__country-list {
  max-block-size: 15rem;
  margin: 0;
  padding: 0.25rem 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  list-style: none;
}
.umv-gform .gform-phone__country-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-block-size: var(--wp--custom--target--tap, 2.75rem);
  margin: 0;
  padding: 0 0.75rem;
  font-size: var(--wp--preset--font-size--small, 1rem);
  cursor: pointer;
}
.umv-gform .gform-phone__country-item:is(:hover, .gform-phone__country-item--focused) {
  background: var(--wp--preset--color--hairline);
}
.umv-gform .gform-phone__country-item--active {
  background: var(--wp--preset--color--hairline);
  box-shadow: inset 3px 0 0 var(--wp--preset--color--ink);
  font-weight: var(--wp--custom--font-weight--label, 600);
}
.umv-gform .gform-phone__country-code {
  flex: none;
  margin-inline-start: auto;
  color: var(--wp--preset--color--ink-secondary);
  font-variant-numeric: tabular-nums;
}
