/* Atlas state screens: the page host, the full-page mode, and the compact variant (staging only).
   Pairs with atlas-states.css (the screens) and state-screens.js (when they appear). */

.state-screen { padding: 28px 16px 48px; }
.state-screen[hidden] { display: none; }
/* A full-page screen replaces the app and the sign-in card for as long as it is up. */
body.is-state-screen #app-view,
body.is-state-screen #auth-view { display: none !important; }
body.is-state-screen { background: var(--color-bg, #f8f5ee); }
html[data-theme="dark"] body.is-state-screen { background: var(--night-950, #0b1214); }
.state-screen .atlas-state { margin-block: 8px; }

/* Compact: sits inside a card or a form where the page around it still makes sense
   (a wrong password under the sign-in form, a closed poll inside its post). */
.atlas-state-compact {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    "art title"
    "art body"
    "actions actions";
  justify-items: start;
  text-align: start;
  gap: 4px 14px;
  max-inline-size: none;
  margin: 0 0 14px;
  padding: 16px 18px;
  box-shadow: none;
}
.atlas-state-compact .atlas-state-art {
  grid-area: art;
  align-self: start;
  inline-size: 52px;
  block-size: 52px;
  margin: 0;
  box-shadow: 0 0 0 4px var(--st-surface), 0 0 0 5px var(--st-line);
}
.atlas-state-compact .atlas-state-art svg { inline-size: 26px; block-size: 26px; }
.atlas-state-compact .atlas-state-title { grid-area: title; margin: 0; font-size: 16px; line-height: 1.4; }
.atlas-state-compact .atlas-state-body { grid-area: body; font-size: 14px; line-height: 1.6; max-inline-size: 62ch; }
.atlas-state-compact .atlas-state-actions {
  grid-area: actions;
  justify-content: flex-start;
  margin-block-start: 10px;
}
.atlas-state-compact .atlas-state-btn { min-block-size: 40px; padding-inline: 16px; font-size: 14px; }
:root[lang="ar"] .atlas-state-compact .atlas-state-body { font-size: 15px; line-height: 1.7; }
@media (max-width: 480px) {
  .state-screen { padding: 16px 12px 32px; }
  .atlas-state-compact { grid-template-columns: 1fr; grid-template-areas: "art" "title" "body" "actions"; padding: 14px; }
  .atlas-state-compact .atlas-state-art { inline-size: 44px; block-size: 44px; margin-block-end: 6px; }
  .atlas-state-compact .atlas-state-art svg { inline-size: 22px; block-size: 22px; }
  .atlas-state-compact .atlas-state-actions { flex-direction: row; flex-wrap: wrap; }
  .atlas-state-compact .atlas-state-btn { inline-size: auto; flex: 1 1 auto; }
}
