/* Hosting directory extras (owner 25 Oct), loaded by /hosting-providers only (hosting.js) */

/* the table's column headings sort the list: click = that order, again = reversed */
.lhead .lh-sort { display: inline-flex; align-items: center; gap: 5px; padding: 4px 6px; margin: -4px -6px; border: 0; border-radius: 6px; background: none; color: inherit; font: inherit; cursor: pointer; text-align: left; }
.lhead .lh-sort:hover { background: hsl(var(--background)); color: hsl(var(--foreground)); }
.lhead .lh-sort[aria-pressed="true"] { color: var(--title); }
.lh-ar { width: 10px; height: 10px; opacity: .45; background: no-repeat center / 10px 10px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M5 1 8 4H2zM5 9 2 6h6z' fill='%23666'/%3E%3C/svg%3E"); }
.lh-sort[data-dir="up"] .lh-ar, .lh-sort[data-dir="down"] .lh-ar { opacity: 1; background: none; width: auto; height: auto; }
.lh-sort[data-dir="up"] .lh-ar::before { content: "↑"; } .lh-sort[data-dir="down"] .lh-ar::before { content: "↓"; }

/* Featured pins on the map: calmer (owner 25 Oct: "too large and the animation is too large too - overwhelming") */
.wm-pin.featured .wm-halo { fill: color-mix(in srgb, var(--title) 18%, transparent); }

/* phones (owner 26 Oct: "scroll to content still too long on mobile hosting site"): the filters behind one button and a
   floating jump button */
.hf-toggle { display: none; }
.hf-toggle b { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--title); color: #fff; font-size: 11px; }
@media (max-width: 640px) {
  .hdir:not(.hf-open) > .hrail { display: none; }
  .hf-toggle { display: inline-flex; gap: 6px; }
  .hl-head { flex-wrap: wrap; gap: 8px; }
}

/* Hosting site rows, polished (owner 30 Oct: the sort sits on the table it orders, one side panel, "impeccable polish for
   the hosting sites rows"). The Honest Price Board: hairline rows, the rate as the row's figure, Featured as a Rust Soft
   wash with the word on the name line (no orange box, no brand stripe on the row's edge), perks as a quiet text line. */
.lbar { display: flex; justify-content: flex-end; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid hsl(var(--border)); }
.lbar select { height: 36px; padding: 0 10px; border: 1px solid hsl(var(--field-border)); border-radius: 8px; background: hsl(var(--background)); color: inherit; font: inherit; font-size: 14px; cursor: pointer; }
.lbar select:hover { border-color: hsl(var(--foreground) / .6); }
.lrow.lhead { border-top: 0; padding-top: 10px; padding-bottom: 10px; font-size: 12.5px; }
.lrow:not(.lhead) { padding-top: 14px; padding-bottom: 14px; }
.lrow.is-partner, :root[data-theme="dark"] .lrow.is-partner { box-shadow: none; background: var(--cta-soft); }
#lgrid > .lrow:not(.is-partner):hover { background: hsl(var(--muted)); }
#lgrid > .lrow.is-partner:hover { background: color-mix(in srgb, var(--title) 9%, hsl(var(--background))); }
.lr-name { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.lr-name b { min-width: 0; font-size: 15px; font-weight: 600; }
.lr-feat { flex: none; cursor: help; }
.lr-feat:not(.fbadge) { font-size: 12.5px; font-weight: 600; color: var(--title); }
.lr-main .small { margin-top: 1px; }
.lr-prov { color: inherit; text-decoration: none; }
.lr-prov:hover { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
.lr-rate { font-variant-numeric: tabular-nums; white-space: nowrap; }
.lr-rate b { font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.lr-rate .muted { font-size: 13px; }
.lr-c { font-variant-numeric: tabular-nums; }
.lrow .pm-perks { gap: 2px 14px; margin: 3px 0 0; }
.lrow .pm-perk { padding: 0; border: 0; box-shadow: none; background: none; color: hsl(var(--muted-foreground)); font-size: 12.5px; font-weight: 400; }
.lrow .pm-perk svg { color: var(--pos); }
.lrow .pm-pills { margin: 5px 0 0; }
@media (min-width: 901px) {
  .lrow { padding-left: 16px; }
  .lrow::before { display: none; }   /* a coloured edge on a list row is decoration (DESIGN.md: hairlines, not stripes) */
  .lhead > div:nth-child(2), .lhead > div:nth-child(3) { text-align: right; }
  .lhead > div:nth-child(2) .lh-sort, .lhead > div:nth-child(3) .lh-sort { flex-direction: row-reverse; }
  .lr-rate, .lr-facts > .lr-c:first-child { text-align: right; }
  .lr-facts > .lr-c:first-child { padding-right: 18px; }
  .lhead > div:nth-child(3) { padding-right: 18px; }
  .lr-go .btn { height: 34px; padding: 0 14px; }
}
/* phones (owner 30 Oct: "mobile phone sites listings rows perhaps?"): one list of rows instead of two columns of tiles,
   the same board as on desktop. Logo, name with Featured, provider and perks on the left; the rate right, as the row's
   figure; capacity and energy on a quiet line under the name. The whole row opens the offer (its button stretched over
   it), the provider link stays tappable on top. "Show N more from …" shows on phones too (it was hidden). */
@media (max-width: 640px) {
  .ltable { border: 1px solid hsl(var(--border)); border-radius: 12px; background: hsl(var(--card)); overflow: hidden; }
  .lbar { padding: 10px 12px; }
  .lbar select { width: 100%; height: 44px; font-size: 16px; }
  #lgrid { display: block; }
  #lgrid > .lrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "main rate" "facts rate"; align-items: start; gap: 2px 12px;
    padding: 12px; border: 0; border-top: 1px solid hsl(var(--border)); border-radius: 0; background: hsl(var(--card)); }
  #lgrid > .lrow:first-child { border-top: 0; }
  #lgrid > .lrow[hidden] { display: none; }
  #lgrid > .lrow::before { display: none; }
  #lgrid > .lrow.is-partner { background: var(--cta-soft); }
  #lgrid .lr-main { grid-area: main; flex-direction: row; align-items: flex-start; gap: 10px; }
  #lgrid .lr-logo, #lgrid .lr-main .lr-dot { width: 36px; height: 36px; min-width: 36px; }
  #lgrid .lr-logo.wide { width: auto; min-width: 36px; max-width: 64px; }
  .lr-name { flex-wrap: wrap; column-gap: 8px; row-gap: 0; }
  #lgrid .lr-main b { font-size: 15px; line-height: 1.3; }
  #lgrid .lr-main .small { font-size: 12.5px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  #lgrid .lr-rate { grid-area: rate; align-self: center; order: 0; margin: 0; padding: 0; text-align: right; line-height: 1.15; }
  #lgrid .lr-rate b { display: block; font-size: 17px; }
  #lgrid .lr-rate .muted { font-size: 12px; }
  #lgrid .lr-facts { grid-area: facts; padding-left: 46px; gap: 0 10px; font-size: 12.5px; }
  #lgrid .lr-c { font-size: 12.5px; }
  #lgrid > .lr-more { display: flex; padding: 11px 12px; font-size: 13.5px; }
  #lgrid .lr-main .pm-pills { margin: 6px 0 0; }
}
