/* Compact search on the Classic homepage. Load after the base V1 stylesheet. */
.compact-home-search-panel,
html[data-invista-design=v1] .invista-design-hero .searchPanel.compact-home-search-panel {
  --compact-home-search-primary: #2d358e;
  --compact-home-search-hover: #242d7b;
  --compact-home-search-ink: #232942;
  --compact-home-search-line: #dbdeea;
  --compact-home-search-label-size: 14px;
  --compact-home-search-control-size: 16px;
  --invista-home-field-height: 36px;
  --invista-search-border: var(--compact-home-search-line);
  display: block !important;
  max-width: 920px;
  min-height: 0;
  padding: 11px 12px 9px 16px;
  border: 1px solid #edeef4;
  border-radius: 12px;
  background: #fff !important;
  box-shadow: 0 9px 26px #20294326;
  color: var(--compact-home-search-ink);
}

.compact-home-search-panel #buyForm {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
  margin: 0;
}

.compact-home-search-panel [hidden] { display: none !important; }

.compact-home-search-summary {
  display: grid;
  grid-template-columns: minmax(max-content, .9fr) minmax(122px, .9fr) minmax(154px, 1.9fr) minmax(92px, .75fr) minmax(105px, .78fr);
  align-items: start;
  gap: 10px;
  min-width: 0;
}

.compact-home-search-panel #buyForm .compact-home-search-summary > .form-group,
.compact-home-search-panel #buyForm .compact-home-search-price-fields > .form-group,
.compact-home-search-panel #buyForm .compact-home-search-fields > .form-group {
  float: none !important;
  width: 100% !important;
  min-width: 0;
  min-height: 0;
  margin: 0 !important;
}

.compact-home-search-panel #buyForm .compact-home-search-region { grid-area: 1 / 3; }
.compact-home-search-panel #buyForm .compact-home-search-category { grid-area: 1 / 2; }
.compact-home-search-panel #buyForm .compact-home-search-price { grid-area: 1 / 4; }
.compact-home-search-panel #buyForm .compact-home-search-submit { grid-area: 1 / 5; }

.compact-home-search-panel #buyForm .compact-home-search-transaction {
  position: relative;
  display: grid;
  grid-area: 1 / 1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-self: start;
  justify-self: stretch;
  align-items: stretch;
  gap: 3px;
  width: auto;
  min-height: var(--invista-home-field-height);
  margin: 0 13px 0 0;
  padding: 2px;
  border: 1px solid #e1e2eb;
  border-radius: 9px;
  background: #f2f0f7;
  list-style: none;
}

.compact-home-search-panel #buyForm .compact-home-search-transaction::before { display: none; }
.compact-home-search-panel #buyForm .compact-home-search-transaction::after {
  position: absolute;
  inset-block: 4px;
  inset-inline-end: -14px;
  display: block;
  width: 1px;
  background: #e7e8ef;
  content: "";
}

.compact-home-search-panel #buyForm .compact-home-search-transaction > li {
  display: flex;
  float: none;
  width: auto;
  min-width: 0;
  margin: 0;
  padding: 0;
}
.compact-home-search-panel #buyForm .compact-home-search-transaction > li.title { display: none; }

.compact-home-search-panel #buyForm .compact-home-search-transaction > li > a {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  min-height: calc(var(--invista-home-field-height) - 6px);
  margin: 0;
  padding: 2px 5px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  box-shadow: none;
  color: var(--compact-home-search-ink);
  font-size: var(--compact-home-search-label-size);
  font-weight: 500;
  line-height: 1.25;
  text-decoration: none;
  white-space: nowrap;
}

.compact-home-search-panel #buyForm .compact-home-search-transaction > li > a[aria-pressed=true] {
  background: var(--compact-home-search-primary);
  color: #fff;
  font-weight: 600;
}

.compact-home-search-panel .compact-home-search-filter { position: relative; min-width: 0; }
.compact-home-search-panel .compact-home-search-filter > :is(.compact-home-search-field-icon, .compact-home-search-chevron) {
  position: absolute;
  top: calc(var(--invista-home-field-height) / 2);
  z-index: 1;
  color: #515970;
  font-size: 14px;
  transform: translateY(-50%);
  pointer-events: none;
}
.compact-home-search-panel .compact-home-search-filter > .compact-home-search-field-icon { inset-inline-start: 11px; }
.compact-home-search-panel .compact-home-search-filter > .compact-home-search-chevron { inset-inline-end: 10px; }

.compact-home-search-panel #buyForm .compact-home-search-region .select2-selection--multiple,
.compact-home-search-panel .compact-home-search-filter > select.form-control:not(.select2-hidden-accessible),
.compact-home-search-panel .compact-home-search-price > summary {
  min-height: var(--invista-home-field-height);
  border: 1px solid var(--compact-home-search-line);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 1px 2px #242d4910;
  color: var(--compact-home-search-ink);
}

.compact-home-search-panel #buyForm .compact-home-search-region .select2-container .select2-selection--multiple {
  padding: 0 !important;
  border-color: var(--compact-home-search-line) !important;
}

.compact-home-search-panel #buyForm .compact-home-search-region .select2-selection__rendered {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  width: 100%;
  min-height: calc(var(--invista-home-field-height) - 2px);
  padding-inline: 30px 22px;
}

.compact-home-search-panel #buyForm .compact-home-search-region .select2-selection__rendered:has(.select2-selection__choice) {
  row-gap: 4px;
  padding-block: 4px;
}

.compact-home-search-panel #buyForm .compact-home-search-region .select2-selection__choice {
  margin: 0;
  font-size: var(--compact-home-search-label-size);
}

.compact-home-search-panel #buyForm .compact-home-search-region .select2-search--inline {
  flex: 1 1 42px;
  min-width: 0;
  margin: 0;
}

.compact-home-search-panel #buyForm .compact-home-search-region .select2-search__field {
  display: block;
  appearance: none;
  width: 100% !important;
  max-width: 100%;
  height: 24px;
  margin: 0;
  color: var(--compact-home-search-ink);
  font-size: var(--compact-home-search-label-size) !important;
  line-height: 1.25;
}
.compact-home-search-panel #buyForm .compact-home-search-region .select2-search__field:focus-visible {
  outline-offset: 0 !important;
}

.compact-home-search-panel #buyForm .compact-home-search-region .select2-search__field::placeholder { color: var(--compact-home-search-ink); opacity: 1; }

.compact-home-search-panel .compact-home-search-filter > select.form-control:not(.select2-hidden-accessible) {
  padding-inline: 30px 20px;
  font-size: var(--compact-home-search-control-size);
}

.compact-home-search-price { position: relative; min-width: 0; }
.compact-home-search-price[open] { z-index: 5; }
.compact-home-search-panel .compact-home-search-price > summary {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 26px 0 10px;
  font-size: var(--compact-home-search-control-size);
  line-height: 1.25;
  list-style: none;
  cursor: pointer;
}
.compact-home-search-price > summary::-webkit-details-marker { display: none; }
.compact-home-search-price > summary .fa { flex: none; font-size: 14px; }
.compact-home-search-price > summary [data-search-price-label] { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compact-home-search-price[open] > summary .compact-home-search-chevron { transform: translateY(-50%) rotate(180deg); }

.compact-home-search-price-fields {
  --invista-home-field-height: 44px;
  position: absolute;
  inset-block-start: calc(100% + 6px);
  inset-inline-end: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: min(270px, calc(100vw - 54px));
  padding: 10px;
  border: 1px solid var(--compact-home-search-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 6px 20px #20294326;
}

.compact-home-search-panel #buyForm .compact-home-search-submit :is(button, input) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100% !important;
  min-height: var(--invista-home-field-height);
  height: var(--invista-home-field-height) !important;
  margin: 0;
  padding: 0 6px;
  border: 1px solid var(--compact-home-search-primary);
  border-radius: 7px;
  background: var(--compact-home-search-primary);
  color: #fff;
  font-size: var(--compact-home-search-control-size);
  font-weight: 600;
  line-height: 1.25;
}
.compact-home-search-submit .fa { font-size: 14px; }

.compact-home-search-panel #buyForm .compact-home-search-submit :is(button, input):hover {
  border-color: var(--compact-home-search-hover);
  background: var(--compact-home-search-hover);
}

.compact-home-search-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0 12px;
  min-width: 0;
}

.compact-home-search-panel #buyForm .compact-home-search-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: none;
  gap: 8px;
  width: auto !important;
  height: auto !important;
  min-height: 28px;
  margin: 0;
  padding: 0 3px;
  border: 0;
  background: transparent;
  color: var(--compact-home-search-primary);
  font-size: var(--compact-home-search-label-size);
  font-weight: 500;
  line-height: 1.25;
  text-decoration: none;
}
.compact-home-search-link .fa { flex: none; font-size: 12px; }
.compact-home-search-panel .compact-home-search-link:is(:hover, [aria-expanded=true]) { text-decoration: underline; }
.compact-home-search-panel .compact-home-search-price > summary:focus-visible,
.compact-home-search-panel .compact-home-search-link:focus-visible { outline: 2px solid var(--compact-home-search-primary); outline-offset: 3px; }

.compact-home-search-modes-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(170px, 220px);
  align-items: center;
  gap: 10px 16px;
  margin-bottom: 10px;
}

.compact-home-search-panel .compact-home-search-modes-row > * { min-width: 0; }

.compact-home-search-panel .compact-home-search-modes-row .invista-search-modes {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  border: 1px solid #e1e2eb;
  border-radius: 9px;
  background: #f4f3f9;
}

.compact-home-search-panel .compact-home-search-modes-row .invista-search-modes button {
  min-height: 32px;
  padding: 5px 11px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--compact-home-search-ink);
  font-size: var(--compact-home-search-label-size);
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
}

.compact-home-search-panel .compact-home-search-modes-row .invista-search-modes button[aria-pressed=true] {
  background: var(--compact-home-search-primary);
  color: #fff;
}

.compact-home-search-panel .compact-home-search-modes-row .invista-search-modes button:not([aria-pressed=true]):hover {
  background: #eae8f5;
  color: var(--compact-home-search-primary);
}

.compact-home-search-panel .compact-home-search-code {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  align-items: stretch;
  gap: 0;
  min-width: 0;
  min-height: 40px;
  margin: 0;
  border: 1px solid var(--compact-home-search-line);
  border-radius: 8px;
  background: #fff;
}

.compact-home-search-panel .compact-home-search-code input[name=code] {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 100%;
  margin: 0;
  padding: 5px 9px;
  border: 0;
  border-radius: 7px 0 0 7px;
  background: #fff;
  color: var(--compact-home-search-ink);
  font-size: 16px;
  line-height: 1.25;
}

.compact-home-search-panel .compact-home-search-code button[type=submit] {
  display: grid;
  place-items: center;
  width: 100%;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-inline-start: 1px solid var(--compact-home-search-line);
  border-radius: 0 7px 7px 0;
  background: #f5f4fb;
  color: var(--compact-home-search-primary);
  font-size: 15px;
}

.compact-home-search-panel .compact-home-search-code button[type=submit]:hover {
  background: #eae8f5;
}

.compact-home-search-panel :is(.compact-home-search-modes-row button, .compact-home-search-code :is(input, button)):focus-visible {
  outline: 2px solid var(--compact-home-search-primary);
  outline-offset: 2px;
}

.compact-home-search-panel #buyForm .compact-home-search-category > select {
  height: var(--invista-home-field-height);
  padding-inline: 30px 8px;
  font-size: var(--compact-home-search-label-size);
}

dialog.compact-home-search-details {
  --invista-home-field-height: 44px;
  box-sizing: border-box;
  position: fixed;
  inset: 0;
  width: min(760px, calc(100vw - 36px));
  max-width: none;
  max-height: calc(100vh - 36px);
  max-height: min(760px, calc(100dvh - 36px));
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid #dde1ef;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 22px 66px #191f4370;
  color: var(--compact-home-search-ink);
}

dialog.compact-home-search-details[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

dialog.compact-home-search-details::backdrop { background: #1a224a8c; }

.compact-home-search-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 22px;
  border-bottom: 1px solid #e7e8f0;
  background: #f8f8fc;
}

.compact-home-search-dialog-header h2 {
  min-width: 0;
  margin: 0;
  color: var(--compact-home-search-primary);
  font-size: clamp(18px, 2vw, 23px);
  font-weight: 700;
  line-height: 1.35;
}

.compact-home-search-panel #buyForm .compact-home-search-dialog-header button {
  display: grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0 0 2px;
  border: 1px solid var(--compact-home-search-line);
  border-radius: 8px;
  background: #fff;
  color: var(--compact-home-search-primary);
  font-size: 24px;
  line-height: 1;
}

.compact-home-search-panel #buyForm .compact-home-search-dialog-header button:hover {
  background: #ebe9f6;
}

.compact-home-search-dialog-body {
  min-width: 0;
  min-height: 0;
  padding: 18px 22px 22px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.compact-home-search-section + .compact-home-search-section {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #e7e8f0;
}

.compact-home-search-section h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 9px;
  color: var(--compact-home-search-ink);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
}

.compact-home-search-fields,
.compact-home-search-details #buyextra {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.compact-home-search-panel #buyForm :is(.compact-home-search-fields, .compact-home-search-control-pair) .form-control {
  width: 100% !important;
  height: auto !important;
  min-height: var(--invista-home-field-height);
  margin: 0;
  padding: 8px 10px;
  border: 1px solid var(--compact-home-search-line);
  border-radius: 7px;
  background: #fff;
  font-size: 16px !important;
  line-height: 1.25;
}

.compact-home-search-paired {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px 20px;
}

.compact-home-search-control-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.compact-home-search-control-pair > label > span {
  display: block;
  margin-bottom: 4px;
  color: var(--compact-home-search-ink);
  font-size: var(--compact-home-search-label-size);
  line-height: 1.25;
}

.compact-home-search-slider {
  display: grid;
  min-width: 0;
  padding: 8px 12px;
  border: 1px solid var(--compact-home-search-line);
  border-radius: 9px;
  background: #fafafe;
}

.compact-home-search-slider [data-slider-summary] {
  grid-row: 1;
  justify-self: end;
  min-width: 0;
  color: var(--compact-home-search-primary);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.compact-home-search-slider-track {
  --search-thumb-size: 24px;
  --search-slider-start: 0%;
  --search-slider-end: 100%;
  position: relative;
  grid-row: 2;
  height: 44px;
  cursor: pointer;
}

.compact-home-search-slider-track::before {
  position: absolute;
  inset-inline: calc(var(--search-thumb-size) / 2);
  top: 50%;
  height: 6px;
  border-radius: 10px;
  background: linear-gradient(to right,
    #dfe2ef 0 var(--search-slider-start),
    var(--compact-home-search-primary) var(--search-slider-start) var(--search-slider-end),
    #dfe2ef var(--search-slider-end) 100%);
  content: "";
  transform: translateY(-50%);
  pointer-events: none;
}

.compact-home-search-panel #buyForm .compact-home-search-slider-track input[type=range] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  appearance: none;
  background: transparent;
  pointer-events: none;
}

.compact-home-search-slider-track input[type=range]:focus { z-index: 1; }
.compact-home-search-slider-track input[type=range]:focus-visible { outline: 0; }

.compact-home-search-slider-track input[type=range]::-webkit-slider-runnable-track {
  height: var(--search-thumb-size);
  background: transparent;
}

.compact-home-search-slider-track input[type=range]::-webkit-slider-thumb {
  box-sizing: border-box;
  width: var(--search-thumb-size);
  height: var(--search-thumb-size);
  border: 2px solid var(--compact-home-search-primary);
  border-radius: 50%;
  appearance: none;
  background: #fff;
  cursor: grab;
  pointer-events: auto;
}

.compact-home-search-slider-track input[type=range]::-moz-range-track { background: transparent; }

.compact-home-search-slider-track input[type=range]::-moz-range-thumb {
  box-sizing: border-box;
  width: var(--search-thumb-size);
  height: var(--search-thumb-size);
  border: 2px solid var(--compact-home-search-primary);
  border-radius: 50%;
  background: #fff;
  cursor: grab;
  pointer-events: auto;
}

.compact-home-search-slider-track input[type=range]:focus-visible::-webkit-slider-thumb {
  outline: 2px solid var(--compact-home-search-primary);
  outline-offset: 2px;
}

.compact-home-search-slider-track input[type=range]:focus-visible::-moz-range-thumb {
  outline: 2px solid var(--compact-home-search-primary);
  outline-offset: 2px;
}

.compact-home-search-ticks {
  display: flex;
  grid-row: 3;
  justify-content: space-between;
  gap: 2px;
  padding: 0 3px 1px;
  color: #586078;
  font-size: clamp(10px, 2.3vw, 12px);
  line-height: 1.25;
}

.compact-home-search-panel #buyForm .compact-home-search-paired label:has([data-year-new-build]) {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  min-height: 44px;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid var(--compact-home-search-line);
  border-radius: 7px;
  background: #fff;
  color: var(--compact-home-search-ink);
  font-size: 14px;
  cursor: pointer;
}

.compact-home-search-panel #buyForm .compact-home-search-paired [data-year-new-build] {
  position: static;
  flex: none;
  width: 16px;
  height: 16px;
  margin: 0;
  appearance: auto;
  accent-color: var(--compact-home-search-primary);
}

.compact-home-search-panel #buyForm .compact-home-search-paired label:has([data-year-new-build]:checked) {
  border-color: #8b90c3;
  background: #eeedf8;
}

@media (max-width: 520px) {
  .compact-home-search-paired { grid-template-columns: minmax(0, 1fr); }
  .compact-home-search-slider { padding-inline: 8px; }
}

@media (forced-colors: active) {
  .compact-home-search-slider-track::before { border: 1px solid ButtonText; }
  .compact-home-search-slider-track input[type=range]::-webkit-slider-thumb { border-color: ButtonText; }
  .compact-home-search-slider-track input[type=range]::-moz-range-thumb { border-color: ButtonText; }
}

.compact-home-search-panel #buyForm .compact-home-search-fields select.form-control {
  appearance: none;
  padding-inline-end: 28px;
  background-image:
    linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 15px) center, calc(100% - 10px) center;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}

.compact-home-search-subtype-dropdown { position: relative; }
.compact-home-search-subtype-dropdown[open] { z-index: 2; }
.compact-home-search-subtype-dropdown > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--compact-home-search-line);
  border-radius: 7px;
  background: #fff;
  color: var(--compact-home-search-ink);
  cursor: pointer;
  list-style: none;
}
.compact-home-search-subtype-dropdown > summary::-webkit-details-marker { display: none; }
.compact-home-search-subtype-dropdown > summary > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.compact-home-search-subtype-dropdown[open] > summary > i { transform: rotate(180deg); }
.compact-home-search-subtype-dropdown > summary:focus-visible {
  outline: 2px solid var(--compact-home-search-primary);
  outline-offset: 2px;
}
.compact-home-search-subtype-dropdown > .compact-home-search-type-groups {
  position: absolute;
  inset: calc(100% + 4px) 0 auto;
  display: block;
  box-sizing: border-box;
  max-height: min(270px, 37dvh);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px;
  border: 1px solid var(--compact-home-search-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px #242d492b;
}

.compact-home-search-type-group {
  min-width: 0;
  margin: 0;
  padding: 9px 10px 10px;
  border: 1px solid #e1e2ee;
  border-radius: 9px;
  background: #fafafe;
}

.compact-home-search-type-group legend {
  width: auto;
  margin: 0;
  padding-inline: 3px;
  border: 0;
  color: var(--compact-home-search-primary);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.compact-home-search-section-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 12px;
  margin-bottom: 9px;
}

.compact-home-search-section-heading h3 { margin: 0; }

.compact-home-search-panel #buyForm .compact-home-search-section-heading [data-search-clear-view] {
  width: auto !important;
  height: auto !important;
  min-height: 32px;
  margin: 0;
  padding: 4px 8px;
  border: 1px solid var(--compact-home-search-line);
  border-radius: 6px;
  background: #fff;
  color: var(--compact-home-search-primary);
  font-size: 13px;
  line-height: 1.25;
}

.compact-home-search-panel #buyForm .compact-home-search-section-heading [data-search-clear-view]:not([aria-disabled=true]):hover {
  background: #eeedf8;
}

.compact-home-search-panel #buyForm .compact-home-search-section-heading [data-search-clear-view][aria-disabled=true] {
  color: #5a637e;
  cursor: default;
}

.compact-home-search-options { display: grid; gap: 4px; }
.compact-home-search-type-group + .compact-home-search-type-group { margin-top: 6px; }

.compact-home-search-panel #buyForm .compact-home-search-options label {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  max-width: 100%;
  min-height: 39px;
  margin: 0;
  padding: 5px 8px;
  border: 1px solid var(--compact-home-search-line);
  border-radius: 6px;
  background: #fff;
  color: var(--compact-home-search-ink);
  font-size: 13px;
  line-height: 1.3;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
}

.compact-home-search-options input[type=checkbox] {
  position: static;
  flex: none;
  width: 15px;
  height: 15px;
  margin: 0 !important;
  appearance: auto;
  accent-color: var(--compact-home-search-primary);
}

.compact-home-search-panel #buyForm .compact-home-search-options label:hover,
.compact-home-search-panel #buyForm .compact-home-search-options label:has(input:checked) {
  border-color: #8b90c3;
  background: #eeedf8;
  color: var(--compact-home-search-primary);
}

.compact-home-search-dialog-footer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px 13px;
  padding: 13px 22px;
  border-top: 1px solid #e7e8f0;
  background: #fff;
}

.compact-home-search-dialog-footer #txtHint {
  float: none !important;
  min-width: 0;
  margin: 0;
  color: #5a637e;
  font-size: 13px;
  line-height: 1.35;
  text-align: end;
}

.compact-home-search-panel #buyForm .compact-home-search-dialog-footer [data-search-clear],
.compact-home-search-panel #buyForm .compact-home-search-dialog-footer .compact-home-search-dialog-submit {
  width: auto !important;
  min-width: 0;
  min-height: 44px;
  height: auto !important;
  margin: 0;
  padding: 8px 13px;
  border: 1px solid var(--compact-home-search-primary);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
}

.compact-home-search-panel #buyForm .compact-home-search-dialog-footer [data-search-clear] {
  background: #fff;
  color: var(--compact-home-search-primary);
}

.compact-home-search-panel #buyForm .compact-home-search-dialog-footer [data-search-clear]:hover {
  background: #eeedf8;
}

.compact-home-search-panel #buyForm .compact-home-search-dialog-footer .compact-home-search-dialog-submit {
  grid-column: -2 / -1;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--compact-home-search-primary);
  color: #fff;
}

.compact-home-search-panel #buyForm .compact-home-search-dialog-footer .compact-home-search-dialog-submit:hover {
  border-color: var(--compact-home-search-hover);
  background: var(--compact-home-search-hover);
}

.compact-home-search-details :is(button, .form-control):focus-visible,
.compact-home-search-options label:has(input:focus-visible) {
  outline: 2px solid var(--compact-home-search-primary);
  outline-offset: 2px;
}

@media (max-width: 767px) {
  .compact-home-search-panel,
  html[data-invista-design=v1] .invista-design-hero .searchPanel.compact-home-search-panel {
    --invista-home-field-height: 44px;
    padding: 12px;
  }

  .compact-home-search-modes-row {
    grid-template-columns: minmax(0, 1fr) minmax(135px, 180px);
    gap: 8px;
  }

  .compact-home-search-panel .compact-home-search-modes-row .invista-search-modes {
    display: flex;
  }

  .compact-home-search-panel .compact-home-search-modes-row .invista-search-modes button {
    min-height: 44px;
    padding-inline: 6px;
  }

  .compact-home-search-panel .compact-home-search-code {
    grid-template-columns: minmax(0, 1fr) 44px;
    min-height: 44px;
  }

  .compact-home-search-summary { grid-template-columns: minmax(164px, 1.07fr) minmax(0, .93fr); gap: 8px; }
  .compact-home-search-panel #buyForm .compact-home-search-summary > * { grid-area: auto; }
  .compact-home-search-panel #buyForm .compact-home-search-summary > .compact-home-search-region { grid-column: 1 / -1; }
  .compact-home-search-panel #buyForm .compact-home-search-transaction { margin: 0; }
  .compact-home-search-panel #buyForm .compact-home-search-transaction::after { display: none; }
  .compact-home-search-price-fields { inset-inline: 0 auto; }
  .compact-home-search-panel #buyForm .compact-home-search-link { min-height: 44px; }

  .compact-home-search-details #buyextra { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .compact-home-search-panel #buyForm .compact-home-search-options label { min-height: 44px; }
}

@media (max-width: 520px) {
  .compact-home-search-modes-row { grid-template-columns: minmax(0, 1fr); }

  dialog.compact-home-search-details {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
    max-height: calc(100dvh - 20px);
    border-radius: 12px;
  }

  .compact-home-search-dialog-header,
  .compact-home-search-dialog-body,
  .compact-home-search-dialog-footer { padding-inline: 13px; }

  .compact-home-search-dialog-body { padding-block: 13px 16px; }
  .compact-home-search-dialog-footer { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }

  .compact-home-search-dialog-footer #txtHint {
    grid-column: 1 / -1;
    grid-row: 1;
    text-align: start;
  }

  .compact-home-search-dialog-footer [data-search-clear] { grid-column: 1; }
  .compact-home-search-dialog-footer .compact-home-search-dialog-submit { grid-column: 2; }
}

@media (max-width: 360px) {
  .compact-home-search-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .compact-home-search-panel #buyForm .compact-home-search-summary > :is(.compact-home-search-transaction, .compact-home-search-category) { grid-column: 1 / -1; }
  .compact-home-search-panel #buyForm .compact-home-search-transaction > li > a { padding-inline: 3px; font-size: 13px; }
  .compact-home-search-panel .compact-home-search-category > .compact-home-search-field-icon { display: none; }
  .compact-home-search-panel #buyForm .compact-home-search-category > select { padding-inline-start: 8px; }
}

@media (max-height: 480px) {
  .compact-home-search-dialog-header,
  .compact-home-search-dialog-footer { padding-block: 7px; }
}

/* Keep the filter form in the layout while AI is open, including across viewport changes. */
html[data-invista-design=v1] .invista-design-hero .searchPanel.compact-home-search-panel:has(.compact-home-search-modes-row) {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}
.compact-home-search-panel:has(.compact-home-search-modes-row) > [data-invista-widget=ai-home],
.compact-home-search-panel:has(.compact-home-search-modes-row) > [data-invista-widget=ai-home] > div {
  display: contents;
}
.compact-home-search-modes-row { grid-area: 1 / 1; }
.compact-home-search-panel:has(.compact-home-search-modes-row) > #invista-classic-search,
.compact-home-search-panel #invista-ai-search {
  grid-area: 2 / 1;
  min-width: 0;
}
.compact-home-search-panel:has(.compact-home-search-modes-row) > #invista-classic-search:not([hidden]) { display: block !important; }
.compact-home-search-panel #invista-classic-search[inert] { visibility: hidden; opacity: 0; }
.compact-home-search-panel #invista-ai-search { align-self: center; }

#invista-ai-search .compact-home-ai-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: center;
  gap: 8px 12px;
}
#invista-ai-search .compact-home-ai-form textarea {
  height: 58px;
  min-height: 58px;
  padding: 7px 11px;
  line-height: 1.3;
  resize: none;
}
#invista-ai-search .compact-home-ai-form > div {
  flex-flow: row nowrap;
  align-items: center;
  gap: 9px;
  margin: 0;
}
#invista-ai-search .compact-home-ai-form small { flex: none; align-self: center; white-space: nowrap; }
#invista-ai-search .compact-home-ai-form small span { margin: 0; }
#invista-ai-search .compact-home-ai-form .invista-ai-submit {
  min-width: 0;
  min-height: 40px;
  width: auto;
  margin: 0;
  padding: 7px 11px;
  font-size: var(--compact-home-search-label-size);
}
@media (min-width: 601px) {
  #invista-ai-search .compact-home-ai-form label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}
@media (max-width: 600px) {
  .compact-home-search-panel #invista-ai-search { align-self: start; }
  #invista-ai-search .compact-home-ai-form { grid-template-columns: minmax(0, 1fr); }
  #invista-ai-search .compact-home-ai-form label { margin: 0; }
  #invista-ai-search .compact-home-ai-form textarea { height: 80px; min-height: 80px; }
  #invista-ai-search .compact-home-ai-form .invista-ai-submit { flex: 1; min-height: 44px; }
  #invista-ai-search .compact-home-ai-form small { order: 1; }
}
