/* nimiq.tax — app styles.
 * Loaded after nimiq/legacy/nimiq-style.min.css. Custom rules are in px to dodge
 * the legacy 8px root. Component CSS that isn't in the legacy framework is
 * imported below. */
@import url("../components/status-alert/status-alert.css");

* {
  box-sizing: border-box;
}

/* Nimiq headings: semibold/bold, normal tracking, line-height 1.25–1.3. */
h1,
h2,
h3 {
  line-height: 1.25;
  letter-spacing: 0;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--page-bg);
  color: var(--ink);
  font-family: "Mulish", "Muli", system-ui, sans-serif !important;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.wrap {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--space-3);
}

/* ── Header ───────────────────────────────────────────────────────────── */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-3) 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand svg {
  display: block;
}

.brand .brand-name {
  font-weight: 700;
  font-size: 20px;
  color: var(--ink);
  letter-spacing: 0;
}

.header-right {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* Header connect button: keep the small visual weight but meet the 36px touch
 * target floor on mobile. */
#wallet-slot .nq-button-s {
  min-height: 36px;
  padding-left: 16px;
  padding-right: 16px;
  white-space: nowrap;
}

/* ── Hero ─────────────────────────────────────────────────────────────── */
.hero {
  text-align: center;
  padding: var(--space-6) 0 var(--space-5);
}

.hero h1 {
  font-size: 48px;
  line-height: 1.1;
  font-weight: 700;
  margin: 0 auto var(--space-3);
  max-width: 16ch;
  text-wrap: balance;
}

.hero p.sub {
  font-size: 19px;
  color: var(--ink-60);
  margin: 0 auto var(--space-4);
  max-width: 60ch;
  text-wrap: pretty;
}

.cta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.link-cta {
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  transition: color 0.2s var(--nimiq-ease, ease);
}

.link-cta:hover {
  color: var(--nimiq-light-blue, #0582ca);
}

/* ── Sections ─────────────────────────────────────────────────────────── */
.section {
  padding: var(--space-5) 0;
}

.section h2 {
  font-size: 30px;
  font-weight: 700;
  text-align: center;
  margin: 0 0 var(--space-5);
  text-wrap: balance;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}

.step {
  background: #fff;
  border-radius: var(--card-radius);
  box-shadow: 0 8px 56px rgba(0, 0, 0, 0.06);
  padding: var(--space-4);
  text-align: left;
}

.step .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-image: var(--nimiq-light-blue-bg);
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  margin-bottom: var(--space-2);
}

.step h3 {
  font-size: 19px;
  font-weight: 700;
  margin: 0 0 8px;
}

.step p {
  font-size: 16px;
  color: var(--ink-60);
  margin: 0;
}

/* Privacy highlight: navy gradient card (app surface) */
.privacy {
  background-image: var(--nimiq-blue-bg);
  border-radius: 16px;
  color: #fff;
  padding: var(--space-5);
  text-align: center;
}

.privacy h2 {
  color: #fff;
  margin-bottom: var(--space-2);
}

.privacy p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 18px;
  max-width: 56ch;
  margin: 0 auto;
}

.soon {
  max-width: 640px;
  margin: 0 auto;
}

/* The ported status-alert keeps an upstream full-bleed quirk (translateX(-8px)
 * + width:calc(100% + 16px)) that overflows narrow viewports. Neutralize it
 * inside our centered card. */
.soon .nq-status-alert {
  transform: none;
  width: 100%;
}

/* ── Footer ───────────────────────────────────────────────────────────── */
.site-footer {
  margin-top: auto;
  padding: var(--space-5) 0;
  text-align: center;
  color: var(--ink-40);
  font-size: 14px;
}

.site-footer a {
  color: var(--ink-60);
  font-weight: 600;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--ink);
}

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 720px) {
  .hero {
    padding: var(--space-5) 0 var(--space-4);
  }
  .hero h1 {
    font-size: 34px;
  }
  .hero p.sub {
    font-size: 17px;
  }
  .steps {
    grid-template-columns: 1fr;
  }
  .section h2 {
    font-size: 25px;
  }
}

/* ── Import + ledger (G6) ──────────────────────────────────────────────── */
.import-card {
  max-width: 560px;
  margin: 0 auto var(--space-4);
}

.field-label {
  display: block;
  font-weight: 600;
  color: var(--ink-60);
  font-size: 15px;
  margin-bottom: 8px;
}

.addr-area {
  width: 100%;
  font-family: "Fira Mono", ui-monospace, monospace;
  font-size: 14px;
  line-height: 1.6;
  padding: 12px 14px;
  resize: vertical;
  color: var(--ink);
  background: #fff;
}

.import-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.import-hint {
  margin-top: 16px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-40);
}

.ledger-status {
  max-width: 720px;
  margin: 0 auto var(--space-3);
}

.ledger-status .status-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ledger-status .spin {
  width: 22px;
  height: 22px;
  flex: none;
  border: 3px solid rgba(31, 35, 72, 0.15);
  border-top-color: var(--nimiq-light-blue, #0582ca);
  border-radius: 50%;
  animation: tax-spin 0.8s linear infinite;
}

@keyframes tax-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ledger-status .spin {
    animation-duration: 2.4s;
  }
}

.ledger-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 16px;
}

.ledger-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
}

.ledger-count {
  font-size: 14px;
  color: var(--ink-40);
}

.ledger-table {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ledger-row {
  display: grid;
  grid-template-columns: 84px 1fr auto;
  gap: 4px 16px;
  align-items: center;
  background: #fff;
  border-radius: 8px;
  padding: 14px 16px;
  box-shadow: 0 8px 56px rgba(0, 0, 0, 0.04);
}

.ledger-row.clickable {
  cursor: pointer;
  transition: box-shadow 0.2s var(--nimiq-ease, ease), transform 0.2s var(--nimiq-ease, ease);
}

.ledger-row.clickable:hover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.ledger-date {
  font-size: 13px;
  color: var(--ink-60);
  line-height: 1.3;
}

.ledger-date .l-day {
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
}

.l-mid {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.dir-badge {
  font-size: 12px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 4px;
}

.dir-badge.in {
  color: #1a8a78;
  background: rgba(33, 188, 165, 0.12);
}

.dir-badge.out {
  color: var(--ink-60);
  background: rgba(31, 35, 72, 0.07);
}

.cp-addr {
  font-family: "Fira Mono", ui-monospace, monospace;
  font-size: 13px;
  color: var(--ink-60);
  white-space: nowrap;
}

.l-amt {
  text-align: right;
  white-space: nowrap;
}

.amt {
  font-weight: 700;
  font-size: 15px;
}

.amt .cur {
  font-weight: 600;
  font-size: 12px;
  opacity: 0.7;
}

.amt.in {
  color: #1a8a78;
}

.amt.out {
  color: var(--ink-60);
}

.amt-usd {
  font-size: 13px;
  color: var(--ink-40);
  margin-top: 2px;
}

@media (max-width: 720px) {
  .ledger-row {
    grid-template-columns: 64px 1fr auto;
    padding: 12px;
  }
  .cp-addr {
    font-size: 12px;
  }
}
