/* Storage's tool pages (routes/drives.py), on top of buying.css: the Find a
   drive tiles, and the few places a drive page differs from a card page.
   Every colour is a design-system token, so light and dark both hold. */

/* ------------------------------------------------------------ find a drive */
.dv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15.5rem), 1fr)); gap: 14px; margin-top: 18px; }
:root[data-look="banner"] a.dv { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 18px 18px 14px;
  border-radius: var(--b-radius); background: var(--b-card); border: 1px solid var(--border); box-shadow: var(--shadow);
  color: var(--text); text-decoration: none;
  transition: border-color .15s, transform .2s var(--b-ease), box-shadow .2s; }
:root[data-look="banner"] a.dv:hover { border-color: var(--accent-line); transform: translateY(-2px); }
:root[data-look="banner"] a.dv:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dv-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 2rem; }
.dv-size { font-size: 1.7rem; font-weight: 850; letter-spacing: -.025em; line-height: 1; font-variant-numeric: tabular-nums; }
.dv-kind { font-size: .86rem; font-weight: 650; color: var(--text-2); }
.dv-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 10px; margin-top: .8rem; }
.dv-low { font-size: 1.25rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.dv-low i { font-style: normal; font-size: .8rem; font-weight: 600; color: var(--text-3); }
.dv-per { font-size: .9rem; font-weight: 700; color: var(--good); font-variant-numeric: tabular-nums; }
.dv-typ { font-size: .8rem; color: var(--text-3); font-variant-numeric: tabular-nums; }
.dv-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto;
  padding-top: 12px; font-size: .84rem; color: var(--text-3); }
.dv-price + .dv-foot, .dv-typ + .dv-foot { border-top: 1px solid var(--border); margin-top: 14px; }
.dv-go { display: inline-flex; align-items: center; gap: .3rem; font-weight: 750; color: var(--accent); }
.dv-go .ico { width: .95rem; height: .95rem; }
.dv-foot { border-top: 1px solid var(--border); }
:root[data-look="banner"] .page-panel.dv-empty p { max-width: 58ch; }

/* ------------------------------------------------------------ price check */
/* the drive is picked from a menu (there are a dozen kinds, not 150 cards),
   and the menu is as tall as the price box beside it */
.ck .fsel select { width: 100%; min-height: 50px; font-size: 1.05rem; }
:root[data-look="banner"] .page-panel .ck-note a { color: var(--accent); font-weight: 700; }

@media (max-width: 560px) {
  .dv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  :root[data-look="banner"] a.dv { padding: 14px 13px 12px; }
  .dv-size { font-size: 1.4rem; }
  .dv-low { font-size: 1.1rem; }
  .dv-go { font-size: 0; }                 /* the arrow alone: the whole tile is the link */
  .dv-go .ico { width: 1.1rem; height: 1.1rem; }
}
@media (max-width: 340px) { .dv-grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) {
  :root[data-look="banner"] a.dv { transition: none; }
  :root[data-look="banner"] a.dv:hover { transform: none; }
}

/* ------------------------------------------------------------ one kind of drive (drive.html) */
/* what is listed, by condition, while the kind has no price history yet */
:root[data-look="banner"] .page-panel .dk-spread { list-style: none; margin: 1rem 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 8px 10px; }
:root[data-look="banner"] .page-panel .dk-spread li { margin: 0; max-width: none; padding: 7px 12px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface); font-size: .9rem; color: var(--text-2);
  font-variant-numeric: tabular-nums; }
.dk-spread b { color: var(--text); font-weight: 800; }
.dk-spread span { margin-left: .5rem; color: var(--text-3); }
:root[data-look="banner"] .page-panel .dk-notes { margin: 0; padding-left: 1.1rem; display: grid; gap: 10px; }
:root[data-look="banner"] .page-panel .dk-notes li { margin: 0; font-size: .92rem; line-height: 1.55; color: var(--text-2); }
.dk-notes b { color: var(--text); }
:root[data-look="banner"] .page-panel .dk-h2 { margin-top: 1.4rem; }
.dk-per { color: var(--text-2); white-space: nowrap; }
@media (max-width: 560px) {
  .card-tbl .dk-per { display: none; }     /* the price is what fits; per TB is on the tile and the table */
}

/* ------------------------------------------------------------ cheapest per TB (drive_cheapest.html) */
:root[data-look="banner"] .page-panel .dk-lines { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
:root[data-look="banner"] .page-panel .dk-lines li { margin: 0; max-width: 70ch; font-size: 1.08rem; line-height: 1.5;
  color: var(--text); font-weight: 600; text-wrap: pretty; }
.dk-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 6px; }
:root[data-look="banner"] .page-panel .dk-head h2 { margin: 0; }
.dk-big { font-size: 1.02rem; font-weight: 800; color: var(--good); white-space: nowrap; }
.dk-kind { white-space: nowrap; }
:root[data-look="banner"] .page-panel .dk-kind a { font-weight: 750; }
.dk-kind span { display: block; font-size: .78rem; color: var(--text-3); }
.card-tbl.dk-cheap th.num:first-child, .card-tbl.dk-cheap td.dk-big { text-align: left; padding-right: 14px; }
@media (max-width: 40rem) {
  /* a card per listing: what a terabyte asks and the drive on top, the
     seller's title under them, then the condition, the price and the link */
  .card-tbl.dk-cheap thead { display: none; }
  .card-tbl.dk-cheap tr { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 12px; align-items: center;
    padding: 12px 0; border-bottom: 1px solid var(--border); }
  .card-tbl.dk-cheap td { padding: 0; border: 0; grid-column: auto; grid-row: auto; }
  .card-tbl.dk-cheap td.dk-big { grid-column: 1; grid-row: 1; font-size: 1.15rem; }
  .card-tbl.dk-cheap td.dk-kind { grid-column: 2; grid-row: 1; }
  .card-tbl.dk-cheap td.card-price { grid-column: 3; grid-row: 1; text-align: right; }
  .card-tbl.dk-cheap td.card-l { grid-column: 1 / -1; grid-row: 2; }
  .card-tbl.dk-cheap td:nth-child(4) { grid-column: 1 / 3; grid-row: 3; font-size: .85rem; }
  .card-tbl.dk-cheap td:last-child { grid-column: 3; grid-row: 3; text-align: right; }
}
