openvibers/openvibe.markets publicmarkets.css

markets.css

main 6.0 KB · 73 lines · css

1/* OpenVibe.Markets: theme tokens only (kit.css defines them for both themes), phone first, 44 px targets. */
2.mk { max-width: 920px; }
3.mk h1 { margin: 0 0 8px; font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem); letter-spacing: -0.02em; text-wrap: balance; }
4.mk h2 { margin: 0 0 10px; font-size: 1.1rem; }
5.mk-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
6.mk-hero { padding: 12px 0 8px; }
7.mk-lede { max-width: 62ch; margin: 0 0 16px; color: var(--text-secondary, #9aa4b2); font-size: 1.05rem; line-height: 1.55; }
8.mk-sec { margin: 22px 0 0; }
9.mk-head { margin: 4px 0 6px; }
10.mk-search { display: flex; gap: 8px; align-items: stretch; }
11.mk-search-box { position: relative; flex: 1 1 auto; min-width: 0; display: flex; }
12.mk-search-box input { flex: 1; min-width: 0; min-height: 48px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--border, #1f2937);
13 background: var(--surface, transparent); color: var(--text, #e8ecf3); font: inherit; font-size: 16px; }
14.mk-search-box input:focus-visible { outline: 2px solid var(--accent, #5b8cff); outline-offset: 2px; }
15.mk-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px; border-radius: 14px; border: 1px solid var(--border, #1f2937);
16 background: var(--surface, transparent); color: var(--text, #e8ecf3); font: inherit; font-weight: 600; cursor: pointer; transition: transform .12s ease; }
17.mk-btn--primary { background: var(--accent, #5b8cff); border-color: transparent; color: var(--accent-contrast, #fff); }
18.mk-btn:active { transform: scale(.97); }
19.mk-places { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
20.mk-places li { display: grid; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--border, #1f2937); }
21.mk-places small, .mk-elsewhere small { color: var(--text-secondary, #9aa4b2); font-size: 12px; }
22.mk-promises { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; max-width: 64ch; }
23.mk-promises li { padding: 12px 14px; border-radius: 14px; border: 1px solid var(--border, #1f2937); line-height: 1.5; }
24.mk-count, .mk-note, .mk-empty { color: var(--text-secondary, #9aa4b2); line-height: 1.5; }
25.mk-cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
26.mk-card { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 14px;
27 border: 1px solid var(--border, #1f2937); animation: mk-in .3s ease both; }
28html[data-ov-motion="off"] .mk-card { animation: none; }
29@keyframes mk-in { from { opacity: 0; transform: translateY(calc(6px * var(--ov-move, 1))); } to { opacity: 1; transform: none; } }
30.mk-card-img { width: 72px; height: 72px; border-radius: 10px; object-fit: cover; background: var(--surface-2, rgba(127, 127, 127, .12)); }
31.mk-card-body { display: grid; gap: 4px; min-width: 0; }
32.mk-card-title { color: inherit; font-weight: 600; text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
33.mk-card-title:hover { text-decoration: underline; }
34.mk-card-body small { color: var(--text-secondary, #9aa4b2); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
35.mk-card-price { display: grid; justify-items: end; gap: 2px; text-align: right; font-variant-numeric: tabular-nums; }
36.mk-card-price b { font-size: 1.05rem; }
37.mk-card-price s, .mk-card-price small { color: var(--text-secondary, #9aa4b2); font-size: 12px; }
38.mk-afford { font-size: 12px; color: var(--accent, #5b8cff); }
39.mk-elsewhere { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); }
40.mk-elsewhere a { display: grid; gap: 2px; min-height: 56px; align-content: center; padding: 8px 14px; border-radius: 14px; border: 1px solid var(--border, #1f2937);
41 color: inherit; text-decoration: none; transition: border-color .12s ease, transform .12s ease; }
42.mk-elsewhere a:hover { border-color: var(--accent, #5b8cff); }
43.mk-elsewhere a:active { transform: scale(.98); }
44html[data-ov-motion="off"] .mk-elsewhere a, html[data-ov-motion="off"] .mk-btn { transition: none; }
45@media (max-width: 520px) {
46 .mk-card { grid-template-columns: 56px minmax(0, 1fr); }
47 .mk-card-img { width: 56px; height: 56px; }
48 .mk-card-price { grid-column: 2; justify-items: start; text-align: left; grid-auto-flow: column; justify-content: start; align-items: baseline; gap: 8px; }
49}
50/* A card without a picture: the words and the price only (Deals' feed often has none). */
51.mk-card--text { grid-template-columns: minmax(0, 1fr) auto; }
52.mk-afford { display: inline-flex; align-items: center; min-height: 32px; }
53@media (max-width: 520px) {
54 .mk-card--text { grid-template-columns: minmax(0, 1fr); }
55 .mk-card--text .mk-card-price { grid-column: 1; }
56 .mk-afford { min-height: 44px; padding: 0 2px; }
57}
58/* Search by photo (v0.2). */
59.mk-photo { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 10px 0 0; }
60.mk-photo-btn { position: relative; gap: 8px; }
61.mk-photo-btn input { inset: 0; }
62.mk-photo-said { color: var(--text-secondary, #9aa4b2); font-size: 14px; }
63.mk-photo.is-busy .mk-photo-btn { opacity: .6; pointer-events: none; }
64.mk-photo.is-busy .mk-photo-said { color: var(--text, #e8ecf3); animation: mk-pulse 1.2s ease-in-out infinite; }
65html[data-ov-motion="off"] .mk-photo.is-busy .mk-photo-said { animation: none; }
66@keyframes mk-pulse { 50% { opacity: .55; } }
67.mk-error { padding: 10px 14px; border-radius: 12px; border: 1px solid var(--danger, #b91c1c); color: var(--danger, #fca5a5); }
68.mk-from-photo { margin: 8px 0 0; color: var(--text-secondary, #9aa4b2); }
69.mk-from-photo b { color: var(--text, #e8ecf3); }
70.mk-watch { margin: 10px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
71.mk-watch a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; color: var(--accent, #5b8cff); }
72.mk-watch small { color: var(--text-secondary, #9aa4b2); }
73