/* Import Playfair Display and scope to our module */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&display=swap');
.hl-container, .hl-container * { font-family: 'Playfair Display', serif; }

/* Container */
.hl-container { max-width: 1100px; margin: 24px auto; padding: 20px; }
@media (max-width: 480px){ .hl-container { padding: 16px; } }

/* Title — centered, responsive, with gap before filters */
.hl-title { text-align: center; margin: 0px; font-size: clamp(1.5rem, 2.5vw + 1rem, 2.2rem); line-height: 1.2; }
.hl-title + .hl-bar { margin-top: 36px; }

/* FILTER BAR: desktop one-row, tablet two-cols, mobile stacked */
.hl-bar {
  display: grid;
  grid-template-columns: minmax(320px, 1.2fr) minmax(180px, 0.7fr) auto minmax(170px, 0.6fr) auto auto auto;
  gap: 10px 14px;
  align-items: center;
}
@media (max-width: 1100px) {
  .hl-bar { grid-template-columns: minmax(280px, 1fr) minmax(170px, 0.8fr) auto minmax(160px, 0.7fr) auto auto auto; }
}
@media (max-width: 980px) {
  .hl-bar { grid-template-columns: 1fr 1fr; gap: 12px; }
}
@media (max-width: 560px) {
  .hl-bar { grid-template-columns: 1fr; gap: 12px; }
}

/* Field wrapper: INLINE label + control on desktop; stacked on small screens */
.hl-field {
  display: inline-flex;
  flex-direction: row;             /* inline label + control */
  align-items: center;
  gap: 10px;
}
@media (max-width: 560px) {
  .hl-field { flex-direction: column; align-items: stretch; gap: 6px; }
}

/* Labels smaller and inline */
.hl-field label {
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  margin: 0; padding: 0;
}

/* Inputs */
.hl-field input#destination {
  padding: 10px 12px; border: 1px solid #ddd; border-radius: 10px; width: 100%;
  min-width: 320px;
}
@media (max-width: 980px){ .hl-field input#destination { min-width: 0; } }

.hl-field select#vibe,
.hl-field select#hl-sort {
  padding: 10px 12px; border: 1px solid #ddd; border-radius: 10px; width: 100%;
  min-width: 160px;
}

/* Results counter (inline with its label) */
.hl-count-wrap { display: inline-flex; align-items: center; gap: 8px; }
.hl-count-label { color: #666; font-size: 0.95rem; white-space: nowrap; }
.hl-count {
  display: inline-block; min-width: 36px; text-align: center;
  padding: 6px 12px; border-radius: 999px; background: #f2f4f7; border: 1px solid #e5e7eb;
}

/* Filters trigger: SMALL TEXT LINK, opens amenities dropdown */
.hl-filters { align-self: center; }
.hl-amenities-dropdown { position: relative; }

/* Make summary look like a text link (not a button) */
.hl-amenities-dropdown > summary {
  cursor: pointer; list-style: none; user-select: none;
  padding: 0; border: 0; background: transparent;
  font-weight: 600; font-size: 0.95rem; white-space: nowrap;
  color: #2b2b2b; text-decoration: underline;
}
.hl-amenities-dropdown > summary::-webkit-details-marker { display: none; }
.hl-amenities-dropdown[open] > summary { text-decoration: none; }

/* The dropdown panel */
.hl-amenities-box {
  position: absolute; top: calc(100% + 6px); left: 0;
  z-index: 20;
  border: 1px solid #e5e5e5; border-radius: 12px;
  padding: 12px; background: #fff;
  max-width: min(720px, 92vw);
  max-height: 60vh; overflow: auto;
  box-shadow: 0 10px 24px rgba(0,0,0,0.08);
}
@media (max-width: 560px){
  .hl-amenities-box {
    position: fixed; top: 12vh; left: 50%; transform: translateX(-50%);
    width: 94vw; max-width: 680px; max-height: 76vh; overflow: auto;
  }
}
.hl-amenities-grid { display: grid; grid-template-columns: repeat(4, minmax(140px, 1fr)); gap: 10px 12px; }
@media (max-width: 900px) { .hl-amenities-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 620px) { .hl-amenities-grid { grid-template-columns: repeat(2, 1fr); } }
.hl-amenity-option { display: flex; align-items: center; gap: 8px; font-size: 0.95rem; }

/* Clear chip */
.hl-clear-chip {
  align-self: center;
  border: 1px solid #d0d0d0; background: #fff; color: #333;
  padding: 10px 12px; border-radius: 999px; cursor: pointer; font-size: 0.95rem;
}
.hl-clear-chip:hover { background: #f6f7f9; }

/* Autocomplete menu */
.ui-autocomplete {
  position: absolute; z-index: 10000;
  background: #ffffff; color: #222;
  border: 1px solid #ccc; border-radius: 10px;
  max-height: 240px; overflow-y: auto;
  box-shadow: 0 8px 16px rgba(0,0,0,0.08); padding: 6px 0;
}
.ui-menu-item-wrapper { padding: 10px 14px; cursor: pointer; }
.ui-menu-item-wrapper.ui-state-active, .ui-menu-item-wrapper:hover { background: #f2f6ff; }

/* Separator */
.hl-separator { height: 1px; background: #eaeaea; margin: 16px 0 12px; }

/* Breadcrumb */
.hl-breadcrumb { font-size: 1rem; color: #666; margin-bottom: 12px; }

/* Grid: 3 → 2 → 1 per row */
.hl-listings-grid {
  display: grid; gap: 20px; margin-top: 10px;
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 900px) { .hl-listings-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .hl-listings-grid { grid-template-columns: 1fr; } }

/* Card — #FAF7F2 background */
.hl-card {
  background: #FAF7F2; border: 1px solid #eaeaea; border-radius: 12px; overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease; cursor: pointer;
}
.hl-card:hover { transform: translateY(-4px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }

/* Image area */
.hl-card-image { position: relative; width: 100%; aspect-ratio: 16 / 10; background: #f2f2f2; }
.hl-card-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }

/* Content */
.hl-card-content { padding: 14px; }
.hl-card-title { margin: 0 0 8px; font-size: 1.08rem; font-weight: 700; color: #222; }
.hl-card-stats { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: 0.95rem; color: #444; margin-bottom: 10px; }

/* Amenities pills */
.hl-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.hl-badge {
  font-size: 0.95rem; line-height: 1.2;
  background: #f6f7f9; color: #333;
  border: 1px solid #e2e6ea; padding: 6px 10px; border-radius: 999px; white-space: nowrap;
}

/* Description */
.hl-card-excerpt { font-size: 1rem; color: #585858; margin: 2px 0 14px; }

/* Footer */
.hl-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; }
.hl-price { font-size: 1rem; color: #222; }

/* Button */
.hl-btn {
  display: inline-block; text-decoration: none; font-size: 0.95rem;
  padding: 10px 14px; border-radius: 8px;
  background: #ffffff; color: #2b2b2b; border: 2px solid #413C3C;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.hl-btn:hover { background: #413C3C; color: #fff; box-shadow: 0 4px 10px rgba(0,0,0,0.08); transform: translateY(-1px); }

/* Pagination */
.hl-pagination { display: flex; gap: 8px; align-items: center; justify-content: center; margin: 20px 0 10px; flex-wrap: wrap; }
.hl-pagination .hl-page-link {
  display: inline-block; padding: 10px 14px; border: 1px solid #ddd; border-radius: 10px; text-decoration: none; color: #333; background: #fff;
}
.hl-pagination .hl-page-link:hover { background: #f6f7f9; }
.hl-pagination .hl-page-link.current { background: #413C3C; border-color: #413C3C; color: #fff; cursor: default; }
.hl-pagination .hl-page-link.disabled { opacity: 0.5; cursor: not-allowed; }

/* No results */
.hl-no-results { background: #fff8f3; border: 1px solid #ffd9c2; padding: 12px; border-radius: 8px; }

/* --- Anti-overlap for filter bar --- */
.hl-bar {
  display: flex;              /* switch to flex for graceful wrapping */
  flex-wrap: wrap;            /* when space runs out, go to a new line */
  gap: 10px 14px;
  align-items: center;
}

/* Make each piece shrink sensibly and wrap when needed */
.hl-field,
.hl-count-wrap,
.hl-filters,
.hl-clear-chip {
  flex: 0 1 auto;             /* allow shrinking; no forced overflow */
}

/* Inputs: allow shrink, but keep sensible minimums */
.hl-field input#destination {
  flex: 1 1 260px;            /* can grow, can shrink, prefers ~260px */
  min-width: 220px;           /* won’t get so small it collides with label */
}

.hl-field select#vibe,
.hl-field select#hl-sort {
  flex: 0 1 170px;
  min-width: 150px;
}

/* Keep labels from squeezing into the controls */
.hl-field label {
  white-space: nowrap;
}

/* On large screens, keep the one-line look if there’s room */
@media (min-width: 1200px) {
  .hl-bar { flex-wrap: nowrap; }
}

/* --- Make amenities dropdown a simple vertical list --- */
.hl-amenities-box {
  max-width: 100%;      /* don't force wide box */
  width: 260px;         /* set a comfortable width */
}

.hl-amenities-grid {
  display: flex;        /* switch from grid to flex */
  flex-direction: column;
  gap: 8px;
}

.hl-amenity-option {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
}

/* --- Card: force one-line sections with ellipsis --- */

/* Title, stats line, badges row, and excerpt: single line + ellipsis */
.hl-card-title,
.hl-card-stats,
.hl-badges,
.hl-card-excerpt {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Stats: prevent wrapping between items */
.hl-card-stats {
  display: flex;
  flex-wrap: nowrap;   /* stay on one line */
  gap: 8px 14px;       /* keep your existing spacing */
  min-width: 0;        /* allow shrinking inside flex parents */
}

/* Badges: keep on one line; prepare for a faux-ellipsis overlay */
.hl-badges {
  display: block;      /* works better for overflow handling */
  position: relative;
  padding-right: 16px; /* room for the overlay ellipsis */
  min-width: 0;
}

/* Each badge must not wrap internally */
.hl-badge { white-space: nowrap; }

/* Excerpt: single line with ellipsis (uniform length visually) */
.hl-card-excerpt {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* When JS detects truncation, show a subtle "…" overlay on the right */
.hl-badges.is-truncated::after {
  content: '…';
  position: absolute;
  right: 6px;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  padding-left: 6px;
  /* fade to the card background (#FAF7F2) so the cut is soft */
  background: linear-gradient(to right, rgba(250,247,242,0), #FAF7F2 60%);
  pointer-events: none;
}

/* jQuery UI Autocomplete: border cue instead of blue highlight */
.ui-autocomplete { padding: 6px; }

.ui-menu-item-wrapper {
  padding: 8px 10px;
  border: 1px solid transparent;    /* default: no border visible */
  border-radius: 6px;
  color: #2b2b2b;                    /* keep text colour consistent */
}

/* Hover/active/focus states: show thin black border, no background */
.ui-menu-item-wrapper:hover,
.ui-menu-item-wrapper.ui-state-active,
.ui-menu-item-wrapper.ui-state-hover,
.ui-menu-item-wrapper.ui-state-focus,
.ui-autocomplete .ui-state-active {
  background: transparent !important;
  border-color: #000 !important;     /* thin black border */
  color: #2b2b2b !important;         /* keep text same colour */
  outline: none !important;
  box-shadow: none !important;
}

/* Mobile: compact destination / vibe / sort */
@media (max-width: 560px) {
  /* Tighter layout spacing */
  .hl-bar { gap: 6px; }

  /* Keep label + control on one row to reduce height */
  .hl-field {
    flex-direction: row !important;
    align-items: center !important;
    gap: 6px !important;
  }

  /* Smaller labels */
  .hl-field label { font-size: 0.9rem; }

  /* Inputs/selects: smaller height, keep 16px font to avoid iOS zoom */
  .hl-field input#destination,
  .hl-field select#vibe,
  .hl-field select#hl-sort {
    padding: 4px 10px !important;
    height: 32px !important;
    line-height: 22px !important;
    font-size: 16px !important;    /* prevents iOS zoom on focus */
    border-radius: 6px !important;
    min-width: 0 !important;       /* don't force wide widths */
    width: 100% !important;
  }
}

/* Mobile: anchor amenities dropdown to the trigger, not full-screen */
@media (max-width: 560px) {
  .hl-amenities-box {
    position: absolute !important;
    top: calc(100% + 6px) !important;
    left: 0 !important;
    right: auto !important;
    transform: none !important;
    width: min(92vw, 320px) !important;  /* narrow enough to stay on screen */
    max-height: 60vh !important;
    overflow: auto !important;
  }
}

/* Map container */
.hl-map {
  height: 520px;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  overflow: hidden;
  margin: 14px 0 0;
  background: #f7f7f7;
}
@media (max-width: 560px) {
  .hl-map { height: 360px; }
}

/* Active state for the Map button */
.hl-view-switch { justify-self: end; }
.hl-view-btn.active {
  background: #413C3C;
  color: #fff;
  border-color: #413C3C;
}

/* --- Single Listing: theme-friendly container --- */
.entry-content .hl-single { max-width: none; margin: 0; padding: 0; } /* let theme set the width */
.hl-hero { border-radius: 16px; overflow: hidden; background: #f0f0f0; }
.hl-hero-img { width: 100%; height: auto; display: block; }

.hl-single-header { margin-top: 16px; }
.hl-single-title { font-size: clamp(1.8rem, 2.6vw + 1rem, 2.4rem); margin: 0 0 10px; color: #4B2E2A; }
.hl-single-lede { font-size: 1.05rem; color: #585858; margin: 10px 0 0; }

.hl-single-facts { list-style: none; padding: 0; margin: 10px 0 12px; display: flex; gap: 12px 18px; flex-wrap: wrap; color: #333; }
.hl-single-facts li strong { color: #4B2E2A; }

.hl-single-badges { margin: 8px 0 0; white-space: normal; }
.hl-single-badges .hl-badge { margin: 0 8px 8px 0; display: inline-block; }

.hl-single-body { display: grid; grid-template-columns: 1.5fr 0.9fr; gap: clamp(16px, 2vw, 22px); margin-top: 18px; }
@media (max-width: 900px){ .hl-single-body { grid-template-columns: 1fr; } }

.hl-single-content { background: #FAF7F2; border: 1px solid #eee; border-radius: 12px; padding: 16px; }
.hl-single-content p { line-height: 1.6; }

.hl-gallery { margin-top: 14px; display: grid; gap: 10px; grid-template-columns: repeat(3, 1fr); }
.hl-gallery-item img { width: 100%; height: auto; display: block; border-radius: 8px; }
@media (max-width: 700px){ .hl-gallery { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px){ .hl-gallery { grid-template-columns: 1fr; } }

.hl-single-aside { display: grid; gap: 14px; }
.hl-aside-card { background: #FAF7F2; border: 1px solid #e5e5e5; border-radius: 12px; padding: 14px; }
.hl-aside-title { margin: 0 0 8px; font-size: 1.05rem; color: #4B2E2A; }
.hl-aside-price { font-size: 1rem; margin-bottom: 10px; }

.hl-amenity-list { margin: 0; padding-left: 18px; }
.hl-amenity-list li { margin: 4px 0; }

.hl-btn-block { display: block; width: 100%; text-align: center; }

.hl-single-map { height: 360px; border: 1px solid #e5e5e5; border-radius: 12px; overflow: hidden; background: #f7f7f7; }
@media (max-width: 560px){ .hl-single-map { height: 300px; } }

/* Ensure images inside our content never overflow theme container */
.entry-content .hl-single img { max-width: 100%; height: auto; }

/* Hide theme header/meta on single stays (keep our .hl-single-title) */
.single-stays .entry-header,
.single-stays h1.entry-title,
.single-stays .entry-title,
.single-stays .post-meta,
.single-stays .entry-meta {
  display: none !important;
}

/* Hide theme prev/next nav on single stays */
.single-stays .post-navigation,
.single-stays .navigation.post-navigation,
.single-stays .nav-links,
.single-stays .nav-previous,
.single-stays .nav-next {
  display: none !important;
}

/* Back to results link */
.hl-back-wrap { margin: 0 0 10px; }
.hl-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #4B2E2A;
  text-decoration: none;
  font-weight: 600;
  border-bottom: 2px solid transparent;
}
.hl-back-link:hover {
  text-decoration: underline;
  border-bottom-color: #4B2E2A;
}

/* Similar stays */
.hl-related { margin-top: 28px; }
.hl-related-title { margin: 0 0 12px; color: #4B2E2A; font-size: 1.35rem; }

/* Sticky booking card on desktop */
@media (min-width: 901px) {
  .hl-single-body { align-items: start; }
  .hl-aside-card.hl-aside-sticky {
    position: sticky;
    top: 90px;            /* tweak to clear your header */
    z-index: 2;
  }
}

.hl-single-content,
.hl-aside-card,
.hl-card {
  box-shadow: 0 1px 6px rgba(0,0,0,.06);
}

/* Keep sticky booking card above Leaflet +/- and attribution */
@media (min-width: 901px) {
  /* put the whole aside column above the map's control layer */
  .hl-single-aside { position: relative; z-index: 2000; }

  .hl-aside-card.hl-aside-sticky {
    position: sticky;
    top: 90px;        /* adjust if needed to clear your header */
    z-index: 2001;    /* higher than Leaflet controls (~1000) */
  }

  /* if you're logged in and see the admin bar, give a bit more top offset */
  .admin-bar .hl-aside-card.hl-aside-sticky { top: 122px; }
}

/* Sections */
.hl-section { margin-top: 18px; }
.hl-sec-title { margin: 0 0 8px; font-size: 1.2rem; color: #4B2E2A; }

/* Highlights with ticks */
.hl-ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0,1fr)); }
@media (max-width: 640px){ .hl-ticks { grid-template-columns: 1fr; } }
.hl-ticks li {
  position: relative; padding-left: 26px; line-height: 1.5;
}
.hl-ticks li::before {
  content: "✔";
  position: absolute; left: 0; top: 0; font-weight: 700; color: #4B2E2A;
}

/* House rules accordion */
.hl-accordion { border: 1px solid #f7f7f7; border-radius: 12px; background: #f7f7f7; }
.hl-accordion > summary { list-style: none; cursor: pointer; padding: 10px 12px; }
.hl-accordion[open] > summary { border-bottom: 1px solid #f7f7f7; }
.hl-accordion .hl-accordion-body { padding: 12px; }

.hl-keyfacts { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px 14px; margin: 0 0 8px; }
@media (max-width: 640px){ .hl-keyfacts { grid-template-columns: 1fr; } }
.hl-keyfacts dt { font-weight: 700; color: #4B2E2A; }
.hl-keyfacts dd { margin: 0; }

/* Bottom CTA */
.hl-bottom-cta { margin-top: 18px; }

/* 1) Remove underlining from titles (site parts we control) */
.hl-single-title,
.hl-sec-title,
.hl-aside-title { text-decoration: none; }
.hl-accordion > summary { text-decoration: none; }
.hl-card-title a,
.hl-related .hl-card-title a { text-decoration: none; }
.hl-card-title a:hover,
.hl-related .hl-card-title a:hover { text-decoration: none; } /* keep off on hover too */

/* 2) Soft background for House rules + Area sections */
.hl-section.hl-section-soft {
  background: #FAF7F2;
  border-radius: 12px;
  padding: 12px;
}
/* Make the accordion itself transparent so the section background shows edge-to-edge */
.hl-accordion {
  background: transparent;
  border: 0;
}
.hl-accordion > summary { padding: 10px 12px; border: 0; }
.hl-accordion[open] > summary { border: 0; }
.hl-accordion .hl-accordion-body { padding: 0 12px 12px; }

/* 3) Remove borders on aside boxes and increase spacing */
.hl-aside-card {
  border: 1px;                /* was 1px solid #e5e5e5 */
  background: #FAF7F2;      /* keep on-brand background */
}
.hl-single-aside {
  gap: 24px;                /* was 14px */
}

/* Soft sections: full-bleed inside the white article card */
.hl-single-content { position: relative; }
.hl-single-content .hl-section.hl-section-soft {
  background: #FAF7F2;
  border-radius: 12px;
  /* cancel the article’s 16px padding so the soft bg reaches the edges */
  margin: 16px -16px 0 -16px;
  padding: 12px 16px;
}

/* Accordion inside soft section should be transparent so the soft bg shows */
.hl-section-soft .hl-accordion { background: transparent !important; border: 0 !important; }
.hl-section-soft .hl-accordion > summary { background: transparent; border: 0; padding: 10px 0; }
.hl-section-soft .hl-accordion[open] > summary { border: 0; }
.hl-section-soft .hl-accordion .hl-accordion-body { padding: 0 0 12px 0; }

/* Remove borders and increase spacing for aside cards (amenities, location, etc.) */
.hl-single-aside { display: grid; gap: 28px !important; } /* was ~14px */
.hl-single-aside .hl-aside-card {
  border: 0 !important;           /* force override any theme/plugin borders */
  box-shadow: none;                /* optional: keep it flat; remove if you like the shadow */
  background: #FAF7F2;             /* on-brand panel colour */
}

/* Make the map container borderless too (if you still see a line) */
.hl-single-map { border: 12px !important; }

