/* Buscador Airbnb v2 — pill + pickers */

.abnb-pill-v2 {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 9999px;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 6px 20px rgba(0, 0, 0, 0.06);
  padding: 8px 8px 8px 0;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.abnb-pill-v2:hover,
.abnb-pill-v2:focus-within {
  border-color: #d4d4d4;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.06),
    0 12px 32px rgba(0, 0, 0, 0.08);
}

.abnb-pill-seg {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 14px 24px;
  border: none;
  background: transparent;
  border-radius: 9999px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: background 0.15s ease;
}

.abnb-pill-seg:hover,
.abnb-pill-seg[aria-expanded="true"] {
  background: var(--brand-soft, #f3faf5);
}

.abnb-pill-seg[aria-expanded="true"] .abnb-pill-kicker {
  color: var(--brand-dark, #358f51);
}

.abnb-pill-seg--where { flex: 1.35 1 0; }
.abnb-pill-seg--dates { flex: 1.2 1 0; }
.abnb-pill-seg--guests { flex: 1 1 0; min-width: 100px; }

.abnb-pill-v2--hero {
  border-radius: 9999px;
}

.abnb-pill-v2--hero .abnb-pill-seg {
  padding: 12px 20px;
}

.abnb-pill-v2--hero .abnb-pill-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #222;
}

.abnb-pill-v2--hero .abnb-pill-value {
  font-size: 14px;
  font-weight: 500;
  color: #717171;
}

.abnb-pill-v2--hero .abnb-pill-submit {
  min-width: auto;
  padding: 0 22px;
}

.abnb-pill-submit-label {
  display: inline;
}

.abnb-dest-suggestions {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #ebebeb;
}

.abnb-dest-suggestions__title {
  margin: 0 0 0.75rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #717171;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.abnb-dest-suggestions__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

@media (min-width: 640px) {
  .abnb-dest-suggestions__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.abnb-dest-suggestion {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  padding: 0.85rem 1rem;
  border: 1px solid #ebebeb;
  border-radius: 12px;
  background: #fafafa;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: border-color 0.15s, background 0.15s;
}

.abnb-dest-suggestion:hover {
  border-color: var(--brand-muted);
  background: var(--brand-soft);
}

.abnb-dest-suggestion__name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #222;
}

.abnb-dest-suggestion__meta {
  font-size: 0.75rem;
  color: #717171;
}

.abnb-pill-kicker {
  font-size: 12px;
  font-weight: 600;
  color: #222;
  line-height: 1.2;
}

.abnb-pill-value {
  font-size: 14px;
  color: #717171;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  line-height: 1.3;
}

.abnb-pill-divider {
  width: 1px;
  height: 32px;
  background: #dddddd;
  flex-shrink: 0;
}

.abnb-pill-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-shrink: 0;
  height: 48px;
  min-width: 48px;
  margin-left: 4px;
  padding: 0 18px;
  border: none;
  border-radius: 9999px;
  background: linear-gradient(to right, var(--brand) 0%, var(--brand) 50%, var(--brand-dark) 100%);
  color: #fff;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.abnb-pill-submit:hover {
  filter: brightness(1.06);
  transform: scale(1.02);
}

.abnb-pill-submit svg {
  width: 16px;
  height: 16px;
}

.abnb-search--map .abnb-pill-v2,
.abnb-search--compact .abnb-pill-v2 {
  border-radius: 9999px;
  padding: 6px 6px 6px 0;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
}

.abnb-search--compact .abnb-pill-seg {
  padding: 12px 20px;
}

.abnb-search--compact .abnb-pill-kicker {
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #525252;
}

.abnb-search--compact .abnb-pill-value {
  font-size: 14px;
  font-weight: 500;
  color: #171717;
}

.abnb-search--compact .abnb-pill-submit {
  height: 48px;
  min-width: 48px;
  margin-left: 6px;
}

.abnb-search--map .abnb-pill-submit span,
.abnb-search--compact .abnb-pill-submit span {
  display: none;
}

.abnb-search--map .abnb-search-meta {
  margin-top: 8px;
}

.abnb-search--map .abnb-map-link {
  border: 1px solid #e5e5e5;
  background: #fff;
  color: #222;
  padding: 6px 12px;
  font-size: 13px;
}

.abnb-picker-layer {
  position: fixed;
  inset: 0;
  z-index: 10050;
}

.abnb-picker-layer[hidden] {
  display: none !important;
}

.abnb-picker-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}

.abnb-picker-panel {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(420px, calc(100vw - 32px));
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.abnb-picker-panel--wide {
  width: min(380px, calc(100vw - 24px));
}

.abnb-picker-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #ebebeb;
}

.abnb-picker-panel-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.abnb-picker-close {
  width: 32px;
  height: 32px;
  border: none;
  background: #f7f7f7;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: #222;
}

.abnb-picker-where-input {
  display: block;
  padding: 16px 20px 20px;
}

.abnb-picker-where-input .abnb-field-input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #b0b0b0;
  border-radius: 12px;
  font-size: 16px;
  font-family: inherit;
}

.abnb-date-cal { padding: 12px 16px 0; }

.abnb-date-cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.abnb-date-cal-nav {
  width: 32px;
  height: 32px;
  border: 1px solid #ddd;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  font-size: 18px;
}

.abnb-date-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 4px;
}

.abnb-date-weekdays span {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: #717171;
}

.abnb-date-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.abnb-date-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
}

.abnb-date-day.is-disabled { color: #ddd; cursor: not-allowed; }
.abnb-date-day.is-start,
.abnb-date-day.is-end { background: #222; color: #fff; }
.abnb-date-day.is-in-range { background: #f7f7f7; border-radius: 0; }

.abnb-date-cal-foot,
.abnb-picker-panel-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px 18px;
  border-top: 1px solid #ebebeb;
  margin-top: 12px;
}

.abnb-date-clear {
  border: none;
  background: none;
  font-size: 14px;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
  font-family: inherit;
}

.abnb-date-done {
  padding: 10px 18px;
  border: none;
  border-radius: 8px;
  background: #222;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.abnb-guest-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid #f0f0f0;
}

.abnb-guest-row > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.abnb-guest-row strong {
  display: block;
  font-size: 15px;
  line-height: 1.3;
}

.abnb-guest-row small {
  display: block;
  font-size: 13px;
  color: #717171;
  line-height: 1.35;
}

.abnb-guest-counter {
  display: flex;
  align-items: center;
  gap: 12px;
}

.abnb-guest-counter button {
  width: 32px;
  height: 32px;
  border: 1px solid #b0b0b0;
  border-radius: 50%;
  background: #fff;
  font-size: 18px;
  cursor: pointer;
}

.abnb-guest-counter button:disabled { opacity: 0.35; }

.abnb-guest-counter [data-count-value] {
  min-width: 1.25rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-size: 15px;
  font-weight: 500;
}

/* Filtros modal v2 */
.abnb-filters-section {
  padding: 20px 0;
  border-bottom: 1px solid #ebebeb;
}

.abnb-filters-section-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 12px;
}

.abnb-filters-section-hint {
  font-size: 13px;
  color: #717171;
  margin: -8px 0 12px;
}

.abnb-filters-grid--2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.abnb-filter-toggle {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}

.abnb-filter-toggle input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: #222;
}

.abnb-filter-toggle strong { display: block; font-size: 15px; }
.abnb-filter-toggle small { display: block; font-size: 13px; color: #717171; }

.abnb-filters-amenities {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.abnb-filters-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 20px;
  position: sticky;
  bottom: 0;
  background: #fff;
}

/* —— Mobile search pill (Airbnb / Holidu) —— */
.abnb-mobile-pill,
.abnb-mobile-search-backdrop {
  display: none;
}

@media (max-width: 767px) {
  .abnb-mobile-pill {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e5e5e5;
    border-radius: 9999px;
    background: #fff;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    font-family: inherit;
    text-align: left;
  }

  .abnb-mobile-pill__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 9999px;
    background: linear-gradient(to right, var(--brand), var(--brand-dark));
    color: #fff;
    flex-shrink: 0;
  }

  .abnb-mobile-pill__icon svg {
    width: 18px;
    height: 18px;
  }

  .abnb-mobile-pill__body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
  }

  .abnb-mobile-pill__title {
    font-size: 14px;
    font-weight: 600;
    color: #222;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .abnb-mobile-pill__sub {
    font-size: 13px;
    color: #717171;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .abnb-search--compact .abnb-pill-v2,
  .abnb-search--map .abnb-pill-v2 {
    display: none;
  }

  .abnb-search--compact.is-mobile-open .abnb-mobile-pill,
  .abnb-search--map.is-mobile-open .abnb-mobile-pill {
    display: none;
  }

  .abnb-search--compact.is-mobile-open .abnb-mobile-search-backdrop,
  .abnb-search--map.is-mobile-open .abnb-mobile-search-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 10060;
    background: rgba(0, 0, 0, 0.45);
  }

  .abnb-search--compact.is-mobile-open .abnb-pill-v2,
  .abnb-search--map.is-mobile-open .abnb-pill-v2 {
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10065;
    border-radius: 16px 16px 0 0;
    padding: 12px 12px calc(12px + env(safe-area-inset-bottom, 0px));
    max-height: 85vh;
    overflow-y: auto;
    animation: abnb-mobile-pill-in 0.28s ease;
  }

  @keyframes abnb-mobile-pill-in {
    from { transform: translateY(100%); opacity: 0.8; }
    to { transform: translateY(0); opacity: 1; }
  }

  .abnb-search--compact.is-mobile-open .abnb-pill-divider,
  .abnb-search--map.is-mobile-open .abnb-pill-divider {
    display: none;
  }

  .abnb-search--compact.is-mobile-open .abnb-pill-seg,
  .abnb-search--map.is-mobile-open .abnb-pill-seg {
    width: 100%;
    border-radius: 12px;
    padding: 14px 16px;
  }

  .abnb-search--compact.is-mobile-open .abnb-pill-submit,
  .abnb-search--map.is-mobile-open .abnb-pill-submit {
    width: 100%;
    margin: 8px 0 0;
    height: 48px;
    border-radius: 12px;
  }

  .abnb-picker-panel {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    transform: none;
    width: 100%;
    max-width: none;
    border-radius: 16px 16px 0 0;
    max-height: min(90vh, 720px);
    animation: abnb-mobile-pill-in 0.25s ease;
  }

  .abnb-picker-panel--wide {
    width: 100%;
  }

  .abnb-picker-backdrop {
    background: rgba(0, 0, 0, 0.45);
  }

  .map-search-bar .abnb-pill-v2 {
    overflow-x: visible;
  }

  .map-search-bar .abnb-pill-seg {
    min-width: 0;
    max-width: none;
    flex: 1 1 auto;
  }
}

/* Mapa: pill en panel — fila única legible */
.map-search-bar .abnb-search--map {
  width: 100%;
}

.map-search-bar .abnb-pill-v2 {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  border-radius: 16px;
  padding: 4px 4px 4px 0;
  overflow: visible;
}

@media (max-width: 767px) {
  .map-search-bar .abnb-search--map .abnb-pill-v2 {
    display: none;
  }

  .map-search-bar .abnb-search--map.is-mobile-open .abnb-pill-v2 {
    display: flex;
  }
}

.map-search-bar .abnb-pill-seg {
  flex: 1 1 0;
  min-width: 0;
  max-width: none;
  padding: 10px 12px;
}

.map-search-bar .abnb-pill-seg--where { flex: 1.15 1 0; }
.map-search-bar .abnb-pill-seg--dates { flex: 1.05 1 0; }
.map-search-bar .abnb-pill-seg--guests { flex: 0.85 1 0; }

.map-search-bar .abnb-pill-kicker {
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.map-search-bar .abnb-pill-value {
  font-size: 13px;
  font-weight: 500;
  color: #171717;
}

.map-search-bar .abnb-pill-divider {
  height: 28px;
  flex-shrink: 0;
}

.map-search-bar .abnb-pill-submit {
  flex: 0 0 auto;
  height: 40px;
  min-width: 40px;
  margin: 0 4px 0 0;
}

.map-search-bar .abnb-search-meta {
  margin-top: 8px;
  padding: 0 2px;
}

.map-search-bar .abnb-filters-trigger {
  padding: 6px 12px;
  font-size: 13px;
  border: 1px solid #e5e5e5;
  border-radius: 9999px;
  background: #fff;
}

@media (max-width: 520px) {
  .map-search-bar .abnb-mobile-pill {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  }
}

body.search-sheet-open {
  overflow: hidden;
}
