/* Elephant Rent - catalogue border-radius harmonisation (2026-10-12).
   Visual-only: no grid widths, spacing, colors, card content, booking or JS changes.
   Applied to home/catalogue pages only. The mobile filter sheet is portaled to
   <body>, so its selectors are scoped separately below.

   Design scale:
     14px - search surface
     12px - cards, category tiles, filter surfaces
     10px - primary actions and secondary controls
      8px - editable fields and filter chips
   Circular counters, checkboxes and pill badges deliberately keep their shapes.
*/
body.ps-home-page {
  --er-catalog-radius-search: 14px;
  --er-catalog-radius-card: 12px;
  --er-catalog-radius-control: 10px;
  --er-catalog-radius-field: 8px;
}

/* Desktop: the search bar is a single joined control, so its inner field
   dividers remain square. Only the outer corners and CTA are adjusted. */
@media (min-width: 768px) {
  html[data-theme] body.ps-home-page .ps-market .ps-search__bar--find {
    border-radius: var(--er-catalog-radius-search) !important;
  }
  html[data-theme] body.ps-home-page .ps-market .ps-search__bar--find .ps-search__field:first-child {
    border-top-left-radius: var(--er-catalog-radius-search) !important;
    border-bottom-left-radius: var(--er-catalog-radius-search) !important;
  }
  html[data-theme] body.ps-home-page .ps-market-layout > .ps-sidebar-filters > .ps-sidebar-box {
    border-radius: var(--er-catalog-radius-card) !important;
  }
}
html[data-theme] body.ps-home-page .ps-market .ps-search__submit-main {
  border-radius: var(--er-catalog-radius-control) !important;
}

/* Desktop catalogue and its category tiles, not the booking modal cards. */
html[data-theme] body.ps-home-page .ps-market-results .ps-listing-card--catalog {
  border-radius: var(--er-catalog-radius-card) !important;
}
html[data-theme] body.ps-home-page .ps-market-results .ps-listing-card--catalog .ps-listing-card__details {
  border-radius: var(--er-catalog-radius-control) !important;
}
html[data-theme] body.ps-home-page .ps-market-results > .ps-class-block--catalog.ps-class-block--desktop .ps-class-tabs button {
  border-radius: var(--er-catalog-radius-card) !important;
}

/* Filter inputs, reset actions and the existing additional-filters toggle. */
html[data-theme] body.ps-home-page .ps-sidebar-filters .ps-price-value {
  border-radius: var(--er-catalog-radius-field) !important;
}
html[data-theme] body.ps-home-page .ps-sidebar-filters .ps-extra-filters-toggle,
html[data-theme] body.ps-home-page .ps-sidebar-filters .ps-sidebar-actions a {
  border-radius: var(--er-catalog-radius-control) !important;
}
html[data-theme] body.ps-home-page .ps-market-results .ps-active-filter {
  border-radius: var(--er-catalog-radius-field) !important;
}
html[data-theme] body.ps-home-page .ps-market-results .ps-catalog-sort,
html[data-theme] body.ps-home-page .ps-market-results .ps-show-more,
html[data-theme] body.ps-home-page .ps-comments .ps-comments__toggle {
  border-radius: var(--er-catalog-radius-control) !important;
}

@media (max-width: 767px) {
  /* The initial mobile search is a surface; its sticky condensed variant
     is kept at 10px, so it remains a tidy pair of search/filter controls. */
  html[data-theme] body.ps-home-page .ps-mobile-search-sticky:not(.is-stuck) .ps-search__bar--find {
    border-radius: var(--er-catalog-radius-search) !important;
  }
  html[data-theme] body.ps-home-page .ps-mobile-search-sticky.is-stuck .ps-search__bar--find {
    border-radius: var(--er-catalog-radius-control) !important;
  }
  html[data-theme] body.ps-home-page .ps-mobile-filter-trigger {
    border-radius: var(--er-catalog-radius-control) !important;
  }
  html[data-theme] body.ps-home-page .ps-market-results .ps-trip-card {
    border-radius: var(--er-catalog-radius-card) !important;
  }
  html[data-theme] body.ps-home-page .ps-market-results .ps-trip-card__details {
    border-radius: var(--er-catalog-radius-control) !important;
  }

  /* Mobile filter sheet is moved to body by site.js. Keep the sheet itself
     full-bleed/square; only its content tiles and actions are rounded. */
  html[data-theme] body.ps-home-page > .ps-sidebar-filters.ps-mobile-filter-portal .ps-sidebar-group,
  html[data-theme] body.ps-home-page > .ps-sidebar-filters.ps-mobile-filter-portal .ps-price-filter {
    border-radius: var(--er-catalog-radius-card) !important;
  }
  html[data-theme] body.ps-home-page > .ps-sidebar-filters.ps-mobile-filter-portal .ps-mobile-class-tabs button {
    border-radius: var(--er-catalog-radius-card) !important;
  }
  html[data-theme] body.ps-home-page > .ps-sidebar-filters.ps-mobile-filter-portal .ps-price-value {
    border-radius: var(--er-catalog-radius-field) !important;
  }
  html[data-theme] body.ps-home-page > .ps-sidebar-filters.ps-mobile-filter-portal .ps-extra-filters-toggle,
  html[data-theme] body.ps-home-page > .ps-sidebar-filters.ps-mobile-filter-portal .ps-sidebar-actions a,
  html[data-theme] body.ps-home-page > .ps-sidebar-filters.ps-mobile-filter-portal .ps-mobile-filter-apply {
    border-radius: var(--er-catalog-radius-control) !important;
  }
}
