/* Спортивные школы — макет Figma search_ss */
.ss-page,
.auth-page {
  background: #f4f5f7;
  padding: 0 0 3rem;
  min-height: 50vh;
}

.ss-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.ss-page-head__title {
  margin: 0;
  font-size: 2.5rem;
  font-weight: 600;
  line-height: 1.2;
  color: #004170;
}


.ss-search {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.ss-search__bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 0.375rem 0.5rem 1rem;
  background: #fff;
  border-radius: 8px;
}

.ss-search__input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1rem;
  line-height: 1.5;
  color: #252a2f;
  background: transparent;
  min-width: 0;
}

.ss-search__input::placeholder {
  color: #acb9c1;
}

.ss-search__bar > .ss-icon {
  flex-shrink: 0;
  color: #252a2f;
}

.ss-search__bar .ss-btn--primary {
  flex-shrink: 0;
}

/* Сворачиваемый блок фильтров (каталоги и страницы школы) */
.ss-search__toolbar {
  display: flex;
  align-items: stretch;
  gap: 0.75rem;
}

.ss-search__toolbar .ss-search__bar {
  flex: 1;
  min-width: 0;
}

.ss-filters-fab {
  position: relative;
  flex-shrink: 0;
  width: 3.25rem;
  height: 3.25rem;
  margin: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e2e5ea;
  border-radius: 50%;
  background: #fff;
  color: #004170;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}

.ss-filters-fab:hover {
  background: #f8fafb;
  border-color: #c5d0d9;
}

.ss-filters-fab:focus-visible {
  outline: 2px solid #037cbd;
  outline-offset: 2px;
}

.ss-filters-fab__icon {
  display: block;
  width: 1.375rem;
  height: 1.375rem;
}

.ss-filters-fab__badge {
  position: absolute;
  top: -0.2rem;
  right: -0.2rem;
  min-width: 1.125rem;
  height: 1.125rem;
  padding: 0 0.25rem;
  border-radius: 999px;
  background: #ffa629;
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1.125rem;
  text-align: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.ss-filters-fab__badge[hidden] {
  display: none;
}

[data-collapsible-filters].is-filters-open .ss-filters-fab {
  background: #004170;
  border-color: #004170;
  color: #fff;
}

.ss-filters-panel__body {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  margin: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  border: none;
  pointer-events: none;
  transition:
    max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.28s ease,
    margin 0.35s ease;
}

[data-collapsible-filters].is-filters-open .ss-filters-panel__body {
  max-height: 4000px;
  opacity: 1;
  margin-top: 1.25rem;
  pointer-events: auto;
}

[data-collapsible-filters]:not(.is-filters-open) .ss-filters-panel__body .ss-filters.card,
[data-collapsible-filters]:not(.is-filters-open) .ss-filters-panel__body .events-filters.card,
[data-collapsible-filters]:not(.is-filters-open) .ss-filters-panel__body > form.ss-filters.card {
  padding-top: 0;
  padding-bottom: 0;
  box-shadow: none;
}

[data-collapsible-filters] .ss-filters-fab--solo {
  margin-bottom: 0.75rem;
}

@media (prefers-reduced-motion: reduce) {
  .ss-filters-panel__body {
    transition: none;
  }
}

.ss-filters.card {
  padding: 1.25rem 1.5rem 1.25rem;
  border-radius: 12px;
  box-shadow: none;
  background: #fff;
}

.ss-filters__grid {
  display: grid;
  gap: 0.85rem 1.25rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ss-filters__field {
  display: block;
  margin: 0;
  cursor: default;
}

.ss-filters__label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.25;
  color: #5c6370;
  margin-bottom: 0.3rem;
}

.ss-filters__label--actions {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ss-filters__control {
  display: block;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #e2e5ea;
  border-radius: 8px;
  padding: 0.35rem 0.6rem;
  font-size: 0.875rem;
  line-height: 1.35;
  min-height: 2.125rem;
  background: #fff;
  color: #252a2f;
  font-family: inherit;
}

.ss-filters__control::placeholder {
  color: #acb9c1;
}

.ss-filters__control:focus {
  outline: none;
  border-color: #037cbd;
  box-shadow: 0 0 0 2px rgba(3, 124, 189, 0.15);
}

.ss-filters__select-wrap {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0 0.45rem 0 0;
  border: 1px solid #e2e5ea;
  border-radius: 8px;
  background: #fff;
  min-height: 2.125rem;
}

.ss-filters__select-wrap:focus-within {
  border-color: #037cbd;
  box-shadow: 0 0 0 2px rgba(3, 124, 189, 0.15);
}

.ss-filters__control--select {
  flex: 1;
  min-width: 0;
  border: none;
  padding: 0.35rem 0.35rem 0.35rem 0.6rem;
  min-height: 2rem;
  background: transparent;
  appearance: none;
  cursor: pointer;
}

.ss-filters__control--select:focus {
  box-shadow: none;
}

.ss-filters__select-wrap .ss-icon {
  flex-shrink: 0;
  pointer-events: none;
  width: 1.25rem;
  height: 1.25rem;
}

.ss-filters__field--actions {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  grid-column: 1 / -1;
}

.ss-filters__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
}

.ss-filters__actions-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

/* «Смотреть на карте» — единый вид в фильтрах и на карточках */
.ss-filters__map,
.ss-card__map-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0;
  border: none;
  background: none;
  color: #037cbd;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
}

.ss-filters__map {
  margin-left: auto;
  white-space: nowrap;
}

.ss-card__map-btn {
  position: relative;
  z-index: 2;
}

.ss-filters__map:hover,
.ss-card__map-btn:hover {
  color: #005d96;
}

.ss-filters__map .ss-icon path,
.ss-card__map-btn .ss-icon path {
  stroke: currentColor !important;
}

.ss-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 1.15rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}

.ss-btn--primary {
  background: #ff8c00;
  color: #fff;
}

.ss-btn--primary:hover {
  background: #e67a22;
}

.ss-btn--ghost {
  background: #fff;
  color: #5c6370;
  border: 1px solid #e2e5ea;
}

.ss-btn--ghost:hover {
  border-color: #acb9c1;
  color: #252a2f;
}

@media (min-width: 768px) {
  .ss-filters__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

}

.ss-list-head {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 2rem;
}

.ss-list-head__title {
  margin: 0;
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.25;
  color: #004170;
}

.ss-list-head__badge {
  padding: 0.25rem 0.75rem;
  background: #e9f5fa;
  border-radius: 8px;
  color: #037cbd;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.4;
}

.ss-cards {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.ss-card {
  position: relative;
  display: flex;
  gap: 2rem;
  padding: 1.5rem;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
}

.ss-card__link {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}

.ss-card__photo {
  flex-shrink: 0;
  width: 180px;
  height: 180px;
  border-radius: 8px;
  background: transparent;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ss-card__photo--no-logo {
  background: transparent;
}

.ss-card__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: transparent;
}

.ss-card__img--placeholder {
  width: 104px;
  height: auto;
  object-fit: contain;
}

.ss-card__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1.5rem;
}

.ss-card__head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.ss-card__title {
  margin: 0;
  flex: 1;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.33;
  color: #001224;
}

.ss-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.ss-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.43;
}

.ss-badge--awards {
  background: #e9f5fa;
  color: #005d96;
}

.ss-badge--rating {
  background: #fff6e1;
  color: #ff8b00;
}

.ss-card__meta-row {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.ss-card__meta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.43;
  color: #acb9c1;
}

.ss-card__tags {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.ss-tag {
  padding: 0.375rem 0.75rem;
  background: #e9f5fa;
  border-radius: 4px;
  color: #005d96;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.43;
}

.ss-empty {
  margin: 0;
  padding: 2rem;
  text-align: center;
  color: #acb9c1;
  background: #fff;
  border-radius: 8px;
}

.ss-scroll-sentinel {
  height: 1px;
}

.ss-loading {
  text-align: center;
  color: #acb9c1;
  padding: 1rem;
}

.ss-map-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.ss-map-modal.is-open {
  pointer-events: auto;
  opacity: 1;
}

.ss-map-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 18, 36, 0.55);
}

.ss-map-modal__panel {
  position: relative;
  width: min(920px, 100%);
  max-height: min(90vh, 720px);
  background: #fff;
  border-radius: 8px;
  padding: 1.5rem 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: 0 16px 48px rgba(0, 65, 112, 0.2);
}

.ss-map-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  background: #f0f3f5;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ss-map-modal__title {
  margin: 0;
  padding-right: 3rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: #004170;
}

.ss-map-modal__addr {
  margin: 0;
  font-size: 0.875rem;
  color: #acb9c1;
}

.ss-map-modal__frame-wrap {
  flex: 1;
  min-height: 360px;
  border-radius: 8px;
  overflow: hidden;
  background: #f0f3f5;
}

.ss-map-modal__frame {
  width: 100%;
  height: 100%;
  min-height: 360px;
  border: 0;
}

@media (max-width: 1024px) {
  .ss-card {
    flex-direction: column;
  }

  .ss-card__photo {
    width: 100%;
    max-width: 280px;
  }
}

@media (max-width: 640px) {
  .ss-filters__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .ss-filters__map {
    margin-left: 0;
    align-self: flex-end;
  }

  .ss-page-head__title {
    font-size: 1.75rem;
  }

  .ss-search__bar {
    flex-wrap: wrap;
  }

  .ss-search__bar .ss-btn--primary {
    width: 100%;
  }
}
