/* ============================================================ BAN YARO — Layout App Shell: Mobile Bottom-Nav + Desktop Sidebar Mobile-first mit einer einzigen Media Query für Desktop ============================================================ */ /* ------------------------------------------------------------ 1. APP SHELL ------------------------------------------------------------ */ #app { display: flex; flex-direction: column; min-height: 100dvh; /* dvh: berücksichtigt mobile Browser-Chrome */ } /* Content-Bereich: füllt den Raum zwischen Header und Bottom-Nav */ #page-content { flex: 1; overflow-y: auto; overflow-x: hidden; padding-bottom: calc(var(--nav-bottom-height) + var(--safe-bottom) + 16px); } /* Desktop: Sidebar-Layout */ @media (min-width: 768px) { #app { flex-direction: row; } #page-content { padding-bottom: 0; padding-left: var(--nav-sidebar-width); } } /* ------------------------------------------------------------ 2. HEADER (Mobile) ------------------------------------------------------------ */ #app-header { position: sticky; top: 0; z-index: 100; min-height: calc(var(--header-height) + var(--safe-top)); padding-top: var(--safe-top); padding-bottom: var(--space-2); background: var(--c-surface); border-bottom: 1px solid var(--c-border-light); display: flex; align-items: center; padding-left: var(--space-4); padding-right: var(--space-4); gap: var(--space-3); box-shadow: var(--shadow-xs); } .header-title { font-size: var(--text-lg); font-weight: var(--weight-bold); color: var(--c-text); flex: 1; } /* Dog Switcher Container im Header */ #header-dog-switcher { flex: 1; display: flex; align-items: center; gap: var(--space-2); min-width: 0; overflow: visible; } .header-back { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: var(--radius-md); color: var(--c-text-secondary); cursor: pointer; transition: background var(--transition-fast); font-size: 20px; flex-shrink: 0; } .header-back:hover { background: var(--c-surface-2); } /* Hamburger-Button (nur Mobile) */ .header-menu-btn { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border: none; background: transparent; font-size: 1.3rem; color: var(--c-text); cursor: pointer; border-radius: var(--radius-md); flex-shrink: 0; -webkit-tap-highlight-color: transparent; } .header-menu-btn:hover { background: var(--c-surface-2); } /* Backdrop für mobile Sidebar */ .sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 499; } .sidebar-backdrop.visible { display: block; } /* Auf Desktop keinen mobilen Header zeigen */ @media (min-width: 768px) { #app-header { display: none; } .header-menu-btn { display: none; } .sidebar-backdrop { display: none !important; } } /* Karte: volle Höhe, kein Scrollen, kein Padding */ #page-map { height: 100%; overflow: hidden; } #page-map > .page-body { padding: 0 !important; overflow: hidden; height: 100%; } /* Gassi-Treffen + Sitting: volle Höhe, internes Scroll */ #page-walks, #page-sitting { height: 100%; overflow: hidden; } #page-walks > .page-body, #page-sitting > .page-body { padding: 0 !important; gap: 0 !important; overflow: hidden; height: 100%; } /* Routen: volle Höhe damit .rk-layout height:100% auflöst und das Grid intern scrollt (nicht die gesamte Seite via #page-content) */ #page-routes { height: 100%; overflow: hidden; } #page-routes > .page-body { padding: 0 !important; overflow: hidden; height: 100%; } /* ------------------------------------------------------------ 3. BOTTOM NAVIGATION (Mobile) ------------------------------------------------------------ */ #bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 300; min-height: calc(var(--nav-bottom-height) + var(--safe-bottom)); padding-top: var(--space-1); padding-bottom: calc(var(--safe-bottom) + var(--space-1)); background: var(--c-surface); border-top: 1px solid var(--c-border-light); display: flex; align-items: stretch; box-shadow: 0 -2px 12px rgba(42, 31, 20, 0.08); } .nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; cursor: pointer; color: var(--c-text-muted); transition: color var(--transition-fast); -webkit-tap-highlight-color: transparent; touch-action: manipulation; position: relative; padding: var(--space-2) var(--space-1); } .nav-item:hover { color: var(--c-text-secondary); } .nav-item.active { color: var(--c-primary); } /* Aktiv-Indikator oben */ .nav-item.active::before { content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 32px; height: 3px; background: var(--c-primary); border-radius: 0 0 var(--radius-full) var(--radius-full); } .nav-item-icon { font-size: 22px; line-height: 1; position: relative; filter: saturate(0.35) brightness(0.75); transition: filter var(--transition-fast); } .nav-item.active .nav-item-icon { filter: sepia(0.7) saturate(1.8) hue-rotate(-8deg) brightness(0.9); } /* Ungelesen-Badge auf Nav-Icon */ .nav-badge { position: absolute; top: -4px; right: -6px; background: var(--c-danger); color: #fff; font-size: 9px; font-weight: var(--weight-bold); min-width: 16px; height: 16px; border-radius: var(--radius-full); display: flex; align-items: center; justify-content: center; padding: 0 3px; border: 2px solid var(--c-surface); } .nav-item-label { font-size: clamp(9px, 0.6rem, 11px); font-weight: var(--weight-semibold); line-height: 1; white-space: nowrap; } /* Mittlerer + Button: kein Label, größer */ .nav-item-center .nav-item-icon { width: 50px; height: 50px; background: var(--c-primary); color: #fff; border-radius: var(--radius-full); font-size: 26px; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-md); transition: transform var(--transition-fast), box-shadow var(--transition-fast); margin-top: -12px; /* ragt über die Nav hinaus */ } .nav-item-center:active .nav-item-icon { transform: scale(0.93); box-shadow: var(--shadow-sm); } .nav-item-center.active::before { display: none; } .nav-item-center .nav-item-label { display: none; } /* Desktop: Bottom Nav ausblenden */ @media (min-width: 768px) { #bottom-nav { display: none; } } /* ------------------------------------------------------------ 4. SIDEBAR NAVIGATION (Desktop) ------------------------------------------------------------ */ #sidebar { display: none; position: fixed; top: 0; left: 0; bottom: 0; width: var(--nav-sidebar-width); z-index: 300; background: var(--c-surface); border-right: 1px solid var(--c-border-light); flex-direction: column; overflow: hidden; /* Sidebar selbst scrollt nicht */ box-shadow: var(--shadow-sm); } @media (min-width: 768px) { #sidebar { display: flex; } } /* Mobile Sidebar als Drawer */ @media (max-width: 767px) { #sidebar { display: flex !important; /* überschreibt display:none aus Base */ position: fixed; top: 0; left: 0; bottom: 0; width: var(--nav-sidebar-width); z-index: 1000; /* klar über Backdrop (999) */ transform: translateX(-100%); transition: transform 0.28s ease; background: var(--c-surface); box-shadow: none; } #sidebar.open { transform: translateX(0); box-shadow: 4px 0 24px rgba(0,0,0,0.18); } .sidebar-backdrop { z-index: 999; /* unter Sidebar, über Seiteninhalt */ } } .sidebar-logo { padding: var(--space-6) var(--space-5); display: flex; align-items: center; gap: var(--space-3); border-bottom: 1px solid var(--c-border-light); flex-shrink: 0; } .sidebar-logo-img { width: 36px; height: 36px; border-radius: var(--radius-full); object-fit: cover; } .sidebar-logo-text { font-size: var(--text-lg); font-weight: var(--weight-bold); color: var(--c-text); } .sidebar-add { padding: var(--space-4) var(--space-4) var(--space-2); flex-shrink: 0; } .sidebar-nav { flex: 1; padding: var(--space-2) var(--space-2) var(--space-4); display: flex; flex-direction: column; gap: var(--space-1); overflow-y: auto; min-height: 0; /* wichtig: flex-child darf kleiner werden als Inhalt */ /* Firefox */ scrollbar-width: thin; scrollbar-color: var(--c-primary) var(--c-surface); } .sidebar-nav::-webkit-scrollbar { width: 6px; } .sidebar-nav::-webkit-scrollbar-track { background: var(--c-surface); } .sidebar-nav::-webkit-scrollbar-thumb { background: var(--c-primary); border-radius: 3px; } .sidebar-nav::-webkit-scrollbar-thumb:hover { background: var(--c-primary-dark); } .sidebar-section-label { font-size: var(--text-xs); font-weight: var(--weight-semibold); color: var(--c-text-muted); text-transform: uppercase; letter-spacing: 0.08em; padding: var(--space-3) var(--space-3) var(--space-1); margin-top: var(--space-2); } .sidebar-item { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3); border-radius: var(--radius-md); cursor: pointer; color: var(--c-text-secondary); font-size: var(--text-sm); font-weight: var(--weight-medium); transition: background var(--transition-fast), color var(--transition-fast); -webkit-tap-highlight-color: transparent; } .sidebar-item:hover { background: var(--c-bg); color: var(--c-text); } .sidebar-item.active { background: var(--c-primary-subtle); color: var(--c-primary-dark); font-weight: var(--weight-semibold); } /* User-Eintrag bekommt nie den Active-Stil */ .sidebar-item--user.active { background: transparent; color: var(--c-text-secondary); font-weight: var(--weight-medium); } .sidebar-item-icon { font-size: 18px; width: 24px; text-align: center; flex-shrink: 0; filter: saturate(0.35) brightness(0.75); transition: filter var(--transition-fast); } .sidebar-item.active .sidebar-item-icon { filter: sepia(0.7) saturate(1.8) hue-rotate(-8deg) brightness(0.9); } .sidebar-item-badge { margin-left: auto; background: var(--c-danger); color: #fff; font-size: var(--text-xs); font-weight: var(--weight-bold); min-width: 20px; height: 20px; border-radius: var(--radius-full); display: flex; align-items: center; justify-content: center; padding: 0 var(--space-1); } /* sidebar-footer entfernt — Einstellungen/Konto sind jetzt Teil der scrollbaren Nav */ /* ------------------------------------------------------------ 5. PAGE WRAPPER (inneres Layout der Seiten) ------------------------------------------------------------ */ .page { display: none; flex-direction: column; min-height: 100%; } .page.active { display: flex; } /* Scrollbarer Seiteninhalt */ .page-body { flex: 1; padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-4); } /* Volle Breite mit seitlichem Limit für Desktop */ .page-container { width: 100%; max-width: 680px; margin: 0 auto; } /* Wide-Layout für Karte und ähnliches */ .page-container-wide { width: 100%; max-width: 1040px; margin: 0 auto; } /* Karte nimmt vollen Platz ein */ .page-fullscreen { position: absolute; inset: 0; padding: 0; } /* ------------------------------------------------------------ 6. PULL-TO-REFRESH INDIKATOR ------------------------------------------------------------ */ .ptr-indicator { display: flex; justify-content: center; align-items: center; height: 48px; color: var(--c-text-muted); font-size: var(--text-sm); gap: var(--space-2); overflow: hidden; max-height: 0; transition: max-height var(--transition-normal); } .ptr-indicator.visible { max-height: 48px; } /* ------------------------------------------------------------ 7. RESPONSIVE GRID ------------------------------------------------------------ */ .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); } .grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: var(--space-3); } @media (max-width: 400px) { .grid-3 { grid-template-columns: 1fr 1fr; } } /* ============================================================ Phosphor Icons — SVG Sprite ============================================================ */ .ph-icon { width: 20px; height: 20px; display: inline-block; vertical-align: middle; fill: currentColor; flex-shrink: 0; } .nav-item .ph-icon { width: 24px; height: 24px; } .nav-item-center .ph-icon { width: 22px; height: 22px; } .header-menu-btn .ph-icon { width: 22px; height: 22px; }