feat(ui): improve mobile search and consolidate language selector

- On mobile (≤768px), replace the full search bar in the topbar with a
  search icon button; tapping it expands a full-width search overlay
  with a back arrow to collapse (Google Drive-style pattern)
- Escape key also collapses the mobile search overlay
- Hide the redundant inline search icon when the mobile search bar is
  active (submit button already has one)
- Move the language selector from the topbar into the user menu for all
  screen sizes, reducing topbar clutter; it renders as an accordion row
  matching other menu items
- Fix user menu positioning in RTL layouts (Arabic/Persian): anchor to
  left:0 instead of right:0 so the panel opens inward rather than
  off-screen
This commit is contained in:
Kamil Alekberov
2026-05-17 18:33:39 +05:00
committed by Unrepresented
parent 9aef9ea787
commit fe0a8c7f72
5 changed files with 199 additions and 13 deletions
+68 -1
View File
@@ -1,7 +1,6 @@
/* Language Selector - Custom Dropdown */
.language-selector {
position: relative;
margin-right: 15px;
}
.language-selector-toggle {
@@ -108,3 +107,71 @@
.language-option.active .lang-check {
opacity: 1;
}
/* ── Language selector inside user menu ── */
.user-menu .language-selector {
width: 100%;
}
/* Match user-menu-item appearance exactly */
.user-menu .language-selector-toggle {
width: 100%;
background: none !important;
border: none !important;
border-radius: 0 !important;
box-shadow: none !important;
outline: none !important;
padding: 12px 20px;
gap: 12px;
color: var(--color-text-dark);
font-size: 14px;
cursor: pointer;
}
.user-menu .language-selector-toggle:hover,
.user-menu .language-selector-toggle:focus {
background: var(--color-bg-hover) !important;
border: none !important;
outline: none !important;
}
.user-menu .language-selector-toggle i.fa-globe {
width: 20px;
text-align: center;
font-size: 15px;
color: var(--color-text-subtle);
}
.user-menu .language-selector-toggle .lang-code {
font-weight: 500;
font-size: 13px;
color: var(--color-text-dark);
}
/* Inline accordion — no floating */
.user-menu .language-selector-dropdown {
position: static !important;
box-shadow: none !important;
border: none !important;
border-top: 1px solid var(--color-border-light);
border-radius: 0 !important;
background: var(--color-bg-muted);
max-height: 0;
overflow: hidden;
opacity: 1 !important;
visibility: visible !important;
transform: none !important;
transition: max-height 0.25s ease;
z-index: auto !important;
}
.user-menu .language-selector.open .language-selector-dropdown {
max-height: 260px;
overflow-y: auto;
}
/* Language options inside user menu — compact rows */
.user-menu .language-option {
padding: 10px 20px 10px 28px;
font-size: 13.5px;
}