/* Booking card: the search bar as a raised glass card over the header photo.
   Built by tracking/legacy-refresh/kit/apply_kit.py for valfurva.org. Served as /refresh/bar.css and loaded by
   path/header_grande.php and path/header_interno.php just before the bar.
   It applies only where the bar's wrapper carries the class "vt-searchcard",
   so a site without the template edit keeps its orange band.

   Per-site accent: set the three --vt-accent* variables (see the end of the file).
   Legibility: the labels and text are dark ink on a 62% white tint over the blurred
   photo. Even over a black photo that is 5.4:1; measured values are in README.md. The date fields
   are solid white. */
.motore_ricerca_new.vt-searchcard {
  --vt-accent: #f37521;          /* the button; per site, from the site config */
  --vt-accent-hover: #e0640f;
  --vt-on-accent: #1c1c1c;       /* must be 4.5:1 on both; apply_kit.py checks it */
  --vt-ink: #1f2a33;
  --vt-glass: rgba(255, 255, 255, 0.62);  /* over pure black this still gives the ink 5.4:1 */
  --vt-solid: rgba(255, 255, 255, 0.97);
  --vt-overlap: 58px;            /* how far the card rides up over the photo */
  position: relative;
  z-index: 30;
  height: auto;
  margin: calc(-1 * var(--vt-overlap)) 0 0;
  padding: 0 0 20px;
  background: none;
  transition: none;
}
.motore_ricerca_new.vt-searchcard:hover { background: none; }

.motore_ricerca_new.vt-searchcard .titolo_sx {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px 32px;
  box-sizing: border-box;
  width: var(--wide, min(1120px, 92vw));
  min-height: 0;
  margin: 0 auto;
  padding: 18px 20px 18px 26px !important;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 16px;
  background: var(--vt-glass);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  backdrop-filter: blur(18px) saturate(1.5);
  box-shadow: 0 1px 2px rgba(18, 24, 30, 0.10), 0 14px 36px rgba(18, 24, 30, 0.22);
  color: var(--vt-ink);
  font: 400 16px/1.4 var(--ui, system-ui, sans-serif) !important;
  letter-spacing: 0;
  text-align: left;
  text-wrap: pretty;
}
/* no blur available: a nearly opaque card instead of see-through text on a photo */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .motore_ricerca_new.vt-searchcard .titolo_sx { background: var(--vt-solid); }
}
@media (prefers-reduced-transparency: reduce) {
  .motore_ricerca_new.vt-searchcard .titolo_sx {
    background: #fff;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

.vt-searchcard .vt-bar-text { display: block; min-width: 0; color: var(--vt-ink); }
.vt-searchcard .vt-bar-text b {
  display: block;
  margin: 0 0 2px;
  font: 600 22px/1.2 var(--read, Georgia, serif);
  letter-spacing: -0.005em;
  color: var(--vt-ink);
}

.motore_ricerca_new.vt-searchcard .solo_bordo {
  position: static;
  float: none;
  display: block;
  width: auto;
  height: auto !important;
  margin: 0;
  padding: 0;
  border: 0;
  transform: none;
}
.motore_ricerca_new.vt-searchcard .ricerca_home { display: block; height: auto !important; margin: 0; padding: 0; }
.motore_ricerca_new.vt-searchcard .ricerca_home form {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  width: auto;
  margin: 0 !important;
}
.motore_ricerca_new.vt-searchcard .ricerca_home .from,
.motore_ricerca_new.vt-searchcard .ricerca_home .to {
  float: none;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 5px;
  width: auto !important;
  height: auto;
  margin: 0 !important;
  text-align: left;
}
.motore_ricerca_new.vt-searchcard .ricerca_home label {
  float: none;
  width: auto;
  margin: 0;
  padding: 0;
  font: 600 13px/1.2 var(--ui, system-ui, sans-serif);
  letter-spacing: 0.02em;
  color: var(--vt-ink);
}
.motore_ricerca_new.vt-searchcard .ricerca_home input[type="date"],
.motore_ricerca_new.vt-searchcard .ricerca_home input[type="text"] {
  box-sizing: border-box;
  width: 172px !important;
  min-width: 0;
  height: 48px;
  margin: 0;
  padding: 0 12px;
  border: 1.5px solid #76828c;      /* 3.9:1 against the white field */
  border-radius: 8px;
  background: #fff;
  color: var(--vt-ink);
  font: 500 16px/1 var(--ui, system-ui, sans-serif);
  -webkit-appearance: none;
  appearance: none;
}
.motore_ricerca_new.vt-searchcard .ricerca_home input[type="date"]:hover { border-color: var(--vt-ink); }
.motore_ricerca_new.vt-searchcard .ricerca_home input:focus-visible,
.motore_ricerca_new.vt-searchcard #invio:focus-visible {
  outline: 3px solid var(--blue, #00589a);
  outline-offset: 2px;
}
.motore_ricerca_new.vt-searchcard .ricerca_home input[type="submit"],
.motore_ricerca_new.vt-searchcard #invio {
  float: none !important;
  box-sizing: border-box;
  width: auto;
  height: 48px;
  margin: 0 !important;
  padding: 0 24px;
  border: 0;
  border-radius: 8px;
  background: var(--vt-accent) !important;
  color: var(--vt-on-accent) !important;
  font: 700 16px/1 var(--ui, system-ui, sans-serif);
  letter-spacing: 0.01em;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
  transition: background-color 0.15s ease-out;
  touch-action: manipulation;
}
.motore_ricerca_new.vt-searchcard #invio:hover,
.motore_ricerca_new.vt-searchcard:hover > div #invio {
  background: var(--vt-accent) !important;
  color: var(--vt-on-accent) !important;
}
.motore_ricerca_new.vt-searchcard #invio:hover { background: var(--vt-accent-hover) !important; }
.motore_ricerca_new.vt-searchcard #invio:active { transform: translateY(1px); }

/* refresh.css narrows the old bar's fields and button on list pages; the card keeps one size */
body .motore_ricerca_new.vt-searchcard .ricerca_home input[type="date"] { width: 172px; }
body .motore_ricerca_new.vt-searchcard #invio { padding: 0 24px; }
body .motore_ricerca_new.vt-searchcard .titolo_sx { font-size: 16px; }

/* between phone and desktop the text goes above the fields */
@media screen and (max-width: 1040px) {
  .motore_ricerca_new.vt-searchcard .titolo_sx { grid-template-columns: minmax(0, 1fr); padding: 18px 20px !important; }
  .motore_ricerca_new.vt-searchcard .ricerca_home .from,
  .motore_ricerca_new.vt-searchcard .ricerca_home .to { flex: 1 1 0; }
  .motore_ricerca_new.vt-searchcard .ricerca_home input[type="date"],
  .motore_ricerca_new.vt-searchcard .ricerca_home input[type="text"] { width: 100% !important; }
}
/* phones: the card sits just under the photo, fields stacked */
@media screen and (max-width: 767px) {
  .motore_ricerca_new.vt-searchcard { --vt-overlap: 22px; padding-bottom: 8px; }
  .motore_ricerca_new.vt-searchcard .titolo_sx {
    width: calc(100% - 24px);
    padding: 16px !important;
    gap: 14px;
    border-radius: 14px;
    text-align: left;
    line-height: 1.4 !important;
  }
  .vt-searchcard .vt-bar-text b { font-size: 20px; }
  .motore_ricerca_new.vt-searchcard .solo_bordo { width: 100%; margin: 0; }
  .motore_ricerca_new.vt-searchcard .ricerca_home form { flex-direction: column; align-items: stretch; gap: 10px; width: 100%; }
  .motore_ricerca_new.vt-searchcard .ricerca_home .from,
  .motore_ricerca_new.vt-searchcard .ricerca_home .to { flex: none; }
  .motore_ricerca_new.vt-searchcard .ricerca_home input[type="date"],
  .motore_ricerca_new.vt-searchcard .ricerca_home input[type="text"] { width: 100% !important; min-width: 100%; }
  .motore_ricerca_new.vt-searchcard #invio { width: 100%; height: 50px; margin-top: 4px !important; }
}
/* list pages on phones show no header photo: nothing to overlap, so the card stands on its own */
@media screen and (max-width: 767px) {
  .motore_ricerca_new.vt-searchcard.vt-inner { --vt-overlap: 0px; padding-top: 14px; }
  /* and it must not push the list far down: one line of text, the two dates side by side */
  .motore_ricerca_new.vt-searchcard.vt-inner .vt-bar-text { font-size: 0; }
  .motore_ricerca_new.vt-searchcard.vt-inner .vt-bar-text b { font-size: 19px; margin: 0; }
  .motore_ricerca_new.vt-searchcard.vt-inner .ricerca_home form { flex-direction: row; flex-wrap: wrap; align-items: flex-end; }
  .motore_ricerca_new.vt-searchcard.vt-inner .ricerca_home .from,
  .motore_ricerca_new.vt-searchcard.vt-inner .ricerca_home .to { flex: 1 1 0; min-width: 0; }
  .motore_ricerca_new.vt-searchcard.vt-inner .ricerca_home input[type="date"] { min-width: 0; padding: 0 8px; }
  .motore_ricerca_new.vt-searchcard.vt-inner .titolo_sx { box-shadow: 0 1px 2px rgba(18, 24, 30, 0.10), 0 6px 18px rgba(18, 24, 30, 0.14); border-color: #e3e0da; }
}
@media (prefers-reduced-motion: reduce) {
  .motore_ricerca_new.vt-searchcard #invio { transition: none; }
}

/* ---------- per-site accent ----------
   The markup is the same on every site that shows the bar, so a site only needs its
   own three values. Example for stelvio.net (glacier blue, white label, 7.6:1):

   .motore_ricerca_new.vt-searchcard { --vt-accent: #0b5a7c; --vt-accent-hover: #084863; --vt-on-accent: #fff; }
*/
