/* Search results page */

.page-search {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  background: #fff;
}

.page-search__layout {
  padding-top: 16px;
}

.search-page__toolbar {
  padding: 8px 0;
  border-bottom: 1px solid rgba(25, 92, 147, 0.15);
  background: #fff;
}

.search-page__toolbar-start {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.search-page__clear-filters {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 180px;
  height: 46px;
  padding: 0 16px;
  border: 1px solid var(--color-primary);
  border-radius: 10px;
  background: #fff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
  color: var(--color-primary);
  cursor: pointer;
  transition: background 0.2s ease;
}

.search-page__clear-filters:hover {
  background: rgba(255, 32, 122, 0.06);
}

.search-page__clear-filters-icon {
  display: block;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.search-page__search.search-group {
  max-width: none;
  width: 100%;
}

.page-search__row {
  --bs-gutter-x: 32px;
  --bs-gutter-y: 16px;
  align-items: flex-start;
}

.page-search__sidebar-col,
.page-search__content-col {
  min-width: 0;
}

.page-search__content-col {
  margin-top: 0;
}

/* Tablet layout: 600px–700px — col-6 filters + col-6 content, full-width cards; 701px–991px — col-5 + col-7 */

@media (max-width: 599.98px) {
  .page-search__sidebar-col {
    display: none !important;
  }

  .page-search__content-col {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

@media (min-width: 600px) and (max-width: 991.98px) {
  .search-page__toolbar--tablet {
    padding: 8px 0;
  }

  .search-page__tablet-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
  }

  .search-page__toolbar--tablet .search-page__search.search-group {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    max-width: 310px;
    margin-left: auto;
  }

  .page-search__sidebar-col {
    flex: 0 0 50%;
    max-width: 50%;
  }

  .page-search__content-col {
    flex: 0 0 50%;
    max-width: 50%;
  }

  .page-search__sidebar-col .search-filters {
    padding-top: 0;
    position: sticky;
    top: 8px;
  }

  .page-search__sidebar-col .search-filters__panel {
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    scrollbar-width: none;
  }

  .page-search__sidebar-col .search-filters__panel::-webkit-scrollbar {
    display: none;
  }

  .page-search__sidebar-col .search-filters__section-title {
    height: 28px;
    padding: 4px 6px 4px 12px;
    font-size: 13px;
  }

  .page-search__sidebar-col .search-filter-accordion__header {
    min-height: 52px;
    padding: 10px 12px;
    font-size: 13px;
  }

  .page-search__sidebar-col .search-filter-accordion.is-open .search-filter-accordion__header {
    height: 52px;
  }

  .page-search__sidebar-col .search-filter-accordion__body {
    padding: 0 12px;
  }

  .page-search__sidebar-col .search-filter-accordion__body:has(.search-filter-age-range),
  .page-search__sidebar-col .search-filter-accordion__body:has(.search-advanced-filter-upsell) {
    padding: 15px 15px;
  }

  .page-search__content-col .profile-grid__col {
    flex: 0 0 50%;
    max-width: 50%;
  }

  .page-search__content-col .like-btn {
    width: 44px;
    height: 44px;
  }

  .page-search__content-col .like-btn__icon {
    font-size: 20px;
  }

  .search-page__clear-filters {
    width: auto;
    min-width: 0;
    height: 42px;
    padding: 0 12px;
    font-size: 14px;
  }
}

@media (min-width: 600px) and (max-width: 700px) {
  .page-search__content-col .profile-grid__col {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

@media (min-width: 701px) and (max-width: 991.98px) {
  .page-search__sidebar-col {
    flex: 0 0 41.666667%;
    max-width: 41.666667%;
  }

  .page-search__content-col {
    flex: 0 0 58.333333%;
    max-width: 58.333333%;
  }
}

@media (min-width: 992px) {
  .page-search__sidebar-col {
    flex: 0 0 25%;
    max-width: 25%;
  }

  .page-search__content-col {
    flex: 0 0 75%;
    max-width: 75%;
  }

  .page-search__content-col .profile-grid__col {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
  }
}

.search-filters {
  width: 100%;
  padding-top: 0;
}

.search-filters__panel {
  overflow: hidden;
  border: 0.5px solid var(--color-border);
  border-radius: 10px;
  background: #fff;
}

.search-filters__panel > * + * {
  border-top: 0.5px solid rgba(25, 92, 147, 0.2);
}

.search-filters__section-title {
  margin: 0;
  height: 30px;
  padding: 6px 6px 6px 15px;
  display: flex;
  align-items: center;
  background: var(--color-accent);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  color: #fff;
}

.search-filter-accordion + .search-filter-accordion {
  border-top: none;
}

.search-filter-accordion__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 60px;
  padding: 12px 16px;
  border-width: 0 0 0.5px 0;
  border-style: solid;
  border-color: #195c93;
  background: #f7fdff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  color: #73686a;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease;
}

.search-filter-accordion__header:hover {
  background: rgba(52, 120, 155, 0.04);
}

.search-filters__panel > .search-filter-accordion:last-of-type .search-filter-accordion__header {
  border-bottom: none;
}

.search-filter-accordion.has-selection .search-filter-accordion__header {
  font-weight: 600;
  color: #1b1b1b;
}

.search-filter-accordion.is-open .search-filter-accordion__header {
  height: 60px;
}

.search-filter-accordion.has-selection .search-filter-accordion__label {
  font-weight: 600;
  color: #1b1b1b;
}

.search-filter-accordion__label-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
}

.search-filter-accordion__label {
  min-width: 0;
}

.search-filter-accordion__indicator {
  display: block;
  flex-shrink: 0;
  width: 9px;
  height: 9px;
  margin-top: 3px;
  object-fit: contain;
}

.search-filter-accordion__chevron {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  object-fit: contain;
  transition: transform 0.2s ease;
  transform: rotate(0deg);
}

.search-filter-accordion.is-open .search-filter-accordion__chevron {
  transform: rotate(90deg);
}

.search-filter-accordion__body {
  padding: 0 15px;
  border-bottom: 0.5px solid #195c93;
  background: #fff;
}

.search-filter-accordion__body:has(.search-filter-age-range),
.search-filter-accordion__body:has(.search-advanced-filter-upsell) {
  padding: 15px 15px;
}

.search-advanced-filter-upsell {
  padding: 8px 0 4px;
  text-align: center;
}

.search-advanced-filter-upsell__icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 140px;
  height: 140px;
  margin: 0 auto 30px;
  border-radius: 50%;
  background: #f7fdff;
}

.search-advanced-filter-upsell__icon {
  display: block;
  font-size: 54px;
  line-height: 1;
}

.search-advanced-filter-upsell__title {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-text);
}

.search-advanced-filter-upsell__text {
  margin: 0 0 30px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--color-muted);
}

.search-advanced-filter-upsell__btn {
  width: 180px;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  height: 46px;
  padding: 0 16px;
  border: none;
  border-radius: 10px;
  background: var(--color-primary);
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease;
}

.search-advanced-filter-upsell__btn:hover {
  background: #e01a6d;
}

.search-filter-city-empty {
  padding: 30px 0;
  text-align: center;
}

.search-filter-city-empty__icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 140px;
  height: 140px;
  margin: 0 auto 24px;
  border-radius: 50%;
  background: #f7fdff;
}

.search-filter-city-empty__icon {
  display: block;
  font-size: 54px;
  line-height: 1;
}

.search-filter-city-empty__title {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-text);
}

.search-filter-city-empty__text {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--color-muted);
}

.search-filter-age-range {
  width: 100%;
}

.search-filter-age-range .profile-age-range__header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}

.search-filter-age-range .profile-age-range__label {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--color-muted);
}

.search-filter-age-range .profile-age-range__value {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-text);
}

.search-filter-age-range .profile-age-range__slider {
  margin-top: 0;
  --handle-size: 32px;
}

.search-filter-checkboxes {
  --search-filter-item-height: 62px;
  --search-filter-visible-items: 6;
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 0;
}

.search-filter-checkboxes--searchable {
  padding: 10px 0;
  background: #fff;
}

.search-filter-checkboxes__search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  height: 46px;
  margin-bottom: 0;
  border: 0.5px solid #195c93;
  border-radius: 10px;
  background: var(--color-surface);
}

.search-filter-checkboxes--searchable .search-filter-checkboxes__search {
  flex-shrink: 0;
}

.search-filter-checkboxes__search-icon {
  display: block;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.search-filter-checkboxes__search-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--color-text);
  outline: none;
}

.search-filter-checkboxes__search-input::placeholder {
  color: var(--color-placeholder);
}

.search-filter-checkboxes__list {
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow-y: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.search-filter-checkboxes--searchable .search-filter-checkboxes__list {
  max-height: calc(
    var(--search-filter-item-height) * var(--search-filter-visible-items)
  );
}

.search-filter-checkboxes__list::-webkit-scrollbar {
  display: none;
}

.search-filter-checkboxes__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: var(--search-filter-item-height);
  margin: 0;
  padding: 21px 0;
  border: none;
  border-bottom: 0.5px solid #195c93;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--color-muted);
  text-align: left;
  cursor: pointer;
  transition: color 0.2s ease;
  box-sizing: border-box;
}

.search-filter-checkboxes__item:last-child {
  border-bottom: none;
}

.search-filter-checkboxes__item.is-selected {
  color: var(--color-text);
}

.search-filter-checkboxes__tick {
  display: block;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.search-filter-checkboxes__label {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 400;
}

.search-filter-checkboxes__item.is-selected .search-filter-checkboxes__label {
  font-weight: 600;
  color: var(--color-text);
}

.search-filter-checkboxes__loading,
.search-filter-checkboxes__empty {
  margin: 0;
  padding: 21px 0;
  font-size: 14px;
  line-height: 1.4;
  color: var(--color-muted);
}

@media (min-width: 600px) {
  .search-page__search.search-group {
    max-width: 310px;
    margin-left: auto;
  }

  .page-search--idle .page-search__layout {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  .page-search--idle .page-search__row {
    flex: 1 1 auto;
    align-items: stretch;
    min-height: calc(100vh - var(--header-height) - 140px);
  }

  .page-search--idle .page-search__content-col {
    display: flex;
  }

  .page-search--idle .page-search__content-col .search-empty-state {
    flex: 1 1 auto;
    width: 100%;
    min-height: 100%;
    padding: 24px;
  }

  .page-search--idle .search-empty-state__icon-wrap {
    width: 120px;
    height: 120px;
    margin-bottom: 24px;
  }

  .page-search--idle .search-empty-state__title {
    max-width: 360px;
  }
}

.search-empty-state {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
  background: #fff;
}

.search-empty-state__icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 140px;
  height: 140px;
  margin-bottom: 30px;
  border-radius: 50%;
  background: #f7fdff;
}

.search-empty-state__icon {
  display: block;
  font-size: 54px;
  line-height: 1;
}

.search-empty-state__title {
  max-width: 280px;
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--color-text);
}

.search-empty-state__text {
  max-width: 300px;
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--color-muted);
}

/* Mobile search (≤600px) */

@media (max-width: 599.98px) {
  .page-search--mobile {
    display: flex;
    flex-direction: column;
    min-height: 100%;
  }

  .search-page__toolbar--mobile {
    position: sticky;
    top: 0;
    z-index: 1030;
    border-bottom: none;
    background: var(--color-navbar-bg);
  }

  .search-page__mobile-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
  }

  .search-page__back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
  }

  .search-page__back img {
    display: block;
    width: 42px;
    height: 42px;
    object-fit: contain;
    margin-left: -22px;
  }

  .search-page__search--mobile,
  .search-page__search--mobile.search-group.input-group {
    flex: 1 1 auto;
    min-width: 0;
    height: 52px;
    border: 0.5px solid var(--color-border);
    border-radius: 10px;
    background: #f7fdff;
  }

  .search-page__filter-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    padding: 0;
    border: 0.5px solid var(--color-border);
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
  }

  .search-page__filter-btn-icon {
    display: block;
    width: 24px;
    height: 24px;
    object-fit: contain;
  }

  .search-page__filter-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--color-primary);
  }

  .search-empty-state {
    padding: 48px 24px 96px;
  }

  .search-mobile-filter-panel {
    position: fixed;
    inset: 0;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    background: #fff;
  }

  .search-mobile-filter-panel__header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 58px;
    padding: 8px 16px;
    background: var(--color-navbar-bg);
  }

  .search-mobile-filter-panel__close {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
  }

  .search-mobile-filter-panel__close img {
    display: block;
    width: 42px;
    height: 42px;
    object-fit: contain;
  }

  .search-mobile-filter-panel__title {
    position: absolute;
    left: 0;
    right: 0;
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
    color: var(--color-text);
    pointer-events: none;
  }

  .search-mobile-filter-panel__clear-all {
    position: relative;
    z-index: 1;
    min-width: 98px;
    height: 28px;
    padding: 0 12px;
    border: 1px solid var(--color-primary);
    border-radius: 8px;
    background: transparent;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.02em;
    color: var(--color-primary);
    cursor: pointer;
    white-space: nowrap;
  }

  .search-mobile-filter-panel__body {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
  }

  .search-mobile-filter-panel__nav {
    width: 41.666667%;
    flex-shrink: 0;
    overflow-y: auto;
    border-right: 0.5px solid #195c93;
    background: #f7fdff;
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  .search-mobile-filter-panel__nav::-webkit-scrollbar {
    display: none;
  }

  .search-mobile-filter-panel__group-title {
    margin: 0;
    height: 30px;
    padding: 6px 6px 6px 15px;
    display: flex;
    align-items: center;
    background: var(--color-accent);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    color: #fff;
  }

  .search-mobile-filter-panel__list {
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .search-mobile-filter-panel__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    min-height: 60px;
    padding: 12px 12px 12px 15px;
    border: none;
    border-bottom: 0.5px solid rgba(25, 92, 147, 0.2);
    background: transparent;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    color: #73686a;
    text-align: left;
    cursor: pointer;
  }

  .search-mobile-filter-panel__item.is-active {
    background: #fff;
    font-weight: 600;
    color: #1b1b1b;
  }

  .search-mobile-filter-panel__item.has-selection:not(.is-active) {
    font-weight: 600;
    color: #1b1b1b;
  }

  .search-mobile-filter-panel__item-label {
    flex: 1 1 auto;
    min-width: 0;
  }

  .search-mobile-filter-panel__item-dot {
    display: block;
    flex-shrink: 0;
    width: 9px;
    height: 9px;
    object-fit: contain;
  }

  .search-mobile-filter-panel__values {
    width: 58.333333%;
    flex-shrink: 0;
    overflow-y: auto;
    padding: 0px 15px;
    background: #fff;
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  .search-mobile-filter-panel__values::-webkit-scrollbar {
    display: none;
  }

  .search-mobile-filter-panel__values .search-filter-age-range {
    padding-top: 15px;
  }

  .search-mobile-filter-panel__values .search-filter-checkboxes {
    max-height: none;
    margin-top: 0;
  }

  .search-mobile-filter-panel__values .search-filter-checkboxes__list {
    max-height: none;
  }

  .search-mobile-filter-panel__values .search-advanced-filter-upsell {
    padding: 0;
    width: 100%;
  }

  .search-mobile-filter-panel__values .search-advanced-filter-upsell__icon-wrap {
    width: 100px;
    height: 100px;
    margin-bottom: 20px;
  }

  .search-mobile-filter-panel__values .search-advanced-filter-upsell__icon {
    font-size: 40px;
  }

  .search-mobile-filter-panel__values .search-advanced-filter-upsell__title {
    font-size: 16px;
  }

  .search-mobile-filter-panel__values:has(.search-filter-city-empty),
  .search-mobile-filter-panel__values:has(.search-advanced-filter-upsell) {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px;
  }

  .search-mobile-filter-panel__values .search-filter-city-empty {
    padding: 0;
    width: 100%;
  }

  .search-mobile-filter-panel__values .search-filter-city-empty__icon-wrap {
    width: 140px;
    height: 140px;
    margin-bottom: 30px;
  }

  .search-mobile-filter-panel__values .search-filter-city-empty__title {
    font-size: 20px;
  }

  .search-filter-panel-content__placeholder {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
    color: var(--color-muted);
  }

  .search-mobile-filter-panel__footer {
    flex-shrink: 0;
    padding: 20px;
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    border-top: 0.5px solid rgba(25, 92, 147, 0.15);
    background: #fff;
  }

  .search-mobile-filter-panel__apply {
    width: 100%;
    height: 50px;
    border: none;
    border-radius: 10px;
    background: var(--color-primary);
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    color: #fff;
    cursor: pointer;
  }

  .search-mobile-filter-panel__apply:hover {
    background: #e01a6d;
  }
}
