/*
 * HoEscape search widget — whitelabel styles.
 *
 * Colours are driven by CSS variables set at runtime from /api/v3/config
 * (colors block). Defaults below mirror the InfoIschia palette so the widget
 * is never unstyled before config loads. Elementor users can also override the
 * variables on the .hoe-search container via custom CSS.
 */
.hoe-search {
  --hoe-primary: #1e3c72;
  --hoe-primary-dark: #152a4f;
  --hoe-secondary: #2a5298;
  --hoe-accent: #f5a623;
  --hoe-accent-hover: #e09000;
  --hoe-light-bg: #f8f9fa;
  --hoe-radius: 14px;
  color: #1f2933;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.hoe-search *, .hoe-search *::before, .hoe-search *::after { box-sizing: border-box; }

.hoe-search__boot { padding: 2rem; text-align: center; color: #6b7280; }

/* ── Search form ─────────────────────────────────────────────── */
.hoe-form {
  display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end;
  background: #fff; border: 1px solid #e5e7eb; border-radius: var(--hoe-radius);
  padding: 1rem; box-shadow: 0 6px 24px rgba(0,0,0,.05); margin-bottom: 1.25rem;
}
.hoe-field { display: flex; flex-direction: column; gap: .25rem; flex: 1 1 140px; }
.hoe-field label { font-size: .72rem; font-weight: 600; color: #6b7280; text-transform: uppercase; letter-spacing: .03em; }
.hoe-field input, .hoe-field select {
  height: 44px; padding: 0 .7rem; border: 1px solid #d1d5db; border-radius: 10px;
  font-size: .95rem; background: #fff;
}
.hoe-btn {
  height: 44px; padding: 0 1.4rem; border: 0; border-radius: 10px; cursor: pointer;
  font-weight: 700; font-size: .95rem; color: #fff;
  background: linear-gradient(135deg, var(--hoe-primary), var(--hoe-secondary));
}
.hoe-btn--accent { background: var(--hoe-accent); color: #1f2933; }
.hoe-btn--accent:hover { background: var(--hoe-accent-hover); }
.hoe-btn--ghost { background: transparent; color: var(--hoe-primary); border: 1px solid var(--hoe-primary); }

/* ── WP/Elementor theme reset — ischiaonline.it injects button { background: rgb(240,192,41) !important }
   on every <button>. To restore correct colors we need (0,2,0) specificity to beat (0,1,1). ───── */
.hoe-search button {
  background: transparent !important; color: inherit !important;
  border: none !important; box-shadow: none !important;
  font-family: inherit !important; font-size: inherit !important; cursor: pointer;
}
/* Primary gradient buttons */
.hoe-search .hoe-btn {
  background: linear-gradient(135deg, var(--hoe-primary), var(--hoe-secondary)) !important;
  color: #fff !important; border-radius: 10px !important; border: none !important;
}
.hoe-search .hoe-btn--accent { background: var(--hoe-accent) !important; color: #1f2933 !important; }
.hoe-search .hoe-btn--accent:hover { background: var(--hoe-accent-hover) !important; }
.hoe-search .hoe-btn--ghost {
  background: #fff !important; color: var(--hoe-primary) !important;
  border: 1px solid var(--hoe-primary) !important;
}
/* Filter reset button */
.hoe-search .hoe-filter-reset {
  background: #fff !important; color: var(--hoe-primary) !important;
  border: 1px solid #e5e7eb !important; border-radius: 8px !important;
}
.hoe-search .hoe-filter-reset:hover { background: var(--hoe-light-bg) !important; }
/* Calendar nav arrows: transparent, primary color */
.hoe-search .hoe-cal-prev,
.hoe-search .hoe-cal-next {
  background: var(--hoe-light-bg) !important;
  color: var(--hoe-primary) !important; border: none !important;
}
/* Date/guest trigger fields: styled as input (specificity 0,2,0 beats button reset 0,1,1) */
.hoe-search .hoe-dates-trigger {
  background: #fff !important; border: 1px solid #d1d5db !important;
  color: #1f2933 !important; border-radius: 10px !important;
}
.hoe-search .hoe-guests-trigger {
  background: #fff !important; border: 1px solid #d1d5db !important;
  color: #1f2933 !important; border-radius: 10px !important; text-align: left !important;
}
/* Guest counter buttons: circular border style */
.hoe-search .hoe-cnt-minus,
.hoe-search .hoe-cnt-plus {
  background: #fff !important; color: var(--hoe-primary) !important;
  border: 1px solid #d1d5db !important; border-radius: 50% !important;
}
.hoe-search .hoe-cnt-minus:hover,
.hoe-search .hoe-cnt-plus:hover { background: var(--hoe-light-bg) !important; }
/* Guest confirm button: inherit .hoe-btn gradient (already specified above) */

/* ── Date range calendar (matches infoischia.com home picker) ──── */
.hoe-f-dates { position: relative; flex: 1 1 200px; }
.hoe-dates-trigger {
  width: 100%; height: 44px; text-align: left; padding: 0 .7rem;
  border: 1px solid #d1d5db !important; border-radius: 10px !important;
  background: #fff !important; box-shadow: none !important;
  font-size: .95rem; cursor: pointer; color: #1f2933 !important;
  display: flex; align-items: center; white-space: nowrap; overflow: hidden;
  -webkit-appearance: none; appearance: none;
}
.hoe-dates-trigger::before { content: '\1F4C5'; margin-right: .45rem; opacity: .7; }
.hoe-cal {
  position: absolute; z-index: 60; top: calc(100% + 6px); left: 0;
  background: #fff; border: 1px solid #e5e7eb; border-radius: 14px;
  box-shadow: 0 16px 44px rgba(0,0,0,.17); padding: .9rem;
}
.hoe-cal[hidden] { display: none; }
.hoe-cal-head { position: absolute; top: .9rem; left: .9rem; right: .9rem; display: flex; justify-content: space-between; pointer-events: none; }
.hoe-cal-nav { pointer-events: auto; -webkit-appearance: none; appearance: none; border: 0 !important; box-shadow: none !important; width: 30px; height: 30px; border-radius: 8px !important; cursor: pointer; font-size: 1.1rem; line-height: 1; background: var(--hoe-light-bg) !important; color: var(--hoe-primary) !important; }
.hoe-cal-months { display: flex; gap: 1.2rem; }
.hoe-cal-month { width: 252px; }
.hoe-cal-title { text-align: center; font-weight: 700; color: var(--hoe-primary); margin-bottom: .55rem; font-size: .95rem; }
.hoe-cal-dow { display: grid; grid-template-columns: repeat(7, 1fr); margin-bottom: .25rem; }
.hoe-cal-dow span { text-align: center; font-size: .66rem; color: #9ca3af; text-transform: uppercase; letter-spacing: .02em; }
.hoe-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
/* Specificity raised to (0,2,0) to beat Elementor's global button reset:
   .hoe-search button { background: yellow !important } — (0,1,1) wins on equal !important.
   Prefixing with .hoe-search gives (0,2,0) which beats (0,1,1). */
/* Fix iOS tap flash + text selection */
.hoe-search .hoe-cal,
.hoe-search .hoe-cal * {
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}
.hoe-search .hoe-cal-day {
  -webkit-appearance: none; appearance: none;
  border: 0 !important; box-shadow: none !important; outline: 0;
  background: transparent !important; color: #1f2933 !important;
  height: 36px; min-width: 0; padding: 0; margin: 0; font-weight: 400;
  border-radius: 50% !important; cursor: pointer; font-size: .88rem;
  touch-action: manipulation;
  transition: background .12s;
}
.hoe-search .hoe-cal-day:hover:not(.hoe-cal-disabled):not(.hoe-cal-empty) { background: var(--hoe-light-bg) !important; }
.hoe-search .hoe-cal-empty { visibility: hidden; }
.hoe-search .hoe-cal-disabled { color: #d1d5db !important; cursor: default; }
/* Oggi: bordo tratteggiato */
.hoe-search .hoe-cal-today { border: 2px dashed var(--hoe-primary) !important; font-weight: 600; }
/* Range tra check-in e check-out */
.hoe-search .hoe-cal-inrange { background: rgba(30,95,158,.1) !important; border-radius: 0 !important; }
/* Check-in e check-out selezionati: cerchio pieno */
.hoe-search .hoe-cal-sel { background: var(--hoe-primary) !important; color: #fff !important; border-radius: 50% !important; font-weight: 700; }
.hoe-cal-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: .7rem; padding-top: .6rem; border-top: 1px solid #f0f0f0; }
.hoe-cal-info { font-size: .85rem; color: #6b7280; }
.hoe-cal-confirm { height: 38px; padding: 0 1.1rem; }
@media (max-width: 700px) {
  .hoe-cal { left: 0; right: 0; }
  .hoe-cal-months { gap: 0; }
  .hoe-cal-month { width: 100%; }
}
/* Nuovi elementi: nascosti su desktop, mostrati su mobile */
.hoe-cal-header-bar { display: none; }
.hoe-cal-dow-bar    { display: none; }

/* ── Layout: filters + results ───────────────────────────────── */
.hoe-layout { display: grid; grid-template-columns: 260px 1fr; gap: 1.5rem; }
@media (max-width: 860px) { .hoe-layout { grid-template-columns: 1fr; } }

.hoe-filters {
  background: #fff; border: 1px solid #e5e7eb; border-radius: var(--hoe-radius);
  padding: 1rem; align-self: start; position: sticky; top: 1rem;
}
.hoe-filters h4 { margin: 0 0 .25rem; font-size: .8rem; text-transform: uppercase; color: var(--hoe-primary); letter-spacing: .03em; }
.hoe-filters-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .4rem; padding-bottom: .5rem; border-bottom: 1px solid #f0f0f0; }
.hoe-filters-title { font-weight: 800; font-size: .95rem; color: #111827; }
.hoe-filter-reset { display: inline-flex; align-items: center; gap: .3rem; border: 1px solid #e5e7eb; background: #fff; color: var(--hoe-primary); font-size: .78rem; font-weight: 600; padding: .3rem .6rem; border-radius: 8px; cursor: pointer; }
.hoe-filter-reset:hover { background: var(--hoe-light-bg); }
.hoe-filter-reset.is-active { border-color: var(--hoe-primary); }
/* On mobile the sidebar drops into normal flow ABOVE the results — keeping it
   sticky made it overlap the cards while scrolling (owner report 2026-06-15).
   Placed AFTER the base .hoe-filters rule so it wins on source order. */
@media (max-width: 860px) { .hoe-filters { position: static; top: auto; } }
.hoe-filter-group { padding: .6rem 0; border-bottom: 1px solid #f0f0f0; }
.hoe-filter-group:last-child { border-bottom: 0; }
.hoe-check { display: flex; align-items: center; gap: .5rem; padding: .2rem 0; font-size: .9rem; cursor: pointer; }
.hoe-check input { accent-color: var(--hoe-primary); }
.hoe-check .hoe-count { margin-left: auto; color: #9ca3af; font-size: .8rem; }

.hoe-toolbar { display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem; flex-wrap: wrap; }
.hoe-toolbar .hoe-count-res { font-weight: 700; color: var(--hoe-primary); }
.hoe-toolbar select { height: 38px; border-radius: 8px; border: 1px solid #d1d5db; padding: 0 .6rem; }

/* ── Result cards (horizontal, mirrors offerte.hoescape.com/cerca) ─ */
.hoe-grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }

.hoe-card {
  display: grid; grid-template-columns: 300px 1fr; background: #fff;
  border: 1px solid #e8eaed; border-radius: var(--hoe-radius); overflow: hidden;
  transition: box-shadow .2s, transform .2s;
}
.hoe-card:hover { box-shadow: 0 12px 32px rgba(0,0,0,.12); transform: translateY(-2px); }
.hoe-card__media { position: relative; min-height: 240px; background: var(--hoe-light-bg); overflow: hidden; }
.hoe-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.hoe-card:hover .hoe-card__media img { transform: scale(1.03); }
.hoe-badges { position: absolute; top: .7rem; left: .7rem; right: 3rem; display: flex; flex-wrap: wrap; gap: .35rem; }
.hoe-badge { background: var(--hoe-accent); color: #1f2933; font-weight: 700; font-size: .72rem; padding: .28rem .7rem; border-radius: 999px; box-shadow: 0 2px 6px rgba(0,0,0,.22); }
.hoe-badge--nave { background: var(--hoe-secondary); color: #fff; }
.hoe-badge--disc { background: rgba(0,0,0,.55); color: #fff; }
.hoe-card__wish {
  position: absolute !important;
  top: .75rem !important; right: .75rem !important;
  width: 36px !important; height: 36px !important;
  background: rgba(255,255,255,.9) !important;
  border-radius: 50% !important;
  display: flex !important; align-items: center !important; justify-content: center !important;
  color: #6b7280 !important; font-size: 1.05rem !important;
  box-shadow: 0 2px 8px rgba(0,0,0,.18) !important;
  cursor: pointer !important;
}
.hoe-card__wish:hover { color: #e23b3b !important; background: #fff !important; }

.hoe-card__body { padding: 1.1rem 1.25rem; display: flex; flex-direction: column; gap: .55rem; min-width: 0; }

/* Head: name full-width, then stars+location LEFT and rating pill RIGHT on same row */
.hoe-card__head {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto auto;
  gap: .2rem .5rem;
}
.hoe-card__name {
  grid-column: 1 / -1; grid-row: 1;
  font-size: 1.2rem; font-weight: 800; margin: 0; color: #111827; line-height: 1.2;
  text-transform: uppercase; letter-spacing: .02em;
}
.hoe-card__sub { grid-column: 1; grid-row: 2; display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; }
.hoe-stars { color: var(--hoe-accent); font-size: .9rem; letter-spacing: .06em; }
.hoe-card__loc { font-size: .82rem; color: #6b7280; display: inline-flex; align-items: center; gap: .22rem; }
.hoe-card__loc .bi { color: var(--hoe-primary); }
.hoe-card__dist { grid-column: 1 / -1; grid-row: 3; display: flex; flex-wrap: wrap; gap: .2rem .8rem; font-size: .8rem; color: #6b7280; }
.hoe-dist { display: inline-flex; align-items: center; gap: .28rem; }
.hoe-dist .bi { color: var(--hoe-primary); font-size: .88rem; }

/* Rating pill: right-aligned on same row as stars/location */
.hoe-card__rating { grid-column: 2; grid-row: 2; display: flex; align-items: center; gap: .4rem; align-self: center; }
.hoe-rpill { background: var(--hoe-primary); color: #fff; font-weight: 700; font-size: .82rem; padding: .25rem .7rem; border-radius: 7px; white-space: nowrap; }
.hoe-rpill.is-high { background: #19a463; }
.hoe-rlabel { display: none; }

/* Feature bullets: filled green circles (like HoEscape) */
.hoe-card__reasons { list-style: none; margin: .05rem 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .25rem .9rem; }
.hoe-card__reasons li { position: relative; padding-left: 1.5rem; font-size: .8rem; color: #374151; line-height: 1.4; }
.hoe-card__reasons li::before {
  content: '\2713';
  position: absolute; left: 0; top: .05em;
  width: 16px; height: 16px;
  background: #19a463; color: #fff;
  border-radius: 50%;
  font-size: .62rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  line-height: 16px; text-align: center;
}

/* Dates box */
.hoe-card__dates { display: inline-flex; align-items: center; gap: .8rem; align-self: flex-start; background: var(--hoe-light-bg); border: 1px solid #eceef1; border-radius: 10px; padding: .5rem .85rem; font-size: .85rem; color: #1f2933; }
.hoe-card__dates small { display: block; font-size: .62rem; text-transform: uppercase; color: #9ca3af; letter-spacing: .03em; margin-bottom: .1rem; }
.hoe-card__dates strong { display: block; font-size: .88rem; font-weight: 700; line-height: 1.2; }
.hoe-card__dates em { display: block; font-size: .72rem; color: #6b7280; font-style: normal; margin-top: .05rem; }
.hoe-card__dates-cal { width: 38px; height: 38px; background: #fff; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; color: var(--hoe-primary); flex-shrink: 0; }
.hoe-card__dates-arrow { color: var(--hoe-primary); font-weight: 700; font-size: 1rem; }

/* Footer: price block + CTA side by side */
.hoe-card__footer { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-top: .5rem; border-top: 1px solid #f3f4f6; }

/* Price block: [€ 910] [7 notti] on row 1, [trattamento] row 2, [pax] row 3 */
.hoe-card__price { display: flex; flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 0 .7rem; line-height: 1.25; }
.hoe-price__old { text-decoration: line-through; color: #9ca3af; font-size: .82rem; flex: 0 0 100%; }
.hoe-price__from { font-size: .72rem; color: #6b7280; }
/* Price value: large accent yellow */
.hoe-price__val { font-size: 2.6rem; font-weight: 900; color: var(--hoe-accent); flex: 0 0 auto; line-height: 1; }
.hoe-price__val--alt { font-size: 1.6rem; color: var(--hoe-primary); }
/* "7 notti" inline accanto al prezzo */
.hoe-card__nights { flex: 0 0 auto; font-size: .9rem; font-weight: 700; color: #1f2933; align-self: center; }
/* Trattamento su riga propria */
.hoe-card__treatment { flex: 0 0 100%; font-size: .8rem; color: #374151; font-weight: 500; margin-top: .1rem; }
/* Pax su riga propria */
.hoe-card__pax { flex: 0 0 100%; font-size: .76rem; color: #6b7280; display: inline-flex; align-items: center; gap: .3rem; margin-top: .1rem; }
.hoe-card__pax .bi { color: var(--hoe-primary); }
.hoe-price__unavail { font-size: .88rem; color: #9ca3af; font-weight: 600; flex: 0 0 100%; }

/* CTA: WA circle + full-width "VEDI CAMERE →" button */
.hoe-card__cta { display: flex; align-items: center; gap: .5rem; }
.hoe-wa-circle { width: 48px; height: 48px; flex: 0 0 48px; border-radius: 50%; background: #25d366 !important; color: #fff !important; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; box-shadow: 0 2px 8px rgba(37,211,102,.4); border: none !important; }
.hoe-wa-circle:hover { background: #1ebe5b !important; }
.hoe-card__cta .hoe-discover {
  flex: 1;
  background: var(--hoe-primary); color: #fff; text-decoration: none;
  font-weight: 700; font-size: .9rem; letter-spacing: .05em; text-transform: uppercase;
  padding: 1rem 1.1rem; border-radius: 10px;
  text-align: center; white-space: nowrap; display: flex; align-items: center; justify-content: center;
}
.hoe-card__cta .hoe-discover::after { content: '\00a0\00a0→'; }
.hoe-card__cta .hoe-discover:hover { background: var(--hoe-primary-dark); }

@media (max-width: 760px) {
  .hoe-card { grid-template-columns: 1fr; }
  /* Immagine quasi quadrata su mobile come HoEscape (ratio 5:4 ≈ 1.25) */
  .hoe-card__media { min-height: 0; aspect-ratio: 5/4; }
  .hoe-card__body { padding: 1rem; }
  .hoe-card__reasons { grid-template-columns: 1fr; gap: .3rem; }
  .hoe-card__name { font-size: 1.1rem; }
  /* Rating: già gestito dal grid desktop, su mobile resta sulla riga stelle */
  .hoe-card__footer { flex-direction: column; align-items: stretch; gap: .7rem; border-top-color: #eaecef; }
  .hoe-price__val { font-size: 2.1rem; }
  .hoe-card__cta { width: 100%; }
  .hoe-card__cta .hoe-discover {
    padding: 1.1rem;
    font-size: .95rem;
    border-radius: 12px !important;
  }
  /* Bottone WA più visibile su mobile */
  .hoe-wa-circle { width: 52px; height: 52px; flex: 0 0 52px; }
}

/* ── Summary bar (dark, compact, sopra i risultati) ─────────── */
.hoe-summary-bar {
  background: var(--hoe-primary);
  padding: .75rem 1rem;
  border-radius: var(--hoe-radius) var(--hoe-radius) 0 0;
  margin-bottom: 0;
}
.hoe-summary-inner { display: flex; align-items: center; gap: .75rem; }
.hoe-summary-info { flex: 1; min-width: 0; color: #fff; display: flex; flex-direction: column; gap: .2rem; }
.hoe-summary-loc { font-size: .85rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hoe-summary-loc .bi { color: rgba(255,255,255,.7); margin-right: .25rem; }
.hoe-summary-trip { font-size: .78rem; color: rgba(255,255,255,.8); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hoe-summary-change {
  flex: 0 0 auto;
  border: 1.5px solid rgba(255,255,255,.6) !important;
  background: transparent !important;
  color: #fff !important;
  border-radius: 8px !important;
  padding: .45rem .85rem !important;
  font-size: .78rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  white-space: nowrap;
}
.hoe-summary-change:hover { background: rgba(255,255,255,.15) !important; }

/* ── Tab bar (Ordina | Filtra | Mappa) ──────────────────────── */
.hoe-count-bar {
  padding: .6rem 1rem;
  font-size: .88rem;
  font-weight: 700;
  color: var(--hoe-primary);
  border-bottom: 1px solid #eaecef;
}
.hoe-tab-bar {
  display: flex;
  border-bottom: 1px solid #eaecef;
  background: #fff;
}
.hoe-tab {
  flex: 1;
  padding: .75rem .5rem;
  border: none !important;
  background: transparent !important;
  color: #374151 !important;
  font-size: .85rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: .35rem !important;
  border-bottom: 2px solid transparent !important;
  transition: color .15s, border-color .15s;
}
.hoe-tab + .hoe-tab { border-left: 1px solid #eaecef !important; }
.hoe-tab:hover { color: var(--hoe-primary) !important; }
.hoe-tab--active { color: var(--hoe-primary) !important; border-bottom-color: var(--hoe-primary) !important; }

/* Sort panel (espande sotto il tab bar) */
.hoe-sort-panel {
  padding: .75rem 1rem;
  background: #fff;
  border-bottom: 1px solid #eaecef;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.hoe-sort-opt {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .82rem;
  padding: .4rem .75rem;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  cursor: pointer;
  background: #f9fafb;
  transition: background .15s, border-color .15s;
}
.hoe-sort-opt:has(input:checked) { background: var(--hoe-primary); color: #fff; border-color: var(--hoe-primary); }

/* Filters panel mobile: overlay a schermo quando aperto */
@media (max-width: 760px) {
  .hoe-filters {
    display: none;
    position: fixed !important;
    inset: 0 !important;
    z-index: 500 !important;
    background: #fff !important;
    overflow-y: auto !important;
    padding: 1rem !important;
  }
  .hoe-search.hoe-filters-open .hoe-filters { display: block !important; }
  .hoe-search.hoe-filters-open .hoe-filters::before {
    content: 'Filtra';
    display: block;
    font-weight: 700;
    font-size: 1.1rem;
    padding-bottom: .75rem;
    border-bottom: 1px solid #eaecef;
    margin-bottom: 1rem;
  }
  /* Sticker: summary bar + tab bar restano in cima su mobile */
  .hoe-summary-bar { border-radius: 0; position: sticky; top: 0; z-index: 50; }
  .hoe-toolbar { position: sticky; top: 52px; z-index: 49; background: #fff; }
}

.hoe-empty { padding: 2.5rem 1rem; text-align: center; color: #6b7280; }
.hoe-alt-head { margin: 1.5rem 0 .75rem; font-size: .95rem; color: #6b7280; }

/* ── Map ─────────────────────────────────────────────────────── */
.hoe-map { width: 100%; height: 480px; border-radius: var(--hoe-radius); overflow: hidden; display: none; border: 1px solid #e5e7eb; }
.hoe-map.is-visible { display: block; }
.hoe-map-info { font-size: .85rem; }
.hoe-map-info strong { color: var(--hoe-primary); }

/* ── Compact form ([hoe_search_form]) ────────────────────────────
   Form-only mode: the widget IS the form (no results layout below it),
   so it carries no bottom margin and stays a single self-contained card. */
.hoe-search--formonly .hoe-form { margin-bottom: 0; }

/* ── In-search detail overlay (whitelabel scheda hotel, "solo dal cerca") ─
   Dynamic view shown on "Scopri" — never a separate URL, noindex by nature. */
.hoe-detail { position: fixed; inset: 0; z-index: 99999; display: flex; justify-content: center; align-items: flex-start; }
.hoe-detail[hidden] { display: none; }
.hoe-detail-backdrop { position: absolute; inset: 0; background: rgba(17,24,39,.55); backdrop-filter: blur(2px); }
.hoe-detail-panel {
  position: relative; background: #fff; width: min(920px, 96vw); max-height: 94vh;
  margin: 3vh 0; border-radius: 16px; overflow: auto; box-shadow: 0 24px 60px rgba(0,0,0,.3);
  -webkit-overflow-scrolling: touch;
}
body.hoe-detail-open { overflow: hidden; }
.hoe-detail-bar {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between;
  gap: .5rem; padding: .6rem .9rem; background: rgba(255,255,255,.96); border-bottom: 1px solid #eee; backdrop-filter: blur(4px);
}
.hoe-detail-back {
  border: 0; background: var(--hoe-light-bg); color: var(--hoe-primary); font-weight: 600; font-size: .9rem;
  padding: .5rem .8rem; border-radius: 9px; cursor: pointer;
}
.hoe-detail-close {
  border: 0; background: transparent; color: #6b7280; font-size: 1.6rem; line-height: 1; width: 38px; height: 38px;
  border-radius: 9px; cursor: pointer;
}
.hoe-detail-close:hover { background: var(--hoe-light-bg); }
.hoe-detail-body { padding: 0 0 1.4rem; }
.hoe-detail-hero { width: 100%; aspect-ratio: 16/9; background: var(--hoe-light-bg); overflow: hidden; }
.hoe-detail-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hoe-detail-thumbs { display: flex; gap: .4rem; padding: .6rem .9rem 0; overflow-x: auto; }
.hoe-detail-thumb { flex: 0 0 auto; width: 84px; height: 56px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; cursor: pointer; background: none; }
.hoe-detail-thumb.is-active { border-color: var(--hoe-primary); }
.hoe-detail-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hoe-detail-head { padding: 1rem .9rem 0; }
.hoe-detail-name { margin: 0 0 .2rem; font-size: 1.5rem; color: #111827; }
.hoe-detail-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: .5rem; padding: .8rem .9rem; }
.hoe-detail-price .hoe-price__val { font-size: 1.7rem; font-weight: 800; color: var(--hoe-primary); }
.hoe-detail-dates { font-size: .85rem; color: #6b7280; }
.hoe-detail-cta { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0 .9rem .4rem; }
.hoe-detail-cta a { flex: 1 1 auto; text-align: center; text-decoration: none; padding: .7rem .9rem; border-radius: 10px; font-weight: 700; font-size: .92rem; }
.hoe-detail-cta .hoe-wa { background: #25d366; color: #fff; }
.hoe-detail-cta .hoe-tel { background: var(--hoe-light-bg); color: var(--hoe-primary); border: 1px solid #e5e7eb; }
.hoe-detail-desc { padding: .6rem .9rem; color: #374151; line-height: 1.6; }
.hoe-detail-desc img { max-width: 100%; height: auto; }
.hoe-detail-h3 { margin: 1rem .9rem .4rem; font-size: 1rem; color: var(--hoe-primary); }
.hoe-detail-amen { display: flex; flex-wrap: wrap; gap: .4rem; padding: 0 .9rem; }
.hoe-detail-amen span { font-size: .82rem; background: var(--hoe-light-bg); color: #374151; padding: .3rem .65rem; border-radius: 8px; }
.hoe-detail-amen .hoe-amen { display: inline-flex; align-items: center; gap: .35rem; }
.hoe-detail-amen .hoe-amen .bi { color: var(--hoe-primary); }
/* booking summary in the detail overlay (treatment / guests / package) */
.hoe-detail-summary { list-style: none; margin: .2rem .9rem .4rem; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem .7rem; }
.hoe-detail-summary li { display: inline-flex; align-items: center; gap: .4rem; font-size: .9rem; color: #1f2933; background: var(--hoe-light-bg); border: 1px solid #eceef1; border-radius: 9px; padding: .4rem .7rem; }
.hoe-detail-summary .bi { color: var(--hoe-primary); }
.hoe-detail-map { height: 320px; margin: .2rem .9rem 0; border-radius: 12px; overflow: hidden; border: 1px solid #e5e7eb; }
@media (max-width: 600px) {
  .hoe-detail-panel { width: 100vw; max-height: 100vh; margin: 0; border-radius: 0; }
  .hoe-detail-name { font-size: 1.25rem; }
}

/* ── Standalone hotel block ([hoe_hotel]) ────────────────────────
   Same detail content as the overlay, but rendered inline as a real page
   section for custom per-hotel pages. Carries its own whitelabel vars. */
.hoe-hotel {
  --hoe-primary: #1e3c72; --hoe-primary-dark: #152a4f; --hoe-secondary: #2a5298;
  --hoe-accent: #f5a623; --hoe-accent-hover: #e09000; --hoe-light-bg: #f8f9fa; --hoe-radius: 14px;
  display: block; max-width: 960px; margin: 0 auto; color: #1f2933;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.hoe-hotel *, .hoe-hotel *::before, .hoe-hotel *::after { box-sizing: border-box; }
.hoe-hotel .hoe-detail-hero { border-radius: var(--hoe-radius); }
.hoe-hotel .hoe-detail-head { padding-left: 0; padding-right: 0; }
.hoe-hotel .hoe-detail-price, .hoe-hotel .hoe-detail-cta,
.hoe-hotel .hoe-detail-desc, .hoe-hotel .hoe-detail-amen,
.hoe-hotel .hoe-detail-h3, .hoe-hotel .hoe-detail-thumbs { padding-left: 0; padding-right: 0; }
.hoe-hotel .hoe-detail-map { margin-left: 0; margin-right: 0; }

/* ── Guest selector dropdown ─────────────────────────────────── */
.hoe-f-guests { position: relative; flex: 1 1 180px; }
.hoe-guests-trigger {
  width: 100%; height: 44px; text-align: left; padding: 0 .7rem;
  font-size: .95rem; cursor: pointer;
  display: flex; align-items: center; white-space: nowrap; overflow: hidden;
  -webkit-appearance: none; appearance: none;
}
.hoe-guests-trigger::before { content: '\1F465'; margin-right: .45rem; opacity: .7; }
.hoe-guest-dropdown {
  position: absolute; top: calc(100% + 4px); left: 0;
  background: #fff; border: 1px solid #e5e7eb; border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,.10); padding: 16px;
  min-width: 280px; z-index: 100;
}
.hoe-guest-dropdown[hidden] { display: none; }
.hoe-guest-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid #f3f4f6;
}
.hoe-guest-row:last-child,
.hoe-guest-foot { border-bottom: none; }
.hoe-guest-row small { color: #9ca3af; font-size: .78rem; }
.hoe-counter { display: flex; align-items: center; gap: 14px; }
.hoe-cnt-minus,
.hoe-cnt-plus {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; line-height: 1; cursor: pointer;
}
.hoe-cnt-minus:disabled,
.hoe-cnt-plus:disabled { opacity: .35; cursor: default; }
.hoe-cnt-val { min-width: 20px; text-align: center; font-weight: 600; font-size: .95rem; }
.hoe-ages-wrap { padding-top: 8px; display: flex; flex-wrap: wrap; gap: 8px; }
.hoe-ages-wrap:empty { padding: 0; }
.hoe-age-sel {
  flex: 1 1 calc(50% - 4px); min-width: 120px;
  height: 38px; padding: 0 .5rem;
  border: 1px solid #d1d5db; border-radius: 8px;
  font-size: .85rem; background: #fff; color: #1f2933;
}
.hoe-guest-pets label { display: flex; align-items: center; gap: .5rem; cursor: pointer; font-size: .9rem; }
.hoe-guest-pets input[type="checkbox"] { accent-color: var(--hoe-primary); width: 16px; height: 16px; }
.hoe-guest-foot { padding-top: 14px; text-align: right; }
.hoe-guest-foot .hoe-btn { height: 38px; padding: 0 1.1rem; font-size: .9rem; }

/* ── Loading overlay (shown before redirect to results page) ──── */
#hoe-search-loading {
  position: fixed; inset: 0; z-index: 99999;
  background: linear-gradient(135deg, #1e3c72, #2a5298);
  display: flex; align-items: center; justify-content: center;
}
.hoe-loading-inner { text-align: center; color: #fff; padding: 40px; }
.hoe-loading-logo { max-height: 60px; margin-bottom: 32px; filter: brightness(0) invert(1); display: block; margin-left: auto; margin-right: auto; }
.hoe-loading-dots { display: flex; justify-content: center; gap: 12px; margin: 0 auto; }
.hoe-loading-dots span {
  width: 14px; height: 14px; background: #f5a623;
  border-radius: 50%; display: inline-block;
  animation: hoeLoadBounce 1.4s ease infinite;
}
.hoe-loading-dots span:nth-child(2) { animation-delay: .2s; }
.hoe-loading-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes hoeLoadBounce {
  0%, 80%, 100% { transform: translateY(0); }
  40%           { transform: translateY(-20px); }
}
.hoe-loading-msg { margin-top: 24px; font-size: 1rem; opacity: .9; line-height: 1.4; }

/* ── Mobile-first: form in colonna + guest bottom sheet ─────── */
@media (max-width: 600px) {
  .hoe-search .hoe-form {
    flex-direction: column;
    align-items: stretch; /* reset align-items:flex-end del base */
    gap: .5rem;
    padding: .75rem;
  }
  /* Override inline style="flex:0 0 90px" and any field flex-basis */
  .hoe-search .hoe-field {
    flex: 1 1 100% !important;
    min-width: 0;
    width: 100%;
  }
  .hoe-search .hoe-f-loc select,
  .hoe-search .hoe-dates-trigger,
  .hoe-search .hoe-guests-trigger {
    width: 100%;
  }
  /* Forza testo visibile nel select (Elementor può imporre color:white) */
  .hoe-search .hoe-f-loc select {
    color: #1f2933 !important;
    background: #fff !important;
  }
  .hoe-search .hoe-form .hoe-btn[type="submit"],
  .hoe-search .hoe-form button[type="submit"] {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
    margin-top: 4px;
    height: auto;
  }
  /* Guest dropdown → bottom sheet */
  .hoe-search .hoe-guest-dropdown {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    border-radius: 16px 16px 0 0 !important;
    max-height: 70vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
    box-shadow: 0 -4px 24px rgba(0,0,0,.18) !important;
    z-index: 1000 !important;
  }
  /* Backdrop behind bottom sheet */
  .hoe-search.hoe-guest-open::before {
    content: '';
    position: fixed; inset: 0;
    background: rgba(0,0,0,.4);
    z-index: 999;
  }
  /* Calendario fullscreen su mobile (come offerte.hoescape.com) */
  .hoe-search .hoe-cal[hidden] { display: none !important; }
  @keyframes hoeCalIn {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  .hoe-search .hoe-cal {
    position: fixed !important;
    inset: 0 !important;
    border-radius: 0 !important;
    max-height: 100vh !important;
    max-height: 100dvh !important;
    overflow-y: hidden !important;
    padding: 0 !important;
    z-index: 1000 !important;
    display: flex !important;
    flex-direction: column !important;
    animation: hoeCalIn .22s ease-out;
  }
  /* Nascondi frecce prev/next (navigazione → scroll verticale) */
  .hoe-search .hoe-cal-head { display: none !important; }
  /* Header blu con titolo + pulsante × */
  .hoe-search .hoe-cal-header-bar {
    display: flex !important;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    background: #1e3c72;
    color: #fff;
    padding: 14px 16px;
  }
  .hoe-search .hoe-cal-title-bar {
    font-size: .9rem;
    font-weight: 600;
    color: #fff;
    flex: 1;
  }
  .hoe-search .hoe-cal-close {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    color: #fff !important;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    padding: 4px 0 4px 12px;
    height: auto;
    border-radius: 0 !important;
  }
  /* Riga giorni settimana sticky (fuori dai mesi → non si ripete) */
  .hoe-search .hoe-cal-dow-bar {
    display: grid !important;
    grid-template-columns: repeat(7, 1fr);
    flex: 0 0 auto;
    padding: 7px 16px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
  }
  .hoe-search .hoe-cal-dow-bar span {
    text-align: center;
    font-size: .68rem;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: .02em;
  }
  /* Nascondi DOW dentro ogni mese (sostituito dalla bar sticky) */
  .hoe-search .hoe-cal-dow { display: none !important; }
  /* Area mesi scrollabile in colonna */
  .hoe-search .hoe-cal-months {
    flex: 1 !important;
    min-height: 0;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    flex-direction: column !important;
    padding: 0 !important;
    gap: 0 !important;
  }
  .hoe-search .hoe-cal-month {
    padding: 16px 12px 8px;
    border-bottom: 1px solid #f0f0f0;
  }
  .hoe-search .hoe-cal-title {
    margin-bottom: .5rem;
    font-size: 1rem;
  }
  /* Giorni: cerchio centrato nella cella (non ovale) */
  .hoe-search .hoe-cal-day {
    width: 36px !important;
    height: 36px !important;
    justify-self: center;
    align-self: center;
    border-radius: 50% !important;
  }
  /* Griglia con celle quadrate centrate */
  .hoe-search .hoe-cal-grid {
    gap: 4px 0 !important;
  }
  /* Footer "Continuare" full-width fisso in fondo */
  .hoe-search .hoe-cal-foot {
    flex: 0 0 auto;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    padding: 10px 16px;
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 10px);
    display: flex !important;
    flex-direction: column;
    gap: 8px;
    margin-top: 0;
    box-shadow: 0 -2px 12px rgba(0,0,0,.06);
  }
  .hoe-search .hoe-cal-foot .hoe-cal-info {
    font-size: .82rem;
    text-align: center;
    color: #6b7280;
  }
  .hoe-search .hoe-cal-foot .hoe-cal-confirm {
    width: 100% !important;
    height: 52px;
    font-size: 1rem;
    font-weight: 700;
    padding: 0;
    letter-spacing: .06em;
    text-transform: uppercase;
    border-radius: 12px !important;
    transition: opacity .15s, background .15s;
  }
  .hoe-search .hoe-cal-foot .hoe-cal-confirm:disabled {
    opacity: 0.45 !important;
    cursor: default;
  }
}

/* ── Layout risultati: filtri DOPO i risultati su mobile ─────── */
@media (max-width: 860px) {
  .hoe-layout {
    display: flex !important;
    flex-direction: column;
  }
  .hoe-results { order: 1; }
  .hoe-filters { order: 2; }
}
