/* css/onboarding.css — Førstegangs-velkomst + bedre empty-states */

/* ========== App loading gate ========== */

body.hg-app:not(.hg-loaded) {
  overflow: hidden;
}

body.hg-app:not(.hg-loaded) > * {
  opacity: 0;
  pointer-events: none;
  user-select: none;
}

body.hg-app:not(.hg-loaded)::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 5000;
  background:
    radial-gradient(circle at 50% 35%, rgba(255,255,255,0.12), transparent 34%),
    linear-gradient(180deg, #111827 0%, #0b1210 100%);
  opacity: 1;
  pointer-events: auto;
}

body.hg-app:not(.hg-loaded)::after {
  content: "Laster History Go";
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 5001;
  transform: translate(-50%, -50%);
  min-width: 220px;
  padding-top: 76px;
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-align: center;
  text-shadow: 0 2px 14px rgba(0,0,0,0.45);
  opacity: 1;
  pointer-events: none;
}

body.hg-app:not(.hg-loaded):not(.hg-load-failed)::after {
  background:
    radial-gradient(circle, transparent 54%, rgba(255,255,255,0.9) 56%, rgba(255,255,255,0.9) 62%, transparent 64%) center 0 / 52px 52px no-repeat;
  animation: hgLoaderPulse 1.05s ease-in-out infinite;
}

body.hg-app.hg-load-failed::after {
  content: "Appen kunne ikke lastes. Sjekk konsollen.";
  max-width: 320px;
  line-height: 1.35;
  padding-top: 0;
  color: #fff;
  animation: none;
}

@keyframes hgLoaderPulse {
  0%, 100% {
    opacity: 0.72;
    transform: translate(-50%, -50%) scale(0.985);
  }

  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.hg-onboarding-modal {
  position: fixed;
  inset: 0;
  z-index: 2200;
  background: rgba(8, 12, 18, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  overflow-y: auto;
  backdrop-filter: blur(4px);
  animation: hgOnbFade 0.25s ease-out;
}

@keyframes hgOnbFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.hg-onb-inner {
  position: relative;
  width: 100%;
  max-width: 520px;
  background: #fff;
  color: #1c2016;
  border-radius: 18px;
  padding: 28px 26px 24px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.4);
  animation: hgOnbRise 0.3s cubic-bezier(0.2, 0.9, 0.3, 1);
}

@keyframes hgOnbRise {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.hg-onb-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 0;
  background: rgba(0,0,0,0.05);
  color: #555;
  cursor: pointer;
  font-size: 14px;
}

.hg-onb-close:hover { background: rgba(0,0,0,0.1); }

.hg-onb-head { margin-bottom: 20px; }

.hg-onb-kicker {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #5c6b52;
}

.hg-onb-title {
  margin: 4px 0 6px;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.hg-onb-sub {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: #5c6b52;
}

.hg-onb-steps {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hg-onb-steps li {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  align-items: start;
}

.hg-onb-step-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #eef5e6;
  font-size: 18px;
  flex: 0 0 auto;
}

.hg-onb-steps li strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 2px;
}

.hg-onb-steps li p {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: #5c6b52;
}

.hg-onb-actions {
  display: flex;
  justify-content: flex-end;
}

.hg-onb-primary {
  background: #2d5a1a;
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 12px 22px;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 120ms;
}

.hg-onb-primary:hover { background: #3a7022; }
.hg-onb-primary:active { transform: scale(0.98); }

/* ========== Bedre empty-states i venstre panel ========== */

.hg-empty-guide {
  padding: 24px 18px;
  text-align: center;
  color: rgba(255,255,255,0.85);
  background: rgba(255,255,255,0.04);
  border: 1px dashed rgba(255,255,255,0.18);
  border-radius: 14px;
  margin: 8px 4px;
}

.hg-empty-guide-icon {
  font-size: 36px;
  margin-bottom: 10px;
  opacity: 0.85;
}

.hg-empty-guide-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
  color: #fff;
}

.hg-empty-guide-text {
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255,255,255,0.7);
  margin-bottom: 14px;
}

.hg-empty-guide-action {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 10px;
  padding: 8px 16px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 120ms;
}

.hg-empty-guide-action:hover {
  background: rgba(255,255,255,0.2);
}

/* ========== Toast-posisjon og størrelse ========== */

body.hg-app #toast {
  position: absolute;
  top: auto;
  bottom: 130px;
  left: 50%;
  transform: translateX(-50%);

  width: min(760px, 84%);
  max-height: 369px;
  height: auto;
  overflow-y: auto;

  display: none;
  z-index: 30000;
  padding: 34px 86px 34px 38px;
  border-radius: 30px;

  background: rgba(8, 8, 8, 0.9);
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: 0 18px 46px rgba(0,0,0,0.45);
  color: #fff;
}

body.hg-app #toast .toast-body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 38px;
  line-height: 1.28;
  font-weight: 650;
  letter-spacing: -0.012em;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

body.hg-app #toast .toast-close {
  position: absolute;
  top: 24px;
  right: 24px;
  transform: none;

  width: 50px;
  height: 50px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;

  background: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 32px;
  line-height: 1;
  font-weight: 650;
  cursor: pointer;
}

body.hg-app .nature-unlock-stack {
  bottom: 130px;
  width: min(760px, 84%);
  max-height: 369px;
  overflow-y: auto;
}

body.hg-app .nature-unlock-card {
  grid-template-columns: 86px 1fr auto;
  gap: 18px;
  padding: 24px 22px 24px 20px;
  border-radius: 28px;
}

body.hg-app .nature-unlock-thumb {
  width: 86px;
  height: 86px;
  border-radius: 18px;
}

body.hg-app .nature-unlock-kicker {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
}

body.hg-app .nature-unlock-title,
body.hg-app .nature-unlock-card.is-badge .nature-unlock-title {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 32px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.012em;
}

body.hg-app .nature-unlock-latin,
body.hg-app .nature-unlock-card.is-badge .nature-unlock-latin {
  font-size: 21px;
  line-height: 1.3;
  font-weight: 550;
}

body.hg-app .nature-unlock-close {
  width: 48px;
  height: 48px;
  font-size: 24px;
  font-weight: 650;
}
