/* Nothing-Phone-inspired language/edition selector for nwsly.co.
 * Dependency-free; inherits the page's CSS custom properties
 * (--paper / --ink / --line / --red) defined in each page's :root. */

/* ── footer trigger (matches Nothing's "STORE: … / LANGUAGE: …" pattern) ── */
.nws-lang-trigger {
  display: inline-flex;
  gap: 18px;
  align-items: center;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--ink-3, #6A6658);
}
.nws-lang-trigger:hover { color: var(--ink, #0A0A0A); }
.nws-lang-trigger .chev { opacity: 0.6; }

/* ── overlay + modal ── */
.nws-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.nws-modal {
  width: min(640px, 100%);
  max-height: min(86vh, 720px);
  background: #1a1a1a;
  border: 1px solid #1a1a1a;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.nws-modal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  color: #FAF8F3;
}
.nws-modal-bar .title {
  font-family: "DotGothic16", monospace;
  font-size: 16px;
  letter-spacing: 0.04em;
}
.nws-modal-close {
  background: transparent;
  border: 1px solid #4a4a47;
  color: #FAF8F3;
  padding: 4px 9px;
  cursor: pointer;
  font-family: "Geist Mono", monospace;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 1.4px;
}
.nws-modal-body {
  background: var(--paper, #F2EFE3);
  color: var(--ink, #0A0A0A);
  padding: 24px;
  overflow-y: auto;
}
.nws-modal-heading {
  font-family: "Newsreader", "Geist", system-ui, serif;
  font-size: 20px;
  text-align: center;
  margin: 0 0 4px;
}
.nws-modal-sub {
  font-family: "Geist Mono", monospace;
  font-size: 10px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--ink-3, #6A6658);
  text-align: center;
  margin: 0 0 20px;
}

/* language grid (step 1) */
.nws-lang-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line, #1A1A1A);
  border: 1px solid var(--line, #1A1A1A);
}
.nws-lang-cell {
  background: var(--paper, #F2EFE3);
  border: 0;
  cursor: pointer;
  padding: 18px 14px;
  text-align: center;
  font-family: "Geist", system-ui, sans-serif;
  font-size: 15px;
  color: var(--ink, #0A0A0A);
}
.nws-lang-cell:hover { background: var(--paper-2, #E8E3D2); }
.nws-lang-cell.is-active { font-weight: 700; text-decoration: underline; }

/* edition list (step 2) */
.nws-edition-list { display: flex; flex-direction: column; }
.nws-edition-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: var(--paper, #F2EFE3);
  border: 1px solid var(--line, #1A1A1A);
  margin-top: -1px;
  padding: 13px 14px;
  cursor: pointer;
  font-family: "Geist", system-ui, sans-serif;
  color: var(--ink, #0A0A0A);
}
.nws-edition-row:hover { background: var(--paper-2, #E8E3D2); }
.nws-edition-row .flag { font-size: 18px; width: 24px; text-align: center; }
.nws-edition-row .star { color: var(--red, #D72F2F); font-size: 16px; width: 24px; text-align: center; }
.nws-edition-row .name { font-size: 15px; }
.nws-edition-row .note { font-size: 12px; color: var(--ink-3, #6A6658); margin-left: 6px; }
.nws-edition-row .arrow { margin-left: auto; color: var(--ink-3, #6A6658); }
.nws-back {
  background: transparent; border: 0; cursor: pointer; padding: 0 0 14px;
  font-family: "Geist Mono", monospace; font-size: 11px; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--ink-3, #6A6658);
}
.nws-back:hover { color: var(--ink, #0A0A0A); }

/* first-visit suggestion toast (Part 2.1) */
.nws-suggest {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 1900;
  display: flex;
  align-items: center;
  gap: 14px;
  background: #1a1a1a;
  color: #FAF8F3;
  border: 1px solid #1a1a1a;
  padding: 12px 16px;
  max-width: 92vw;
  font-family: "Geist", system-ui, sans-serif;
  font-size: 13px;
}
.nws-suggest b { font-weight: 700; }
.nws-suggest .go {
  background: var(--paper, #F2EFE3); color: #0A0A0A; border: 0;
  padding: 7px 12px; cursor: pointer;
  font-family: "Geist Mono", monospace; font-weight: 700; font-size: 11px; letter-spacing: 1px;
}
.nws-suggest .dismiss {
  background: transparent; color: #b9b4a8; border: 0; cursor: pointer;
  font-family: "Geist Mono", monospace; font-size: 14px;
}

@media (max-width: 520px) {
  .nws-lang-grid { grid-template-columns: repeat(2, 1fr); }
  .nws-lang-trigger { gap: 12px; flex-wrap: wrap; }
}
