+ {/* Шапка поиска: на мобильном сворачивается при скролле вниз (grid 1fr → 0fr) */}
+
+
+ {isSearchView && (
+
setSidebarOpen(v => !v)}
+ typeFilter={typeFilter}
+ onTypeFilterChange={setTypeFilter}
+ />
+ )}
+
+
- {activeNav === "home" && (
-
-
+ {activeNav === "home" && (
+ <>
+ {/* Десктоп/планшет — инлайн-мультиселект, телефон — кнопка + шторка (переключение в CSS) */}
+
+
+
+
+ >
+ )}
- )}
+
diff --git a/src/styles/layout.css b/src/styles/layout.css
index c7a51f0..ca1e908 100644
--- a/src/styles/layout.css
+++ b/src/styles/layout.css
@@ -188,12 +188,21 @@
.f-topbar-login-icon { font-size: 1.1rem; line-height: 1; }
/* ── Search Bar ── */
+/* Поле-капсула с лупой внутри — в одном стиле с .f-city-ms-control */
.f-search-bar {
position: relative;
- display: flex; align-items: center; gap: 10px;
- padding: 10px 16px;
- background: var(--bg-surface);
- border-bottom: 1px solid var(--border);
+ flex: 2; min-width: 0;
+ display: flex; align-items: center; gap: 8px;
+ padding: 0 14px;
+ min-height: 42px;
+ background: var(--bg-input);
+ border: 1px solid var(--border);
+ border-radius: 999px;
+ transition: border-color .2s, box-shadow .2s;
+}
+.f-search-bar:focus-within {
+ border-color: rgba(var(--teal-rgb), .5);
+ box-shadow: 0 0 0 3px rgba(var(--teal-rgb), .12);
}
.f-search-icon {
@@ -203,21 +212,14 @@
.f-search-input {
flex: 1; min-width: 0;
- background: var(--bg-input);
- border: 1px solid transparent;
- border-radius: 999px;
- padding: 10px 18px;
+ background: transparent;
+ border: none;
+ padding: 10px 0;
font-family: var(--font); font-size: 0.9rem;
color: var(--text-primary);
outline: none;
- transition: border-color .2s, box-shadow .2s, background .2s;
}
.f-search-input::placeholder { color: var(--muted); }
-.f-search-input:focus {
- border-color: var(--border);
- background: var(--bg-surface);
- box-shadow: 0 1px 6px rgba(0,0,0,.06);
-}
.f-search-clear {
background: none; border: none; cursor: pointer;
@@ -230,7 +232,7 @@
/* Подсказки при вводе — под полем поиска, поверх ленты */
.f-search-suggest {
position: absolute; z-index: 30;
- top: calc(100% - 4px); left: 44px; right: 16px;
+ top: calc(100% + 6px); left: 0; right: 0;
margin: 0; padding: 6px 0; list-style: none;
background: var(--bg-card-popup);
border: 1px solid var(--border);
@@ -362,15 +364,13 @@
/* ── City Multiselect ── */
.f-city-filter-wrap {
position: relative; z-index: 20;
+ flex: 1; min-width: 220px;
display: flex; align-items: center;
- padding: 10px 16px;
- border-bottom: 1px solid var(--border);
- background: var(--bg-surface);
}
.f-city-multiselect {
position: relative; flex: 1;
- width: 100%; max-width: 440px; margin: 0 auto;
+ width: 100%;
}
.f-city-ms-control {
@@ -572,7 +572,168 @@
/* Search panel — видна только во вкладке «Поиск» (на десктопе всегда) */
.f-search-panel { display: none; }
-.f-app.f-search-view .f-search-panel { display: block; }
+.f-app.f-search-view .f-search-panel { display: flex; }
+
+/* Поиск и город — одной строкой в общей полосе */
+.f-search-panel {
+ position: relative; z-index: 20;
+ gap: 8px; align-items: flex-start;
+ padding: 10px 16px;
+ background: var(--bg-surface);
+ border-bottom: 1px solid var(--border);
+}
+
+/* Обёртка шапки поиска: сворачивается по высоте через grid-template-rows
+ (1fr → 0fr) — плавно и без замеров высоты. overflow: hidden только в
+ свёрнутом виде, иначе обрезались бы подсказки и дропдауны. */
+.f-search-head {
+ position: relative; z-index: 20;
+ display: grid; grid-template-rows: 1fr;
+ transition: grid-template-rows .25s ease;
+}
+.f-search-head.is-hidden { grid-template-rows: 0fr; }
+.f-search-head-inner { min-height: 0; }
+.f-search-head.is-hidden .f-search-head-inner { overflow: hidden; }
+
+/* ── Мобильный фильтр городов: кнопка + чипы (показываются только на телефоне) ── */
+.f-city-btn,
+.f-city-chips { display: none; }
+
+.f-city-btn {
+ position: relative; flex-shrink: 0;
+ width: 42px; height: 42px;
+ align-items: center; justify-content: center;
+ border-radius: 50%;
+ background: var(--bg-input);
+ border: 1px solid var(--border);
+ color: var(--muted);
+ cursor: pointer;
+ transition: border-color .2s, color .2s;
+}
+.f-city-btn.active {
+ color: var(--teal);
+ border-color: rgba(var(--teal-rgb), .5);
+}
+.f-city-btn-badge {
+ position: absolute; top: -4px; right: -4px;
+ min-width: 18px; height: 18px; padding: 0 5px;
+ border-radius: 999px;
+ background: var(--teal); color: #fff;
+ font-size: 0.7rem; font-weight: 600; line-height: 18px;
+ text-align: center;
+}
+
+.f-city-chips {
+ flex-basis: 100%;
+ gap: 6px;
+ overflow-x: auto;
+ scrollbar-width: none;
+ margin: 0 -12px; padding: 0 12px;
+}
+.f-city-chips::-webkit-scrollbar { display: none; }
+.f-city-chip {
+ display: inline-flex; align-items: center; gap: 2px;
+ flex-shrink: 0;
+ padding: 4px 4px 4px 12px;
+ border-radius: 999px;
+ background: rgba(var(--teal-rgb), .12);
+ color: var(--teal);
+ font-size: 0.82rem; white-space: nowrap;
+}
+.f-city-chip-remove {
+ display: flex; align-items: center; justify-content: center;
+ width: 22px; height: 22px;
+ background: none; border: none; border-radius: 50%;
+ color: inherit; cursor: pointer;
+}
+
+/* ── Нижняя шторка выбора городов ── */
+.f-sheet-backdrop {
+ position: fixed; inset: 0; z-index: 90;
+ background: var(--bg-overlay);
+}
+.f-sheet {
+ position: fixed; left: 0; right: 0; bottom: 0; z-index: 91;
+ display: flex; flex-direction: column;
+ max-height: 85vh; max-height: 85dvh;
+ /* Фиксированный минимум: при фильтрации короткий список не «схлопывает» шторку */
+ min-height: 60vh; min-height: 60dvh;
+ background: var(--bg-surface-solid);
+ border-radius: 20px 20px 0 0;
+ box-shadow: 0 -8px 32px rgba(0, 0, 0, .18);
+ padding-bottom: env(safe-area-inset-bottom);
+}
+.f-sheet-grab { padding: 8px 20px 4px; touch-action: none; cursor: grab; }
+.f-sheet-handle {
+ width: 36px; height: 4px; margin: 0 auto 12px;
+ border-radius: 2px; background: var(--border);
+}
+.f-sheet-header { display: flex; align-items: center; gap: 8px; }
+.f-sheet-title {
+ margin: 0; font-family: var(--font);
+ font-size: 1.1rem; font-weight: 600; color: var(--text-primary);
+}
+.f-sheet-count {
+ min-width: 22px; height: 22px; padding: 0 7px;
+ border-radius: 999px; background: var(--teal); color: #fff;
+ font-size: 0.75rem; font-weight: 600; line-height: 22px; text-align: center;
+}
+.f-sheet-search {
+ display: flex; align-items: center; gap: 8px;
+ margin: 8px 20px;
+ padding: 0 14px; min-height: 44px;
+ background: var(--bg-input);
+ border: 1px solid var(--border);
+ border-radius: 999px;
+}
+.f-sheet-search:focus-within { border-color: rgba(var(--teal-rgb), .5); }
+.f-sheet-search-input {
+ flex: 1; min-width: 0;
+ background: transparent; border: none; outline: none;
+ font-family: var(--font);
+ font-size: 16px; /* не меньше 16px — иначе iOS Safari зумит страницу при фокусе */
+ color: var(--text-primary);
+}
+.f-sheet-search-input::placeholder { color: var(--muted); }
+.f-sheet-list {
+ flex: 1; min-height: 0;
+ overflow-y: auto; overscroll-behavior: contain;
+ padding: 0 20px;
+}
+.f-sheet-row {
+ display: flex; align-items: center; gap: 12px;
+ width: 100%; min-height: 48px;
+ background: none; border: none;
+ border-bottom: 1px solid var(--border);
+ font-family: var(--font); font-size: 1rem; color: var(--text-primary);
+ text-align: left; cursor: pointer;
+}
+.f-sheet-row:last-child { border-bottom: none; }
+.f-sheet-check {
+ display: flex; align-items: center; justify-content: center;
+ flex-shrink: 0; width: 22px; height: 22px;
+ border-radius: 6px; border: 1.5px solid var(--border);
+ color: #fff; font-size: 0.9rem;
+ transition: background .15s, border-color .15s;
+}
+.f-sheet-row.selected .f-sheet-check { background: var(--teal); border-color: var(--teal); }
+.f-sheet-row-add { color: var(--teal); }
+.f-sheet-row-add .f-sheet-check { border-color: var(--teal); color: var(--teal); }
+.f-sheet-row-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
+.f-sheet-empty { padding: 24px 0; text-align: center; color: var(--muted); font-size: 0.9rem; }
+.f-sheet-actions {
+ display: flex; gap: 10px;
+ padding: 12px 20px 16px;
+ border-top: 1px solid var(--border);
+}
+.f-sheet-btn {
+ flex: 1; height: 46px;
+ border-radius: 999px;
+ background: none; border: 1px solid var(--border);
+ font-family: var(--font); font-size: 0.95rem; font-weight: 500;
+ color: var(--text-primary); cursor: pointer;
+}
+.f-sheet-btn-primary { flex: 2; background: var(--teal); border-color: var(--teal); color: #fff; }
/* Map view */
.f-mapview {
@@ -756,7 +917,7 @@
display: none;
}
.f-search-panel {
- display: block;
+ display: flex;
}
.f-bottom-nav {
display: none;
@@ -800,9 +961,12 @@
font-size: 0.82rem;
}
- .f-city-filter-wrap { padding: 8px 12px; }
+ .f-search-panel { padding: 8px 12px; }
+ .f-search-bar { min-height: 38px; padding: 0 12px; }
+ /* 16px — минимум, при котором iOS Safari не зумит страницу при фокусе на поле */
+ .f-search-input { font-size: 16px; padding: 8px 0; }
.f-city-ms-control { padding: 5px 12px; min-height: 38px; }
- .f-city-ms-input { font-size: 0.85rem; }
+ .f-city-ms-input { font-size: 16px; }
.f-city-ms-tag { font-size: 0.75rem; padding: 2px 8px; }
.f-topbar-dropdown-menu {
@@ -813,6 +977,13 @@
}
@media (max-width: 600px) {
+ /* Телефон: поиск + круглая кнопка города в одну строку, чипы — строкой ниже */
+ .f-search-panel { flex-wrap: wrap; align-items: center; row-gap: 8px; }
+ .f-search-bar { flex: 1; min-height: 42px; }
+ .f-city-filter-wrap { display: none; }
+ .f-city-btn,
+ .f-city-chips { display: flex; }
+
.f-post-btn {
padding: 7px 10px;
font-size: 0.7rem;