mirror of
https://github.com/samsonjs/spirit-tracker.git
synced 2026-03-25 09:25:51 +00:00
463 lines
8.3 KiB
CSS
463 lines
8.3 KiB
CSS
:root {
|
|
--bg: #0b0d10;
|
|
--panel: #12161b;
|
|
--text: #e7edf3;
|
|
--muted: #9aa6b2;
|
|
--border: #242c35;
|
|
--accent: #7dd3fc;
|
|
}
|
|
|
|
* { box-sizing: border-box; }
|
|
body {
|
|
margin: 0;
|
|
font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
|
|
background: var(--bg);
|
|
color: var(--text);
|
|
}
|
|
|
|
a { color: var(--accent); text-decoration: none; }
|
|
a:hover { text-decoration: underline; }
|
|
|
|
/* badge links: keep badge look, but clearly clickable */
|
|
a.badge { color: var(--muted); }
|
|
a.badge:hover { text-decoration: underline; cursor: pointer; }
|
|
|
|
/* SKU badge links (search/store -> link page) */
|
|
a.skuLink { color: var(--muted); }
|
|
a.skuLink:hover { text-decoration: underline; cursor: pointer; }
|
|
|
|
.container {
|
|
max-width: 980px;
|
|
margin: 0 auto;
|
|
padding: 18px;
|
|
}
|
|
|
|
/* header becomes 2 rows */
|
|
.header {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 12px;
|
|
margin-bottom: 14px;
|
|
}
|
|
|
|
.headerRow1 {
|
|
display: flex;
|
|
gap: 12px;
|
|
align-items: flex-start;
|
|
justify-content: space-between;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.headerRow2 {
|
|
width: 100%;
|
|
}
|
|
|
|
.headerButtons {
|
|
display: flex;
|
|
gap: 10px;
|
|
flex-wrap: wrap;
|
|
justify-content: flex-end;
|
|
}
|
|
|
|
/* disabled button styling */
|
|
.btn:disabled {
|
|
opacity: 0.45;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
|
|
.h1 {
|
|
font-size: 18px;
|
|
font-weight: 700;
|
|
margin: 0;
|
|
}
|
|
|
|
.card {
|
|
background: var(--panel);
|
|
border: 1px solid var(--border);
|
|
border-radius: 12px;
|
|
padding: 14px;
|
|
}
|
|
|
|
.input {
|
|
width: 100%;
|
|
padding: 12px 12px;
|
|
border-radius: 10px;
|
|
border: 1px solid var(--border);
|
|
background: #0f1318;
|
|
color: var(--text);
|
|
outline: none;
|
|
}
|
|
|
|
.input:focus { border-color: #37566b; }
|
|
|
|
.list {
|
|
margin-top: 12px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 10px;
|
|
}
|
|
|
|
.item {
|
|
border: 1px solid var(--border);
|
|
border-radius: 12px;
|
|
padding: 12px;
|
|
background: #0f1318;
|
|
cursor: pointer;
|
|
min-height: 92px; /* keep results uniform */
|
|
}
|
|
|
|
.item:hover { border-color: #2f3a46; }
|
|
|
|
.itemRow {
|
|
display: flex;
|
|
gap: 12px;
|
|
align-items: center; /* keep thumb centered; don't stretch */
|
|
min-height: 68px;
|
|
}
|
|
|
|
.thumbBox {
|
|
width: 64px;
|
|
height: 64px; /* fixed thumb height */
|
|
border-radius: 12px;
|
|
overflow: hidden;
|
|
border: 1px solid var(--border);
|
|
background: #0b0d10;
|
|
flex: 0 0 64px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.thumb {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
display: block;
|
|
}
|
|
|
|
.thumbPlaceholder {
|
|
width: 100%;
|
|
height: 100%;
|
|
background: #0b0d10;
|
|
}
|
|
|
|
.itemBody {
|
|
flex: 1;
|
|
min-width: 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
}
|
|
|
|
.itemTop {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
gap: 10px;
|
|
align-items: baseline;
|
|
}
|
|
|
|
.itemName {
|
|
font-weight: 700;
|
|
font-size: 14px;
|
|
min-width: 0;
|
|
white-space: nowrap; /* lock to one line */
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.badge {
|
|
font-size: 13px;
|
|
color: var(--muted);
|
|
border: 1px solid var(--border);
|
|
padding: 3px 10px;
|
|
border-radius: 999px;
|
|
white-space: nowrap;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
}
|
|
|
|
.badgeGood {
|
|
color: rgba(20,110,40,0.95);
|
|
background: rgba(20,110,40,0.10);
|
|
border-color: rgba(20,110,40,0.25);
|
|
}
|
|
|
|
.badgeNeutral {
|
|
color: var(--muted);
|
|
background: rgba(255,255,255,0.02);
|
|
}
|
|
|
|
.badgeBad {
|
|
color: rgba(160,40,40,0.95);
|
|
background: rgba(160,40,40,0.12);
|
|
border-color: rgba(160,40,40,0.25);
|
|
}
|
|
|
|
.badgeBest {
|
|
color: rgba(210, 170, 60, 0.95);
|
|
background: rgba(210, 170, 60, 0.12);
|
|
border-color: rgba(210, 170, 60, 0.26);
|
|
}
|
|
|
|
.metaRow {
|
|
margin-top: 8px;
|
|
display: flex;
|
|
gap: 10px;
|
|
flex-wrap: nowrap; /* keep single row (desktop) */
|
|
align-items: center;
|
|
overflow: hidden;
|
|
color: var(--muted);
|
|
font-size: 13px;
|
|
}
|
|
|
|
.price {
|
|
font-weight: 700;
|
|
color: var(--text);
|
|
}
|
|
|
|
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }
|
|
|
|
.topbar {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.btn {
|
|
border: 1px solid var(--border);
|
|
background: #0f1318;
|
|
color: var(--text);
|
|
border-radius: 10px;
|
|
padding: 10px 10px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.btn:hover { border-color: #2f3a46; }
|
|
|
|
.btnWide {
|
|
padding-left: 14px;
|
|
padding-right: 14px;
|
|
min-width: 120px;
|
|
text-align: center;
|
|
}
|
|
|
|
.btnSm {
|
|
padding: 10px 12px;
|
|
color: var(--muted);
|
|
}
|
|
|
|
.btnSm:hover {
|
|
color: var(--text);
|
|
}
|
|
|
|
.links {
|
|
display: flex;
|
|
gap: 10px;
|
|
flex-wrap: wrap;
|
|
margin: 8px 0 14px;
|
|
}
|
|
|
|
.small {
|
|
color: var(--muted);
|
|
font-size: 12px;
|
|
}
|
|
|
|
/* small subtle inline selects */
|
|
.selectSmall {
|
|
border: 1px solid var(--border);
|
|
background: #0f1318;
|
|
color: var(--muted);
|
|
border-radius: 999px;
|
|
|
|
/* custom arrow (puts it a bit left from the edge) */
|
|
-webkit-appearance: none;
|
|
-moz-appearance: none;
|
|
appearance: none;
|
|
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239aa6b2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
|
|
background-repeat: no-repeat;
|
|
background-position: right 10px center;
|
|
background-size: 12px 12px;
|
|
|
|
padding: 6px 28px 6px 10px; /* right padding reserves room for arrow */
|
|
font-size: 12px;
|
|
line-height: 1;
|
|
outline: none;
|
|
}
|
|
|
|
|
|
.selectSmall:hover {
|
|
border-color: #2f3a46;
|
|
color: var(--text);
|
|
cursor: pointer;
|
|
}
|
|
|
|
.selectSmall:focus {
|
|
border-color: #37566b;
|
|
outline: 1px solid #37566b;
|
|
color: var(--text);
|
|
}
|
|
|
|
/* --- Store selector (top of search page) --- */
|
|
.storeBarWrap {
|
|
margin-top: 12px; /* slightly more gap from the top text */
|
|
}
|
|
|
|
.storeBar {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
|
|
gap: 8px;
|
|
width: 100%;
|
|
}
|
|
|
|
.storeBtn {
|
|
border: 1px solid var(--border);
|
|
background: #0f1318;
|
|
color: var(--muted);
|
|
border-radius: 999px;
|
|
padding: 6px 10px;
|
|
font-size: 12px;
|
|
line-height: 1;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
}
|
|
|
|
.storeBtn:hover {
|
|
border-color: #2f3a46;
|
|
color: var(--text);
|
|
text-decoration: none;
|
|
}
|
|
|
|
.storeBtnActive {
|
|
border-color: #37566b;
|
|
outline: 1px solid #37566b;
|
|
color: var(--text);
|
|
}
|
|
|
|
/* Detail view sizing */
|
|
.detailCard {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 10px;
|
|
}
|
|
|
|
.detailHeader {
|
|
display: flex;
|
|
gap: 12px;
|
|
align-items: flex-start;
|
|
}
|
|
|
|
.detailThumbBox {
|
|
width: 96px;
|
|
height: 96px;
|
|
border-radius: 14px;
|
|
overflow: hidden;
|
|
border: 1px solid var(--border);
|
|
background: #0b0d10;
|
|
flex: 0 0 96px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.detailThumb {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
display: block;
|
|
}
|
|
|
|
.detailHeaderText {
|
|
flex: 1;
|
|
min-width: 0;
|
|
}
|
|
|
|
/* Chart fills most of viewport, but stays usable on mobile */
|
|
.chartBox {
|
|
width: 100%;
|
|
height: min(72vh, 720px);
|
|
min-height: 320px;
|
|
border: 1px solid var(--border);
|
|
border-radius: 12px;
|
|
background: #0f1318;
|
|
padding: 10px;
|
|
}
|
|
|
|
@media (max-width: 640px) {
|
|
.container { padding: 14px; }
|
|
.thumbBox { width: 56px; height: 56px; flex: 0 0 56px; }
|
|
.item { min-height: 0; } /* allow natural height on small screens */
|
|
.metaRow { flex-wrap: wrap; } /* wrapping is fine on mobile */
|
|
|
|
.detailThumbBox { width: 84px; height: 84px; flex: 0 0 84px; }
|
|
|
|
.chartBox {
|
|
height: 58vh;
|
|
min-height: 260px;
|
|
padding: 8px;
|
|
}
|
|
}
|
|
|
|
.chartBox canvas {
|
|
width: 100% !important;
|
|
height: 100% !important;
|
|
}
|
|
|
|
/* --- SKU linker additions --- */
|
|
.pinnedItem {
|
|
outline: 2px solid #37566b;
|
|
border-color: #37566b;
|
|
}
|
|
|
|
.linkBar {
|
|
margin-top: 12px;
|
|
position: sticky;
|
|
bottom: 0;
|
|
}
|
|
|
|
/* --- Store page: two-column results (new; isolated to store page) --- */
|
|
.storeGrid {
|
|
margin-top: 12px;
|
|
display: grid;
|
|
grid-template-columns: 1fr 1fr;
|
|
gap: 12px;
|
|
align-items: start;
|
|
}
|
|
|
|
.storeCol {
|
|
min-width: 0;
|
|
}
|
|
|
|
.storeColHeader {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 10px;
|
|
padding: 0 2px 10px 2px;
|
|
}
|
|
|
|
.storeColList {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 10px;
|
|
}
|
|
|
|
@media (max-width: 640px) {
|
|
.storeGrid {
|
|
grid-template-columns: 1fr; /* stack columns */
|
|
}
|
|
}
|
|
|
|
.badgeExclusive {
|
|
color: rgba(20, 140, 140, 0.95);
|
|
background: rgba(20, 140, 140, 0.12);
|
|
border-color: rgba(20, 140, 140, 0.28);
|
|
}
|
|
|
|
.badgeLastStock {
|
|
color: rgba(200, 120, 20, 0.95);
|
|
background: rgba(200, 120, 20, 0.12);
|
|
border-color: rgba(200, 120, 20, 0.28);
|
|
}
|