/* Forge | language.css — full-screen language picker */

.lang-shell {
  min-height: 100vh;
  background: var(--bg);
  display: flex; flex-direction: column;
  padding: 24px 18px 32px;
  position: relative; isolation: isolate;
  overflow-x: hidden;
}
.lang-shell::before {
  content: '';
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(circle at 20% 5%, rgba(79,126,255,0.16), transparent 45%),
    radial-gradient(circle at 80% 15%, rgba(139,92,246,0.14), transparent 50%),
    radial-gradient(circle at 50% 95%, rgba(236,72,153,0.10), transparent 55%);
}

.lang-head {
  text-align: center;
  padding: 20px 0 24px;
}
.lang-globe {
  width: 76px; height: 76px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--gradient-forge);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 32px rgba(79,126,255,0.32);
  animation: globe-spin 8s linear infinite;
}
@keyframes globe-spin {
  to { transform: rotate(360deg); }
}
.lang-globe svg { width: 36px; height: 36px; }

/* Title written in all 4 languages stacked */
.lang-title-stack {
  display: flex; flex-direction: column; gap: 4px;
  margin-bottom: 6px;
}
.lang-title-stack > div {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  opacity: 0.72;
}
.lang-title-stack > div.primary {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-strong);
  letter-spacing: -0.02em;
  opacity: 1;
}

.lang-sub {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  margin-top: 8px;
}

/* Language cards */
.lang-list {
  display: flex; flex-direction: column; gap: 8px;
  max-width: 520px; margin: 0 auto; width: 100%;
}
.lang-card {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease,
              transform 160ms ease, box-shadow 160ms ease;
  animation: lang-in 340ms var(--ease-in) both;
  animation-delay: calc(var(--i, 0) * 30ms);
}
@keyframes lang-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.lang-card:active { transform: scale(0.99); }
.lang-card:hover:not(.disabled) {
  border-color: var(--border-strong);
  box-shadow: var(--sh-sm);
}

.lang-card .lc-flag {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.lang-card .lc-body { flex: 1; min-width: 0; }
.lang-card .lc-native {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-strong);
  line-height: 1.2;
}
.lang-card .lc-english {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 3px;
}
.lang-card .lc-check {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 200ms ease, transform 200ms ease;
  flex-shrink: 0;
}
.lang-card .lc-check svg { width: 12px; height: 12px; }
.lang-card.selected .lc-check { opacity: 1; transform: scale(1); }
.lang-card.selected {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.lang-card.suggested:not(.selected) {
  border-color: var(--primary);
}
.lang-card.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}
.lang-card .lc-coming {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted-2);
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--surface-2);
}

/* Section divider */
.lang-sep {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted-2);
  margin: 22px 0 6px;
}

/* Sticky bottom button */
.lang-cta {
  position: sticky;
  bottom: 0;
  max-width: 520px;
  width: 100%;
  margin: 20px auto 0;
  padding-top: 16px;
  background: linear-gradient(to top, var(--bg) 60%, transparent);
}
.lang-cta .btn { width: 100%; }
.lang-cta .lang-hint {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  margin-top: 10px;
}

/* ---------- Search box ---------- */
.lang-search {
  display: block;
  width: 100%;
  max-width: 520px;
  margin: 0 auto 14px;
  padding: 13px 16px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  font-size: 14.5px;
  font-family: inherit;
  outline: none;
  transition: border-color 160ms ease;
}
.lang-search:focus { border-color: var(--primary); }
.lang-search::placeholder { color: var(--muted-2); }

/* ---------- Loading spinner ---------- */
.lang-loading-spinner {
  width: 64px; height: 64px;
  border-radius: 50%;
  border: 4px solid var(--surface-2);
  border-top-color: var(--primary);
  animation: lang-spin 900ms linear infinite;
}
@keyframes lang-spin {
  to { transform: rotate(360deg); }
}

/* ---------- Auto vs verified small tag ---------- */
.lang-card .lc-verified {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--success);
  background: rgba(34,197,94,0.14);
  padding: 3px 8px; border-radius: 999px;
}
.lang-card .lc-auto {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--muted-2);
  background: var(--surface-2);
  padding: 3px 8px; border-radius: 999px;
}

/* ---------- Inline next button on each language card ---------- */
.lang-cta { display: none !important; } /* hide the old sticky CTA */

.lang-card .lc-next {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--muted-2);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  border: none;
  cursor: default;
  transition: background 200ms ease, color 200ms ease,
              transform 200ms ease, box-shadow 200ms ease;
}
.lang-card .lc-next svg { width: 18px; height: 18px; }

.lang-card.selected .lc-next {
  background: var(--gradient-forge);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(79,126,255,0.36);
}
.lang-card.selected .lc-next:active { transform: scale(0.94); }

/* The blue check inside the card is redundant now that the arrow is clear */
.lang-card .lc-check { display: none; }

/* ---------- Arrow removed ---------- */
.lang-card .lc-next { display: none !important; }
/* Selection is instant and proceeds — keep the card looking tappable */
.lang-card { cursor: pointer; }
