/* ──────────────────────────────────────────────────────────────────
   TarantoRespira — inner-page styles (Info, Privacy, Terms, PWA,
   Notifiche). Imports the palette from map.css and adds the readable
   single-column layout used everywhere except the map itself.
   Light theme: soft-white page, deep-sea ink, teal + gold accents.
   ────────────────────────────────────────────────────────────────── */

html, body.page-body {
  overflow: auto;
  height: auto;
  min-height: 100%;
}

body.page-body {
  background:
    radial-gradient(60% 40% at 20% 0%, rgba(14,154,167,0.10) 0%, rgba(255,255,255,0) 60%),
    radial-gradient(50% 35% at 90% 8%, rgba(217,143,30,0.08) 0%, rgba(255,255,255,0) 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
}

/* ── Brand stays top-left, identical to the map page ──────────────── */
.page-body .brand {
  /* re-statement is safe; map.css already styles .brand */
}

/* ── Back-to-map chip, top-right ─────────────────────────────────── */
/* Safe-area insets so the chip clears the iOS notch / status bar in
   PWA-standalone mode. */
.page-back {
  position: fixed;
  top:   calc(env(safe-area-inset-top, 0px)   + 1.15rem);
  right: calc(env(safe-area-inset-right, 0px) + 1.4rem);
  z-index: 10;
  width: 2.4rem; height: 2.4rem;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--sea);
  background: var(--glass-strong);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  text-decoration: none;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}
.page-back svg {
  width: 1.1rem; height: 1.1rem;
  stroke: currentColor; fill: none;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.page-back:hover { transform: scale(1.06); background: rgba(14,154,167,0.12); border-color: var(--teal); }

/* ── Main content column ──────────────────────────────────────────── */
/* Top padding adds the status-bar inset so the page title doesn't
   collide with the iOS notch / Dynamic Island under standalone PWA. */
.page-main {
  max-width: 42rem;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top, 0px) + 6rem) 1.6rem 4rem;
}

.page-title {
  font-size: 2rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  color: var(--sea);
  margin-bottom: 0.4rem;
}
.page-subtitle {
  font-size: 0.88rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2rem;
}

.page-content h2 {
  font-size: 1.28rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  margin: 2rem 0 0.6rem;
  color: var(--sea);
}
.page-content h3 {
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  margin: 1.4rem 0 0.4rem;
  color: #35566a;
}
.page-content p,
.page-content li {
  font-size: 1.1rem;
  font-weight: 300;
  color: var(--text);
}
.page-content p { margin: 0.6rem 0; }
.page-content ul, .page-content ol { margin: 0.6rem 0 0.6rem 1.4rem; }
.page-content li { margin: 0.25rem 0; }
.page-content a {
  color: var(--teal);
  text-decoration: none;
  border-bottom: 1px solid rgba(14,154,167,0.40);
  transition: color 0.16s, border-color 0.16s;
}
.page-content a:hover { color: var(--gold); border-color: rgba(217,143,30,0.55); }
.page-content code, .page-content kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85em;
  background: rgba(14,154,167,0.10);
  border: 1px solid rgba(14,154,167,0.28);
  border-radius: 0.35rem;
  padding: 0.05rem 0.32rem;
}
.page-content strong, .page-content b {
  color: var(--sea);
  font-weight: 500;
}
.page-content hr {
  border: 0;
  height: 1px;
  background: var(--border);
  margin: 2.2rem 0;
}

/* ── Soft card (used for steps, info boxes) ───────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  padding: 1rem 1.2rem;
  margin: 0.9rem 0;
  box-shadow: 0 4px 14px rgba(20,45,64,0.07);
}
.card .card-title {
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

/* ── Step list — used on the PWA how-to ──────────────────────────── */
.steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 1rem 0;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding: 0.65rem 0 0.65rem 2.6rem;
  border-bottom: 1px solid var(--border);
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: 0.55rem;
  width: 1.8rem; height: 1.8rem;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(14,154,167,0.12);
  border: 1px solid rgba(14,154,167,0.40);
  font-size: 0.75rem;
  color: var(--teal);
}

/* ── Footer credit ────────────────────────────────────────────────── */
/* Bottom padding is generous so the nav launcher button (fixed, ~6rem at
   bottom-left) never overlaps the last line of footer text on scroll-end. */
.page-foot {
  max-width: 42rem;
  margin: 0 auto;
  /* Bottom padding adds the home-indicator inset on top of the existing
     9rem clearance for the floating launcher button. */
  padding: 1.5rem 1.6rem calc(env(safe-area-inset-bottom, 0px) + 9rem);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-align: center;
}
.page-foot a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--border-strong);
}
.page-foot a:hover { color: var(--sea); border-color: var(--sea); }

/* ── Notifiche page widgets ──────────────────────────────────────── */
.push-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.95rem;
  border-radius: 1.5rem;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
}
.push-status.on  { color: var(--teal);   border-color: rgba(14,154,167,0.45); }
.push-status.off { color: var(--muted); }
.push-status .dot {
  width: 0.5rem; height: 0.5rem; border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

.push-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 1rem; }
.push-btn {
  font-family: var(--font);
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.72rem 1.2rem;
  border-radius: 0.7rem;
  cursor: pointer;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--sea);
  transition: all 0.16s;
}
.push-btn:hover {
  background: rgba(14,154,167,0.10);
  border-color: var(--teal);
}
.push-btn-accent {
  background: rgba(217,143,30,0.14);
  border-color: rgba(217,143,30,0.50);
  color: var(--gold);
}
.push-btn-accent:hover { background: rgba(217,143,30,0.22); }
.push-btn[disabled] { opacity: 0.4; cursor: not-allowed; }

.push-msg {
  display: block;
  margin-top: 0.8rem;
  font-size: 0.92rem;
  color: var(--muted);
  min-height: 1.2em;
}

@media (max-width: 768px) {
  .page-main { padding: calc(env(safe-area-inset-top, 0px) + 5rem) 1.1rem 3rem; }
  .page-title { font-size: 1.55rem; }
  .page-back {
    top:   calc(env(safe-area-inset-top, 0px)   + 0.9rem);
    right: calc(env(safe-area-inset-right, 0px) + 1rem);
  }
}
