/* ══════════════════════════════════════════════════════════════════════════════
   ЭКРАН КАТЕГОРИИ (Кошки и др.)
   ══════════════════════════════════════════════════════════════════════════════ */
#screen-cats {
  background: #F3F4F6;
  flex-direction: column;
  align-items: stretch;
  overflow: hidden;
}

/* Заголовок экрана */
.cat-screen-header {
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 54px 16px 14px;
  
}
.cat-back-btn {
  background: none; border: none;
  cursor: pointer; padding: 0;
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
}
.cat-screen-title {
  font-size: 17px; font-weight: 700; color: #000000;
}

/* Фильтры */
.cat-filters-wrap {
  background: #FFFFFF;
  padding: 0 0 12px;
  
}
.cat-filters {
  display: flex;
  gap: 8px;
  padding: 0 16px;
  overflow-x: auto;
}
.cat-filters::-webkit-scrollbar { display: none; }
.cat-filter-btn {
  white-space: nowrap;
  background: #F2F2F7;
  border: none;
  border-radius: 20px;
  padding: 7px 16px;
  font-family: var(--font);
  font-size: 13px; font-weight: 500;
  color: #000000;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.cat-filter-btn.active {
  background: #635CFB;
  color: #FFFFFF;
}

/* Список карточек */
.cat-list {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overscroll-behavior-y: none;
}
.cat-list::-webkit-scrollbar { display: none; }

/* Карточка объявления */
.cat-ad-card {
  background: #FFFFFF;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  position: relative;
}
.cat-ad-img {
  width: 76px; height: 76px;
  border-radius: 12px;
  object-fit: cover;
  
}
.cat-ad-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.cat-ad-price {
  font-size: 16px; font-weight: 700; color: #000000;
}
.cat-price-free {
  color: #34C759;
}
.cat-ad-name {
  font-size: 14px; font-weight: 400; color: #000000;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cat-ad-meta {
  font-size: 12px; color: #8E8E93;
}
.cat-ad-fav {
  background: none; border: none;
  padding: 4px; cursor: pointer;
  display: flex; align-items: center;
  
}
.cat-ad-fav:active svg path { stroke: #FF3B30; }

/* ── Шапка экрана Кошки ─────────────────────────────────────────────────────── */
#screen-cats {
  width: 100%;
  left: 0;
  right: 0;
  background: #F2F2F7;
  flex-direction: column;
  align-items: stretch;
  overflow: hidden;
}
/* Белая карточка сверху (как в Container.svg) */
.cats-top-card {
  background: #FFFFFF;
  border-radius: 0 0 8px 8px;
  padding: 16px 12px 12px;
  padding-top: 12px;
  
  display: flex;
  flex-direction: column;
  gap: 3px;
  box-shadow: none;
}
body.platform-ios .cats-top-card,
body.platform-android .cats-top-card {
  padding-top: max(
    calc(env(safe-area-inset-top, 0px) * 1.3 + 24px),
    calc(var(--tg-content-safe-area-inset-top, 0px) * 1.3 + 24px)
  );
}
/* Строка поиска — pin | input | equalizer */
.cats-search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  padding: 0;
  height: 44px;
}
.cats-search-input {
  border: none; background: transparent;
  font-family: var(--font); font-size: 15px; color: #000000;
  flex: 1; outline: none;
}
.cats-search-input::placeholder { color: #AEAEB2; }
.cats-city-text {
  flex: 1;
  font-family: var(--font);
  font-size: 15px; font-weight: 600;
  color: #000000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cats-city-sub {
  font-weight: 400;
  color: #AEAEB2;
}
/* Ряд чипов-фильтров */
.cats-chips-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}
.cats-chips-row::-webkit-scrollbar { display: none; }
.cats-chip {
  display: flex; align-items: center; gap: 4px;
  white-space: nowrap;
  background: #F2F2F7;
  border: none;
  border-radius: 8px;
  padding: 5px 10px;
  font-family: var(--font);
  font-size: 13px; font-weight: 500;
  color: #000000;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.cats-chip.active {
  background: #635CFB;
  color: #FFFFFF;
}
/* Тело экрана */
.cats-body {
  flex: 1;
  overflow-y: auto;
  background: #FFFFFF;
  border-top: none;
  margin-top: 4px;
  border-radius: 8px 8px 0 0;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
  overscroll-behavior-y: none;
}
.cats-body::-webkit-scrollbar {
  display: none; /* Webkit */
}
.cats-sort-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 12px 12px;
  background: #FFFFFF;
}

.cats-ads-count {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 400;
  color: #000000;
}
.cats-sort-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}
.cats-sort-label {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 400;
  color: #8E8E93;
}
.cats-sort-value {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 400;
  color: #635CFB;
}

/* Figma node 3636:88 — matching mates screen */
.mating-matches-screen { flex-direction: column; align-items: stretch; justify-content: flex-start; background: #F3F4F6; overflow: hidden; }
.mating-matches-header { display: flex; align-items: center; justify-content: center; height: 48px; min-height: 48px; padding: 0 12px; background: #FFF; border-radius: 0 0 8px 8px; }
body.tg-active.platform-ios .mating-matches-header,
body.tg-active.platform-android .mating-matches-header {
  height: max(
    120px,
    calc(env(safe-area-inset-top, 0px) + 48px),
    calc(var(--tg-content-safe-area-inset-top, 0px) + 48px)
  );
  min-height: 120px;
  padding-top: max(
    72px,
    env(safe-area-inset-top, 0px),
    var(--tg-content-safe-area-inset-top, 0px)
  );
}

/* Some iOS Telegram versions report a zero content-safe-area inset while
   their native back/menu controls still overlap the Web App. Reserve the
   required space explicitly so the screen title stays below those controls. */
body.tg-active.platform-ios .mating-matches-header {
  height: max(
    128px,
    calc(env(safe-area-inset-top, 0px) + 48px),
    calc(var(--tg-content-safe-area-inset-top, 0px) + 48px)
  );
  padding-top: max(
    80px,
    env(safe-area-inset-top, 0px),
    var(--tg-content-safe-area-inset-top, 0px)
  );
}
.mating-matches-title { overflow: hidden; padding: 0 8px; color: #000; font-size: 16px; font-weight: 600; line-height: 20px; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.mating-matches-content { flex: 1; overflow-y: auto; padding: 12px 12px 24px; background: #FFF; border-radius: 8px; margin-top: 4px; -webkit-overflow-scrolling: touch; }
.mating-matches-summary { margin-bottom: 14px; color: #000; font-size: 14px; font-weight: 500; line-height: 18px; }
.mating-matches-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 8px; }
.mating-match-card { min-width: 0; cursor: pointer; }
.mating-match-photo-wrap { position: relative; height: 148px; overflow: hidden; border-radius: 16px; background: #F2F2F7; }
.mating-match-photo { display: block; width: 100%; height: 100%; object-fit: cover; }
.mating-match-score { position: absolute; top: 0; left: 0; padding: 4px 6px; border-radius: 16px 0 12px 0; background: #34C759; color: #FFF; font-size: 10px; font-weight: 500; line-height: 17px; }
.mating-match-favorite { position: absolute; top: 8px; right: 8px; display: flex; width: 32px; height: 32px; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 50%; background: #FFF; color: #000; cursor: pointer; }
.mating-match-favorite.active { color: #635CFB; }
.mating-match-favorite.active svg { fill: currentColor; }
.mating-match-name { overflow: hidden; margin-top: 9px; color: #000; font-size: 16px; font-weight: 700; line-height: 18px; text-overflow: ellipsis; white-space: nowrap; }
.mating-match-meta { overflow: hidden; margin-top: 4px; color: #000; font-size: 14px; font-weight: 400; line-height: 18px; text-overflow: ellipsis; white-space: nowrap; }
.mating-match-location, .mating-match-date { overflow: hidden; color: #8E8E93; font-size: 12px; font-weight: 400; line-height: 18px; text-overflow: ellipsis; white-space: nowrap; }
.mating-match-location { margin-top: 8px; }
.mating-matches-empty { grid-column: 1 / -1; padding: 32px 12px; color: #8E8E93; font-size: 14px; text-align: center; }
.mating-notifications-prompt { display: flex; align-items: center; gap: 8px; width: calc(100% - 24px); margin: 8px 12px 12px; padding: 8px 10px; border: 0; border-radius: 16px; background: rgba(99, 92, 251, .12); text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.mating-notifications-prompt.is-loading { opacity: .72; pointer-events: none; }
.mating-notifications-prompt.is-enabled { cursor: default; background: rgba(52, 199, 89, .12); }
.mating-notifications-prompt.is-enabled .mating-notifications-icon { background: rgba(52, 199, 89, .14); }
.mating-notifications-prompt.is-enabled .mating-notifications-icon svg path { stroke: #34C759; }
.mating-notifications-icon { display: flex; width: 48px; height: 48px; flex: 0 0 48px; align-items: center; justify-content: center; border-radius: 50%; background: rgba(99, 92, 251, .12); }
.mating-notifications-copy { min-width: 0; flex: 1; }
.mating-notifications-title { color: #000; font-size: 12px; font-weight: 600; line-height: 16px; }
.mating-notifications-text { color: #8E8E93; font-size: 12px; font-weight: 400; line-height: 14px; }

