/**
 * Homepage — ported from the design prototype's Homepage.dc.html.
 * Reuses design tokens defined in assets/css/main.css.
 */

.rpr-home-main {
  max-width: 1440px;
  margin: 0 auto;
  padding: 20px 28px 72px;
}

/* Where / When / Who search bar */

.rpr-home-search {
  position: relative;
  display: flex;
  align-items: stretch;
  border: 1px solid var(--rpr-border-strong);
  border-radius: var(--rpr-radius-pill);
  box-shadow: 0 2px 10px rgba(20, 30, 60, 0.06);
  padding: 6px 6px 6px 0;
  margin: 6px 0 34px;
}

/* The divider isn't a straight line — it's border-right + border-radius
   together on the field itself (matches the original design source
   exactly). A plain single-side border normally turns a sharp 90° corner,
   but border-radius rounds that turn off instead, so the border-right
   line bows outward into a curve at the top and bottom instead of running
   straight — that curve *is* the divider, no pseudo-element needed. */
.rpr-home-search-field {
  position: relative;
  border-right: 1px solid var(--rpr-border);
  border-radius: 38px;
  background: transparent;
}

.rpr-home-search-where {
  flex: 1.3;
}

.rpr-home-search-when {
  flex: 1.15;
}

.rpr-home-search-who {
  flex: 0.85;
  border-right: 0;
}

.rpr-home-search-who::after {
  content: none;
}

.rpr-home-search-field-btn {
  width: 100%;
  border: 0;
  background: none;
  text-align: left;
  padding: 10px 26px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  cursor: pointer;
  font-family: inherit;
  border-radius: 38px;
}

.rpr-home-search-field-btn:hover,
.rpr-home-search-field.is-open .rpr-home-search-field-btn {
  background: var(--rpr-bg-hover-2);
}

.rpr-home-search-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--rpr-blue);
}

.rpr-home-search-value {
  font-size: 15px;
  color: var(--rpr-text-faint);
}

.rpr-home-search-field-btn.has-value .rpr-home-search-value,
.rpr-home-search-value.has-value {
  color: var(--rpr-text-body);
}

.rpr-home-search-panel {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  z-index: 101;
  background: #fff;
  border: 1px solid var(--rpr-border);
  border-radius: var(--rpr-radius-md);
  box-shadow: var(--rpr-shadow-popover);
  width: 280px;
  max-height: 360px;
  overflow: auto;
  padding: 8px;
}

.rpr-home-search-who .rpr-home-search-panel {
  left: auto;
  right: 0;
  width: 320px;
  padding: 8px 20px;
}

.rpr-home-search-panel-empty {
  margin: 0;
  padding: 12px 14px;
  font-size: 13px;
  color: var(--rpr-text-tertiary);
}

.rpr-home-search-option {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: none;
  padding: 11px 14px;
  border-radius: var(--rpr-radius-sm);
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  color: var(--rpr-text-body);
}

.rpr-home-search-option:hover {
  background: var(--rpr-bg-hover);
}

/* When: two-month calendar. The day-grid/weekday/nav-button styling
   (.rpr-cal-*) is shared with the header's own Where/When/Who popover — see
   main.css — since both use the same window.RPRCalendar engine (main.js).
   Only this outer fixed-position wrapper is specific to the homepage's own
   full-width search bar (the header's popover already has its own wrapper,
   .rpr-hdr-popover, and just widens for the "when" panel — see main.css). */

.rpr-home-cal-panel {
  position: fixed;
  z-index: 101;
  background: #fff;
  border: 1px solid var(--rpr-border);
  border-radius: 20px;
  box-shadow: var(--rpr-shadow-popover);
  box-sizing: border-box;
  padding: 20px 24px 22px;
}

.rpr-home-guest-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--rpr-border-faint);
}

.rpr-home-guest-row:last-child {
  border-bottom: 0;
}

.rpr-home-guest-row-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--rpr-text);
}

.rpr-home-guest-row-sub {
  font-size: 13px;
  color: var(--rpr-text-tertiary);
  margin-top: 1px;
}

.rpr-home-guest-stepper {
  display: flex;
  align-items: center;
  gap: 14px;
}

.rpr-home-guest-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--rpr-text-faint);
  background: #fff;
  color: var(--rpr-text-body);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
  display: grid;
  place-items: center;
}

.rpr-home-guest-btn:hover {
  background: var(--rpr-bg-hover);
}

.rpr-home-guest-count {
  font-size: 15px;
  width: 16px;
  text-align: center;
}

.rpr-home-search-submit {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 0;
  background: var(--rpr-blue);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  align-self: center;
  margin-right: 6px;
}

.rpr-home-search-submit:hover {
  background: var(--rpr-blue-dark);
}

/* Category chips row — mobile-only. The header already has its own category
   tabs for desktop (same activeCategory/onCategoryChange target); on mobile
   the header collapses to the Where/When/Who pill instead, so this chip row
   takes over as the mobile way to filter by category, replacing the search
   form (hidden below) in the same slot rather than showing alongside it. */

.rpr-home-categories {
  display: none;
  align-items: center;
  gap: 10px;
  margin: 6px 0 28px;
  flex-wrap: wrap;
}

.rpr-home-cat {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--rpr-border-strong);
  background: #fff;
  color: var(--rpr-text-body);
  border-radius: 20px;
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  flex: 0 0 auto;
}

.rpr-home-cat:hover {
  border-color: var(--rpr-blue);
}

.rpr-home-cat.is-active {
  border-color: var(--rpr-blue);
  background: var(--rpr-blue);
  color: #fff;
}

.rpr-home-cat-icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.rpr-home-cat.is-active .rpr-home-cat-icon {
  filter: invert(1) brightness(2);
}

/* Empty state */

.rpr-home-empty-note {
  border: 1px dashed var(--rpr-border-strong);
  border-radius: var(--rpr-radius-lg);
  color: var(--rpr-text-secondary);
  text-align: center;
  font-size: 15px;
  padding: 48px 24px;
  margin: 40px 0;
}

/* "Stays in {area}" sections */

.rpr-home-section {
  margin-bottom: 44px;
}

.rpr-home-sechead-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}

.rpr-home-sechead {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rpr-home-sechead-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: var(--rpr-text);
}

.rpr-home-seeall-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--rpr-border-strong);
  display: grid;
  place-items: center;
  text-decoration: none;
  color: var(--rpr-text);
}

.rpr-home-seeall-btn:hover {
  background: var(--rpr-bg-hover);
}

.rpr-home-arrows {
  display: flex;
  gap: 8px;
}

.rpr-home-arrow {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--rpr-border-strong);
  background: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--rpr-text-body);
}

.rpr-home-arrow:hover {
  background: var(--rpr-bg-hover);
}

.rpr-home-row-wrap {
  position: relative;
}

.rpr-home-row {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-top: 8px;
  padding-bottom: 16px;
  scrollbar-width: none;
}

.rpr-home-row::-webkit-scrollbar {
  display: none;
}

/* Listing card */

.rpr-home-card {
  flex: 0 0 232px;
  display: block;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--rpr-border);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  transition:
    box-shadow 0.18s,
    transform 0.18s;
}

.rpr-home-card:hover {
  box-shadow: 0 4px 12px rgba(20, 30, 60, 0.1);
  transform: translateY(-2px);
}

.rpr-home-card-image-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--rpr-border-faintest);
}

.rpr-home-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.rpr-home-card-badge-top {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--rpr-blue);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: var(--rpr-radius-pill);
}

.rpr-home-card-badge-rating {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--rpr-text);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: var(--rpr-radius-pill);
  display: flex;
  align-items: center;
  gap: 3px;
}

.rpr-home-card-badge-rating-star {
  color: #f2b60d;
}

.rpr-home-card-badge-rating-count {
  font-weight: 400;
  color: var(--rpr-text-secondary);
}

.rpr-home-card-badge-meta {
  position: absolute;
  left: 10px;
  bottom: 10px;
  background: rgba(20, 28, 48, 0.72);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: var(--rpr-radius-pill);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: calc(100% - 20px);
}

.rpr-home-card-body {
  padding: 13px 14px 15px;
}

.rpr-home-card-name {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
  height: 41px;
  overflow: hidden;
}

.rpr-home-card-price-row {
  margin-top: 5px;
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.rpr-home-card-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--rpr-blue);
}

.rpr-home-card-price-unit {
  font-size: 13px;
  color: var(--rpr-text-secondary);
}

.rpr-home-card-icons {
  margin-top: 11px;
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.rpr-home-card-icon {
  display: block;
  width: 20px;
  height: 20px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  flex: 0 0 auto;
}

.rpr-home-card-city {
  font-size: 12px;
  color: var(--rpr-text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-left: auto;
}

/* Trailing "See all" tile */

.rpr-home-seeall-card {
  flex: 0 0 232px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid var(--rpr-border);
  border-radius: 14px;
  text-decoration: none;
  color: var(--rpr-text);
  background: var(--rpr-bg-hover-3);
}

.rpr-home-seeall-card:hover {
  background: var(--rpr-bg-hover-2);
}

.rpr-home-seeall-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 4px;
  width: 96px;
  height: 96px;
}

.rpr-home-seeall-cell {
  border-radius: 8px;
  background-color: var(--rpr-border-faintest);
  background-size: cover;
  background-position: center;
}

.rpr-home-seeall-label {
  font-size: 14px;
  font-weight: 600;
}

/* Responsive */

@media (max-width: 1024px) {
  .rpr-home-main {
    padding: 14px 16px 48px;
  }

  .rpr-home-search {
    display: none;
  }

  .rpr-home-categories {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
    margin: 6px 0 24px;
  }

  .rpr-home-categories::-webkit-scrollbar {
    display: none;
  }

  .rpr-home-cat {
    padding: 8px 14px;
    font-size: 13px;
  }

  .rpr-home-arrows {
    display: none;
  }

  .rpr-home-sechead-row {
    flex-wrap: wrap;
  }

  .rpr-home-sechead {
    flex: 1;
    width: 100%;
    justify-content: space-between;
  }

  .rpr-home-card,
  .rpr-home-seeall-card {
    flex-basis: 190px;
  }
}
