Files
Huntarr.io/frontend/static/css/mobile.css
2026-02-14 23:22:47 -05:00

302 lines
8.8 KiB
CSS

/*
* Huntarr Mobile CSS
* Modern hamburger-drawer navigation — no persistent sidebar on mobile.
*/
/* ===============================================================
MOBILE TOPBAR (.mtb)
=============================================================== */
.mtb { display: none; } /* hidden on desktop */
@media (max-width: 768px) {
.mtb {
display: block;
position: sticky;
top: 0;
z-index: 200;
background: linear-gradient(135deg, rgba(22,30,44,.98), rgba(15,22,35,.98));
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
border-bottom: 1px solid rgba(255,255,255,.04);
box-shadow: 0 2px 12px rgba(0,0,0,.3);
}
.mtb-inner {
display: flex;
align-items: center;
justify-content: space-between;
height: 48px;
padding: 0 12px;
}
.mtb-left {
display: flex;
align-items: center;
gap: 10px;
min-width: 0;
}
.mtb-right {
display: flex;
align-items: center;
gap: 8px;
flex-shrink: 0;
}
/* Hamburger button */
.mtb-hamburger {
display: flex;
flex-direction: column;
justify-content: center;
gap: 4px;
width: 32px;
height: 32px;
padding: 6px;
background: none;
border: none;
cursor: pointer;
-webkit-tap-highlight-color: transparent;
border-radius: 6px;
transition: background .15s;
}
.mtb-hamburger:active { background: rgba(255,255,255,.08); }
.mtb-hamburger span {
display: block;
width: 18px;
height: 2px;
background: #c8d0dc;
border-radius: 1px;
transition: .2s;
}
/* Logo link */
.mtb-logo-link {
display: flex;
align-items: center;
flex-shrink: 0;
}
.mtb-logo {
border-radius: 6px;
}
/* Page title */
.mtb-title {
font-size: 15px;
font-weight: 700;
color: #e8ecf2;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
letter-spacing: .3px;
}
/* Topbar chips (stars, version) */
.mtb-chip {
display: inline-flex;
align-items: center;
gap: 4px;
height: 24px;
padding: 0 7px;
border-radius: 12px;
font-size: 11px;
font-weight: 700;
text-decoration: none;
border: 1px solid transparent;
white-space: nowrap;
}
.mtb-chip i { font-size: 9px; opacity: .8; }
.mtb-chip-stars {
background: rgba(255,193,7,.1);
border-color: rgba(255,193,7,.25);
color: #f5d060;
}
.mtb-chip-stars i { color: #ffd700; }
/* Icon buttons (Discord, Reddit, Docs, Heart) */
.mtb-icon-btn {
display: flex;
align-items: center;
justify-content: center;
width: 28px;
height: 28px;
border-radius: 50%;
text-decoration: none;
transition: background .15s, transform .15s;
font-size: 13px;
}
.mtb-icon-btn:active { transform: scale(.9); }
.mtb-discord {
color: #5865f2;
background: rgba(88,101,242,.1);
}
.mtb-discord:hover { background: rgba(88,101,242,.2); color: #7289da; }
.mtb-reddit {
color: #ff4500;
background: rgba(255,69,0,.1);
}
.mtb-reddit:hover { background: rgba(255,69,0,.2); color: #ff6633; }
.mtb-docs {
color: #6366f1;
background: rgba(99,102,241,.1);
}
.mtb-docs:hover { background: rgba(99,102,241,.2); color: #818cf8; }
.mtb-heart {
color: #ef4444;
background: rgba(231,76,60,.1);
}
.mtb-heart:hover { background: rgba(231,76,60,.2); color: #ff6b6b; }
/* Accent line */
.mtb-accent {
height: 2px;
background: linear-gradient(90deg, rgba(99, 102, 241, 0.15), #818cf8, #818cf8, #818cf8, rgba(99, 102, 241, 0.15));
opacity: .8;
}
}
/* ===============================================================
MOBILE: hamburger opens desktop sidebar (no separate mobile menu)
=============================================================== */
.mobile-sidebar-backdrop { display: none; }
@media (max-width: 768px) {
/* Backdrop when desktop sidebar is open */
.mobile-sidebar-backdrop {
display: block;
position: fixed;
inset: 0;
z-index: 998;
background: rgba(0,0,0,.55);
opacity: 0;
pointer-events: none;
transition: opacity .25s ease;
}
body.mobile-sidebar-open .mobile-sidebar-backdrop {
opacity: 1;
pointer-events: auto;
}
/* Desktop sidebar slides in from left — same menu as desktop */
.app-container > .sidebar-wrapper {
position: fixed !important;
top: 0;
left: 0;
bottom: 0;
width: 260px;
max-width: 85vw;
z-index: 999;
transform: translateX(-100%);
transition: transform .28s cubic-bezier(.4,0,.2,1);
box-shadow: 4px 0 24px rgba(0,0,0,.5);
}
body.mobile-sidebar-open .app-container > .sidebar-wrapper {
transform: translateX(0);
}
body.mobile-sidebar-open { overflow: hidden; }
/* Full desktop-style sidebar when open — text labels visible, not icon-only */
body.mobile-sidebar-open .app-container > .sidebar-wrapper .sidebar {
width: 100% !important;
min-width: 0;
}
body.mobile-sidebar-open .app-container > .sidebar-wrapper .sidebar h1,
body.mobile-sidebar-open .app-container > .sidebar-wrapper .nav-item span,
body.mobile-sidebar-open .app-container > .sidebar-wrapper .switch-label {
display: block !important;
}
/* ===== FULL-WIDTH CONTENT ===== */
.app-container {
display: flex;
flex-direction: column !important;
}
.main-content {
margin-left: 0 !important;
width: 100% !important;
flex: 1;
display: flex;
flex-direction: column;
min-height: 0;
}
/* ===== HIDE DESKTOP TOPBAR ===== */
.top-bar {
display: none !important;
}
/* ===== CONTENT SECTIONS ===== */
.content-section {
flex: 1;
overflow-y: auto;
padding: 12px;
box-sizing: border-box;
}
.content-section.active {
display: flex;
flex-direction: column;
}
}
/* ===== SMALL PHONES ===== */
@media (max-width: 480px) {
.mtb-inner { height: 44px; padding: 0 8px; }
.mtb-title { font-size: 13px; }
.mtb-right { gap: 4px; }
.mtb-chip { padding: 0 5px; font-size: 10px; height: 22px; }
.mtb-chip i { font-size: 8px; }
.mtb-icon-btn { width: 26px; height: 26px; font-size: 12px; }
.app-container > .sidebar-wrapper { width: 240px; }
}
@media (max-width: 380px) {
/* Very small: hide stars + social icons to save space */
.mtb-chip-stars { display: none; }
.mtb-discord, .mtb-reddit { display: none; }
}
/* ═══════════════════════════════════════════════════════════════════
RESPONSIVE — section header consistency, Swaparr mobile (merged from responsive-fix)
═══════════════════════════════════════════════════════════════════ */
.section-header {
display: flex !important;
justify-content: space-between !important;
align-items: center !important;
flex-wrap: wrap !important;
background-color: transparent !important;
border-radius: 0 !important;
padding: 15px 0 !important;
margin-bottom: 20px !important;
box-shadow: none !important;
border: none !important;
}
@media (max-width: 768px) {
.main-content {
margin-left: 0 !important;
width: 100% !important;
}
/* Swaparr mobile: force vertical layout */
.app-stats-card.swaparr .stats-numbers {
display: grid !important;
grid-template-columns: 1fr !important;
grid-template-rows: repeat(4, auto) !important;
gap: 10px !important;
max-width: 300px !important;
margin: 0 auto 20px auto !important;
flex-direction: initial !important;
justify-content: initial !important;
}
.app-stats-card.swaparr .stat-box {
padding: 15px !important;
background: rgba(26, 32, 44, 0.5) !important;
border-radius: 10px !important;
border: 1px solid rgba(120, 140, 180, 0.2) !important;
transition: all 0.3s ease !important;
width: 100% !important;
box-sizing: border-box !important;
}
.app-stats-card.swaparr .stat-box:hover {
border-color: rgba(120, 140, 180, 0.4) !important;
background: rgba(26, 32, 44, 0.7) !important;
}
}