/* The account pages in the Marmorvägen design: Enheter (/devices), Logga in (/signin)
   and Välkommen (/enrol). Needs marmorvagen.css, komponenter.css and hem.css (the
   header, the tabs, the undo bar, .hem-rubrik1, .hem-mening and the padding of a page
   without tabs are hem.css's). Only the package's roles, steps and sizes; the account
   pages' own classes start with konto-, and the hooks account.js and the checks read
   (dev, dev-label, dev-this, dev-when, dev-out, dev-empty) keep their names. */

/* #msg: a sentence (p.hem-mening) or a refusal (the package's grey box with the
   server icon and its under-line). It is the page's live region, so it is always
   rendered (a region that appears with its first words may not be read out); empty,
   it is taken out of the flow, so it leaves no gap in the column or the grid. */
#msg:empty { position: absolute; }

/* ---------------------------------------------------------------- Enheter */
/* One row per device: the name with the tag "Den här enheten", the sentence under it,
   Logga ut at the right. The current device's row holds the page's own sign-out
   (#logout), moved there by account.js; until then, or when there is no row for it,
   the button stands in the foot. */
.konto-rader { list-style: none; margin: 0; padding: 0; }
.konto-rader:empty { display: none; }
.konto-rader > .mv-tyst { border-top: 0; }
.konto-titelrad { display: flex; align-items: center; gap: var(--mv-rum-2); flex-wrap: wrap; }
.konto-fot:empty { display: none; }

/* ---------------------------------------------------------------- Logga in, Välkommen */
.konto-bred { width: 100%; }

/* The computer, from 900 px: Enheter in the first seven of twelve columns, Logga in and
   Välkommen in the middle four, lower on the page. */
@media (min-width: 900px) {
  .konto-sida { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--mv-rum-6); align-content: start; padding-top: var(--mv-rum-6); }
  .konto-sida > * { grid-column: 1 / span 7; min-width: 0; }
  .konto-sida > .mv-tillbaka { justify-self: start; }
  .konto-ensam { padding-top: var(--mv-rum-16); }
  .konto-ensam > * { grid-column: 5 / span 4; }
}
/* Enheter's undo bar (#undo, after </main>, for a press held on another page) from
   900 px: fixed at the foot of the screen, as on Önskemål (ons.css) and Kalender. */
@media (min-width: 900px) {
  body.mv:has(.konto-sida ~ .undo .undo-bar) { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
  html:has(body.mv .konto-sida ~ .undo .undo-bar) { scroll-padding-bottom: calc(60px + env(safe-area-inset-bottom) + var(--mv-rum-4)); }
  .konto-sida ~ .undo {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding-bottom: env(safe-area-inset-bottom);
    background: var(--kort); border: 0; border-top: var(--mv-linje-1) solid var(--linje); border-radius: 0;
  }
}
