VSEARCH / src /index.css
bep40's picture
Upload src/index.css
8f2852f verified
Raw History Blame
10.6 kB
@import 'tailwindcss';
:root { font-family: Arial, Helvetica, sans-serif; color: #deded7; background: #10110f; font-synthesis: none; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
* { box-sizing: border-box; }
body { margin: 0; }
button, input, a { -webkit-tap-highlight-color: transparent; }
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible { outline: 2px solid #d7e1d1; outline-offset: 5px; }
.app { min-height: 320px; background: #11120f; overflow: clip; }
/* Unlike hidden, clip prevents focus/scrollIntoView from panning the canvas. */
.image-field { position: absolute; inset: 0; overflow: clip; contain: strict; }
.image-tile { position: absolute; left: 0; top: 0; display: block; border: 0; padding: 0; border-radius: 2px; background-color: #252823; background-size: cover; overflow: hidden; will-change: transform; transform-origin: center; box-shadow: 0 1px 5px #0002; }
.image-tile img { width: 100%; height: 100%; object-fit: cover; opacity: 0; filter: brightness(.92); transition: opacity 120ms ease, filter 120ms ease; }
.image-tile img.loaded { opacity: 1; }
.image-tile:hover { box-shadow: 0 10px 35px #0005; }
.image-tile:hover img { filter: brightness(1); }
/* Relevance is a soft per-photo treatment, not a second results layer. */
.image-tile { opacity: var(--relevance-opacity, 1); filter: blur(var(--relevance-blur, 0px)); transition: opacity 650ms ease, filter 650ms ease; }
.image-tile:hover, .image-tile:focus-visible { opacity: 1; filter: blur(0); }
.vignette { position: absolute; inset: 0; pointer-events: none; z-index: 300; background: radial-gradient(ellipse at center, transparent 42%, #0c0d0b30 100%), linear-gradient(0deg, #10110f99, transparent 70px); }
.grain { position: absolute; inset: 0; z-index: 301; pointer-events: none; opacity: .045; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.92' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%23fff' filter='url(%23n)' opacity='.7' d='M0 0h180v180H0z'/%3E%3C/svg%3E"); }
.search-center { position: absolute; z-index: 400; width: clamp(350px, 36vw, 640px); max-width: calc(100% - 44px); left: 50%; top: 50%; transform: translate(-50%, -50%); }
.search-pill { position: relative; height: clamp(62px, 4.8vw, 84px); border-radius: 999px; background: #e4e8ddbb; -webkit-backdrop-filter: blur(26px) saturate(.7); backdrop-filter: blur(26px) saturate(.7); box-shadow: inset 0 1px 0 #ffffff3d, 0 6px 36px #00000018; overflow: hidden; transition: background 250ms, box-shadow 250ms; }
.search-pill:focus-within { background: #e6eaddd4; box-shadow: inset 0 1px 0 #ffffff52, 0 5px 40px #0002; }
.search-pill input { width: 100%; height: 100%; background: transparent; color: #20251f; border: 0; outline: none; padding: 0 58px 0 27px; font-size: clamp(22px, 1.8vw, 30px); letter-spacing: -.035em; caret-color: #323b2d; }
.search-pill input::placeholder { color: #565d54; opacity: 1; }
.search-pill input::selection { background: #80957070; }
.clear-button { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; display: grid; place-items: center; padding: 7px; color: #4c5449; border: 0; background: transparent; border-radius: 50%; transition: background 150ms; }
.clear-button:hover { background: #0000000d; }
.clear-button svg { width: 18px; height: 18px; }
.search-progress { position: absolute; bottom: 0; left: 24px; right: 24px; height: 1px; opacity: 0; overflow: hidden; transition: opacity 300ms; }
.search-progress.visible { opacity: .5; }
.search-progress span { display: block; height: 100%; background: #47513f; transition: width 300ms; animation: progress-glow 1.6s ease-in-out infinite; }
.search-status { position: absolute; top: calc(100% + 13px); left: -28px; right: -28px; display: flex; justify-content: center; align-items: center; gap: 7px; min-height: 20px; font-size: 12px; letter-spacing: .01em; color: #d2d6ccc9; text-shadow: 0 1px 5px #000, 0 1px 12px #000; pointer-events: none; }
.status-dot { width: 4px; height: 4px; border-radius: 50%; background: #d2d8c9; animation: progress-glow 1.6s ease-in-out infinite; }
.has-error { flex-wrap: wrap; pointer-events: auto; border-radius: 10px; background: #171b16ee; padding: 12px; text-shadow: none; font-size: 14px; }
.has-error button { border: 0; border-bottom: 1px solid #ccc; padding: 0; background: transparent; color: #eee; }
.error-detail { width: 100%; font-size: 12px; text-align: center; opacity: .7; overflow-wrap: anywhere; }
.footer { z-index: 401; padding: 20px 24px; color: #bac0b395; font-size: 12px; letter-spacing: .015em; }
.footer a { color: inherit; text-decoration: none; transition: color 200ms; }
.footer a:hover { color: #f5f6ef; }
.version { margin-left: 5px; opacity: .55; }
.footer-divider { padding: 0 8px; opacity: .5; }
@keyframes progress-glow { 0%,100% { opacity: .4; } 50% { opacity: 1; } }
@media (max-width: 650px) {
.search-center { width: min(82vw, 400px); }
.search-pill { height: 60px; }
.search-pill input { padding-left: 23px; font-size: 22px; }
.footer { padding: 16px; font-size: 12px; }
.footer .version, .footer-divider { display: none; }
.footer > span { font-size: 0; }
.footer > span::after { content: 'On-device search'; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after { animation: none !important; transition: none !important; }
}
.photo-viewer { position: fixed; inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; color: #e8eae3; background: #0c0e0bdc; backdrop-filter: blur(18px); overflow: hidden; }
.photo-viewer[open] { display: block; animation: viewer-reveal 420ms ease both; }
.photo-viewer::backdrop { background: #0005; }
.photo-viewer.is-closing { opacity: 0; transition: opacity 320ms ease; animation: none; }
.photo-toolbar { position: absolute; z-index: 2; inset: 18px 24px auto; display: flex; align-items: center; justify-content: space-between; pointer-events: none; }
.photo-toolbar a, .photo-toolbar button { pointer-events: auto; background: #12160fe6; border: 1px solid #ffffff18; color: #e0e5d9; border-radius: 999px; }
.photo-toolbar a { font-size: 14px; padding: 12px 17px; text-decoration: none; }
.photo-toolbar button { width: 44px; height: 44px; display: grid; place-items: center; }
.photo-toolbar svg { width: 22px; height: 22px; }
.photo-origin { pointer-events: none; background: #12160fe6; border: 1px solid #ffffff18; color: #e0e5d9; border-radius: 999px; font-size: 14px; padding: 12px 17px; max-width: 60vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.photo-viewport { position: absolute; inset: 0; display: grid; place-items: center; padding: 72px 24px 40px; overflow: auto; }
.photo-frame { display: block; flex: none; padding: 0; border: 0; border-radius: 3px; width: min(1800px, calc(100vw - 48px), calc((100dvh - 128px) * var(--photo-ar))); aspect-ratio: var(--photo-ar); background-size: 100% 100%; background-color: #161912; cursor: zoom-in; box-shadow: 0 12px 70px #0005; transform-origin: center; }
.photo-frame img { display: block; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity 300ms; }
.photo-frame img.loaded { opacity: 1; }
.photo-viewport.is-zoomed { display: block; }
.photo-viewport.is-zoomed .photo-frame { width: max(calc(100vw - 48px), calc((100dvh - 128px) * var(--photo-ar))); margin: 0 auto; cursor: zoom-out; }
@keyframes viewer-reveal { from { opacity: 0; } to { opacity: 1; } }
/* Malloca product strip. Sits above the vignette so products stay legible
over the photograph field, and below the search pill's stacking level. */
.product-panel { position: absolute; z-index: 380; left: 24px; right: 24px; top: 24px; max-height: 34dvh; display: flex; flex-direction: column; gap: 10px; padding: 14px 16px 16px; border: 1px solid #ffffff17; border-radius: 12px; background: #12160fd9; -webkit-backdrop-filter: blur(22px) saturate(.75); backdrop-filter: blur(22px) saturate(.75); box-shadow: 0 10px 44px #0000003d; pointer-events: auto; }
.product-panel:not(:has(.product-strip)) { background: #12160fb0; }
.product-panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.product-panel-title { margin: 0; font-size: 13px; letter-spacing: .01em; color: #e2e6db; }
.product-panel-count { margin: 0; font-size: 11px; color: #b9c0b199; font-variant-numeric: tabular-nums; }
.product-strip { margin: 0; padding: 0 2px 4px; list-style: none; display: flex; gap: 10px; overflow-x: auto; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #ffffff26 transparent; }
.product-strip::-webkit-scrollbar { height: 6px; }
.product-strip::-webkit-scrollbar-thumb { background: #ffffff26; border-radius: 3px; }
.product-card { position: relative; flex: none; display: flex; flex-direction: column; gap: 8px; }
.product-thumb { display: block; width: 92px; height: 92px; padding: 0; border: 1px solid #ffffff14; border-radius: 8px; overflow: hidden; background: #1d2219; transition: border-color 200ms, transform 200ms; }
.product-thumb:hover, .product-card.is-open .product-thumb { border-color: #d7e1d155; transform: translateY(-1px); }
.product-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.product-detail { width: 260px; max-height: 22dvh; overflow: auto; padding: 12px 14px; border: 1px solid #ffffff17; border-radius: 10px; background: #0f130cee; display: flex; flex-direction: column; gap: 8px; }
.product-detail h3 { margin: 0; font-size: 14px; line-height: 1.35; color: #eef1e8; }
.product-summary { margin: 0; font-size: 12.5px; line-height: 1.5; color: #c3c9bb; }
.product-price { margin: 0; font-size: 13px; font-weight: 600; color: #d7e1d1; }
.product-specs { margin: 0; display: grid; gap: 4px; font-size: 12px; }
.product-spec { display: grid; grid-template-columns: minmax(0, 40%) minmax(0, 60%); gap: 10px; }
.product-spec dt { color: #98a08f; overflow-wrap: anywhere; }
.product-spec dd { margin: 0; color: #d2d7cb; overflow-wrap: anywhere; }
.product-empty { margin: 0; font-size: 12px; color: #aab19f9e; }
.product-panel.has-error .product-empty { color: #e8b4a9; line-height: 1.5; }
@media (max-width: 650px) {
.product-panel { left: 12px; right: 12px; top: 12px; max-height: 26dvh; padding: 11px 12px 12px; }
.product-thumb { width: 72px; height: 72px; }
.product-detail { width: min(260px, calc(100vw - 48px)); }
}