diff --git a/frontend/theme-f7.css b/frontend/theme-f7.css index 7329f40..cb47baa 100644 --- a/frontend/theme-f7.css +++ b/frontend/theme-f7.css @@ -1,139 +1,172 @@ -/* Framework7 Swipe layout (html[data-layout="f7-swipe"]). - Keeps the classic look; only the Framework7 swipeout / sheet mechanics are - styled here, with the app's own tokens instead of Framework7's stylesheet. */ +/* Framework7 Swipe layout: iOS navigation and grouped media lists, built on + the app's existing theme tokens. Every rule stays inside this layout. */ +html[data-layout="f7-swipe"] { + --f7-group-bg: color-mix(in srgb, var(--bg-1) 94%, var(--text) 6%); + --f7-hairline: color-mix(in srgb, var(--line) 65%, transparent); + --f7-glass: color-mix(in srgb, var(--bg-1) 82%, transparent); + --f7-radius: 16px; + color-scheme: dark; +} +html[data-layout="f7-swipe"][data-theme="light"] { color-scheme: light; } +html[data-layout="f7-swipe"] body { background: var(--bg); } -/* ---- Swipeout rows ---- */ -[data-layout="f7-swipe"] .cards li.f7s-row { - list-style: none; +/* Translucent navigation and iOS-style section titles. */ +html[data-layout="f7-swipe"] .topbar { position: relative; - overflow: hidden; - border-radius: 12px; - transform-style: preserve-3d; - touch-action: pan-y; + z-index: 15; + background: var(--f7-glass); + border-bottom: 1px solid var(--f7-hairline); + -webkit-backdrop-filter: saturate(180%) blur(22px); + backdrop-filter: saturate(180%) blur(22px); } -[data-layout="f7-swipe"] .f7s-row > .swipeout-content { - position: relative; - z-index: 10; - background: var(--bg); - transition: background 0.16s, border-color 0.16s; +html[data-layout="f7-swipe"] .list-header { padding: 18px 20px 10px; } +html[data-layout="f7-swipe"] .list-title-row h2 { + font: 700 32px/1.12 var(--ui, system-ui, sans-serif); + letter-spacing: -.035em; } -[data-layout="f7-swipe"] .f7s-row.swipeout-active > .swipeout-content, -[data-layout="f7-swipe"] .f7s-row.swipeout-opened > .swipeout-content { - background: var(--bg-2); - border-color: var(--line); +html[data-layout="f7-swipe"] .list-sub { color: var(--text-dim); } +html[data-layout="f7-swipe"] .list-actions button, +html[data-layout="f7-swipe"] .list-actions .btn { + min-height: 38px; border-radius: 999px; } -[data-layout="f7-swipe"] .f7s-row.swipeout-transitioning > .swipeout-content, -[data-layout="f7-swipe"] .f7s-row.swipeout-transitioning .f7s-act { - transition-duration: 0.3s; - transition-property: transform, left, width, background-color; + +/* Inset grouped rows: one quiet container, hairlines between items. */ +html[data-layout="f7-swipe"] .cards { + gap: 0; + margin: 4px 16px 28px; + padding: 0; + overflow: auto; + border: 1px solid var(--f7-hairline); + border-radius: var(--f7-radius); + background: var(--f7-group-bg); +} +html[data-layout="f7-swipe"] .cards li.f7s-row { + list-style: none; position: relative; overflow: hidden; + transform-style: preserve-3d; touch-action: pan-y; +} +html[data-layout="f7-swipe"] .f7s-row > .swipeout-content { + position: relative; z-index: 10; background: transparent; + transition: background .16s, border-color .16s; +} +html[data-layout="f7-swipe"] .cards .card { + min-height: 88px; padding: 10px 12px; border: 0; + border-radius: 0; border-bottom: 1px solid var(--f7-hairline); + background: transparent; box-shadow: none; +} +html[data-layout="f7-swipe"] .cards .card:last-child { border-bottom: 0; } +html[data-layout="f7-swipe"] .cards .card:hover, +html[data-layout="f7-swipe"] .cards .card.playing { background: color-mix(in srgb, var(--bg-2) 76%, transparent); } +html[data-layout="f7-swipe"] .cards .card.playing::after { display: none; } +html[data-layout="f7-swipe"] .cards .card-menu, +html[data-layout="f7-swipe"] .cards .card-del { + width: 40px; height: 40px; min-width: 40px; border: 0; + border-radius: 50%; background: transparent; color: var(--text-dim); +} +html[data-layout="f7-swipe"] .f7s-row.swipeout-active > .swipeout-content, +html[data-layout="f7-swipe"] .f7s-row.swipeout-opened > .swipeout-content { background: var(--bg-2); } +html[data-layout="f7-swipe"] .f7s-row.swipeout-transitioning > .swipeout-content, +html[data-layout="f7-swipe"] .f7s-row.swipeout-transitioning .f7s-act { + transition-duration: .3s; transition-property: transform, left, width, background-color; transition-timing-function: var(--ease, ease); } -[data-layout="f7-swipe"] .f7s-row .swipeout-actions-left, -[data-layout="f7-swipe"] .f7s-row .swipeout-actions-right { - position: absolute; - top: 0; - height: 100%; - display: flex; - align-items: center; - gap: 8px; - padding: 0 10px; - direction: ltr; +html[data-layout="f7-swipe"] .f7s-row .swipeout-actions-left, +html[data-layout="f7-swipe"] .f7s-row .swipeout-actions-right { + position: absolute; top: 0; height: 100%; display: flex; align-items: center; + gap: 8px; padding: 0 10px; direction: ltr; } -[data-layout="f7-swipe"] .f7s-row .swipeout-actions-left { left: 0; } -[data-layout="f7-swipe"] .f7s-row .swipeout-actions-right { right: 0; } -[data-layout="f7-swipe"] .f7s-act { - position: relative; - left: 0; - transform: scale(0); - border: 1px solid var(--line, transparent); - border-radius: 999px; - padding: 10px 16px; - font: inherit; - font-size: 13px; - font-weight: 600; - color: var(--text); - background: var(--bg-3); - cursor: pointer; - white-space: nowrap; - text-decoration: none; - user-select: none; -} -[data-layout="f7-swipe"] .swipeout-actions-left .f7s-act { background: var(--accent); border-color: var(--accent); color: #fff; } -[data-layout="f7-swipe"] .f7s-act.f7s-danger { background: var(--accent-deep); border-color: var(--accent-deep); color: #fff; } -[data-layout="f7-swipe"] .f7s-row.swipeout-overswipe-active .f7s-danger { box-shadow: 0 0 0 3px var(--accent-glow); } -/* Swipe replaces the hover-only row buttons on touch screens. */ -@media (hover: none) { - [data-layout="f7-swipe"] .f7s-row .card-del { display: none; } +html[data-layout="f7-swipe"] .f7s-row .swipeout-actions-left { left: 0; } +html[data-layout="f7-swipe"] .f7s-row .swipeout-actions-right { right: 0; } +html[data-layout="f7-swipe"] .f7s-act { + position: relative; left: 0; transform: scale(0); min-height: 44px; + border: 0; border-radius: 999px; padding: 10px 16px; font-family: inherit; font-size: 13px; font-weight: 600; + color: var(--text); background: var(--bg-3); cursor: pointer; + white-space: nowrap; text-decoration: none; user-select: none; } +html[data-layout="f7-swipe"] .swipeout-actions-left .f7s-act { background: var(--accent); color: var(--on-accent, #fff); } +html[data-layout="f7-swipe"] .f7s-act.f7s-danger { background: var(--danger-bg, var(--accent-deep)); color: var(--danger-text, #fff); } +html[data-layout="f7-swipe"] .f7s-row.swipeout-overswipe-active .f7s-danger { box-shadow: 0 0 0 3px var(--accent-glow); } +@media (hover: none) { html[data-layout="f7-swipe"] .f7s-row .card-del { display: none; } } -/* ---- Up next sheet ---- */ -.sheet-backdrop { - position: fixed; - inset: 0; - z-index: 11000; - background: rgba(0, 0, 0, 0.45); - opacity: 0; - visibility: hidden; - pointer-events: none; - transition: opacity 0.3s, visibility 0.3s; +/* Compact segmented glass control used by the video/audio choice. */ +html[data-layout="f7-swipe"] .stg-seg { + padding: 3px; gap: 2px; border-radius: 999px; + background: color-mix(in srgb, var(--bg-1) 78%, transparent); + border: 1px solid var(--f7-hairline); backdrop-filter: blur(14px); } -.sheet-backdrop.backdrop-in { opacity: 1; visibility: visible; pointer-events: auto; } -.f7s-sheet { - --f7-sheet-transition-duration: 300ms; - position: fixed; - left: 0; - right: 0; - bottom: 0; - z-index: 12500; - display: none; - height: min(85vh, 720px); - overflow: hidden; - box-sizing: border-box; - border-radius: 18px 18px 0 0; - border: 1px solid var(--line, transparent); - border-bottom: 0; - background: var(--bg-1); - color: var(--text); - box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.45); - transform: translate3d(0, 100%, 0); - transition-property: transform; - transition-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1); - will-change: transform; +html[data-layout="f7-swipe"] .stg-seg button { min-height: 36px; border-radius: 999px; } + +/* iOS tab bar: translucent, with a restrained active tint. */ +html[data-layout="f7-swipe"] .bottom-nav { + background: var(--f7-glass); border-top: 1px solid var(--f7-hairline); + -webkit-backdrop-filter: saturate(180%) blur(24px); + backdrop-filter: saturate(180%) blur(24px); padding-bottom: env(safe-area-inset-bottom); } -.f7s-sheet.modal-in, .f7s-sheet.modal-out { transition-duration: var(--f7-sheet-transition-duration); } -.f7s-sheet.not-animated { transition-duration: 0s; } -.f7s-sheet.modal-in { display: block; transform: translate3d(0, 0, 0); } -.f7s-sheet.modal-in-breakpoint, .f7s-sheet.modal-in-swipe-step { - display: block; - transform: translate3d(0, var(--f7-sheet-breakpoint, var(--f7-sheet-swipe-step, 0)), 0); +html[data-layout="f7-swipe"] .bottom-nav-btn { color: var(--text-dim); } +html[data-layout="f7-swipe"] .bottom-nav-btn.active { + color: var(--accent); background: transparent; } -.f7s-sheet.modal-out { transform: translate3d(0, 100%, 0); } -.f7s-sheet .sheet-modal-inner { height: 100%; display: flex; flex-direction: column; } -.f7s-grab { flex: none; height: 22px; display: grid; place-items: center; cursor: grab; touch-action: none; } -.f7s-grab::before { content: ''; width: 40px; height: 5px; border-radius: 3px; background: var(--text-dim); opacity: 0.6; } -.f7s-sheet-head { flex: none; padding: 0 18px 10px; font-weight: 700; font-size: 15px; touch-action: none; } -.f7s-sheet-list { flex: 1; overflow-y: auto; margin: 0; padding: 0 10px 16px; list-style: none; } -.f7s-up { display: flex; gap: 12px; align-items: center; padding: 8px; border-radius: 12px; cursor: pointer; } -.f7s-up:active, .f7s-up:hover { background: var(--bg-2); } -.f7s-up img { width: 88px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; flex: none; background: var(--bg-3); } -.f7s-up-info { min-width: 0; } -.f7s-up-title { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; } -.f7s-up-ch { font-size: 12px; color: var(--text-dim); margin-top: 4px; } -.f7s-empty { color: var(--text-dim); padding: 12px 8px; margin: 0; } +html[data-layout="f7-swipe"] .bottom-nav-btn.active .bottom-nav-icon { transform: none; } + +/* The mini-player reads as a floating sheet above the tab bar. */ +html[data-layout="f7-swipe"] .mini-bar { + left: 10px; right: 10px; bottom: calc(64px + env(safe-area-inset-bottom) + 8px); + overflow: hidden; border: 1px solid var(--f7-hairline); border-radius: 16px; + background: var(--f7-glass); box-shadow: 0 8px 28px rgb(0 0 0 / .18); + -webkit-backdrop-filter: saturate(180%) blur(22px); + backdrop-filter: saturate(180%) blur(22px); +} +html[data-layout="f7-swipe"] .mini-bar-inner { border: 0; background: transparent; } +html[data-layout="f7-swipe"] .mini-btn { border-radius: 50%; } +html[data-layout="f7-swipe"] .mini-progress { height: 2px; } + +/* ---- Up next sheet ---- */ +html[data-layout="f7-swipe"] .sheet-backdrop { + position: fixed; inset: 0; z-index: 11000; background: rgb(0 0 0 / .42); + opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .3s, visibility .3s; +} +html[data-layout="f7-swipe"] .sheet-backdrop.backdrop-in { opacity: 1; visibility: visible; pointer-events: auto; } +html[data-layout="f7-swipe"] .f7s-sheet { + --f7-sheet-transition-duration: 300ms; + position: fixed; left: 0; right: 0; bottom: 0; z-index: 12500; display: none; + height: min(85dvh, 720px); overflow: hidden; box-sizing: border-box; + border-radius: 18px 18px 0 0; border: 1px solid var(--f7-hairline); border-bottom: 0; + background: var(--bg-1); color: var(--text); box-shadow: 0 -12px 40px rgb(0 0 0 / .28); + transform: translate3d(0, 100%, 0); transition: transform cubic-bezier(.2,.8,.2,1); + padding-bottom: env(safe-area-inset-bottom); +} +html[data-layout="f7-swipe"] .f7s-sheet.modal-in, html[data-layout="f7-swipe"] .f7s-sheet.modal-out { transition-duration: var(--f7-sheet-transition-duration); } +html[data-layout="f7-swipe"] .f7s-sheet.not-animated { transition-duration: 0s; } +html[data-layout="f7-swipe"] .f7s-sheet.modal-in { display: block; transform: translate3d(0,0,0); } +html[data-layout="f7-swipe"] .f7s-sheet.modal-in-breakpoint, html[data-layout="f7-swipe"] .f7s-sheet.modal-in-swipe-step { display: block; transform: translate3d(0,var(--f7-sheet-breakpoint,var(--f7-sheet-swipe-step,0)),0); } +html[data-layout="f7-swipe"] .f7s-sheet.modal-out { transform: translate3d(0,100%,0); } +html[data-layout="f7-swipe"] .f7s-sheet .sheet-modal-inner { height: 100%; display: flex; flex-direction: column; } +html[data-layout="f7-swipe"] .f7s-grab { flex: none; height: 22px; display: grid; place-items: center; cursor: grab; touch-action: none; } +html[data-layout="f7-swipe"] .f7s-grab::before { content: ''; width: 36px; height: 5px; border-radius: 3px; background: var(--text-dim); opacity: .55; } +html[data-layout="f7-swipe"] .f7s-sheet-head { flex: none; padding: 0 18px 10px; font-weight: 700; font-size: 17px; touch-action: none; } +html[data-layout="f7-swipe"] .f7s-sheet-list { flex: 1; overflow-y: auto; margin: 0; padding: 0 12px 16px; list-style: none; } +html[data-layout="f7-swipe"] .f7s-up { display: flex; gap: 12px; align-items: center; padding: 10px 8px; border-bottom: 1px solid var(--f7-hairline); cursor: pointer; } +html[data-layout="f7-swipe"] .f7s-up:active, html[data-layout="f7-swipe"] .f7s-up:hover { background: var(--bg-2); } +html[data-layout="f7-swipe"] .f7s-up img { width: 88px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; flex: none; background: var(--bg-3); } +html[data-layout="f7-swipe"] .f7s-up-info { min-width: 0; } +html[data-layout="f7-swipe"] .f7s-up-title { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; } +html[data-layout="f7-swipe"] .f7s-up-ch { font-size: 12px; color: var(--text-dim); margin-top: 4px; } +html[data-layout="f7-swipe"] .f7s-empty { color: var(--text-dim); padding: 12px 8px; margin: 0; } /* A grab hint on the mini bar: swipe up for Up next, sideways to skip. */ -[data-layout="f7-swipe"] #miniBar { touch-action: none; } -[data-layout="f7-swipe"] #miniBar .mini-bar-inner { position: relative; } -[data-layout="f7-swipe"] #miniBar .mini-bar-inner::before { - content: ''; - position: absolute; - top: 3px; - left: 50%; - width: 32px; - height: 4px; - margin-left: -16px; - border-radius: 2px; - background: var(--text-dim); - opacity: 0.5; +html[data-layout="f7-swipe"] #miniBar { touch-action: none; } +html[data-layout="f7-swipe"] #miniBar .mini-bar-inner { position: relative; } +html[data-layout="f7-swipe"] #miniBar .mini-bar-inner::before { + content: ''; position: absolute; top: 3px; left: 50%; width: 32px; height: 4px; + margin-left: -16px; border-radius: 2px; background: var(--text-dim); opacity: .5; +} +@media (max-width: 600px) { + html[data-layout="f7-swipe"] .list-header { padding: 16px 16px 8px; } + html[data-layout="f7-swipe"] .list-title-row h2 { font-size: 30px; } + html[data-layout="f7-swipe"] .cards { margin: 4px 12px 22px; } +} +@media (max-width: 860px) and (orientation: portrait) { + html[data-layout="f7-swipe"] .body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); box-sizing: border-box; } + html[data-layout="f7-swipe"] .bottom-nav { display: flex; height: calc(64px + env(safe-area-inset-bottom)); } + html[data-layout="f7-swipe"] .bottom-nav-btn { min-height: 64px; } }