/* /alert/ and /da/alert/ (src/components/AlertView.astro), on top of style.css.
   Same look as the travel checklist (travel.css), with the tone colours
   darkened where needed for WCAG AA contrast. Everything is scoped to
   .alert-page so nothing leaks into the site's own styles. */
.alert-page {
  --a-surface: var(--color-surface);
  --a-surface-1: #f5f3ec;
  --a-text: var(--color-text);
  --a-muted: #4d4d4d;
  --a-border: var(--color-border);
  --a-border-strong: #6b6b6b;
  --a-link: #1556a6;
  --a-check: #2e6b30;

  --danger-bg: #fce4ec;  --danger-text: #a51d1d;
  --accent-bg: #e3f2fd;  --accent-text: #0d4f9e;
  --warning-bg: #fff4d6; --warning-text: #8a3b00;
  --success-bg: #e8f5e9; --success-text: #1b5e20;
  --neutral-bg: #f5f3ec; --neutral-text: #2a2a2a;

  --official-bg: #e3f2fd; --official-text: #0d4f9e;
  --mine-bg: #fff4d6;     --mine-text: #8a3b00;
}
.alert-page .section-inner { max-width: 760px; }
.alert-page a { color: var(--a-link); text-underline-offset: 0.15em; }
.alert-page a:hover { text-decoration-thickness: 2px; }
.alert-page :focus-visible { outline: 3px solid var(--a-link); outline-offset: 2px; }

/* Badge legend (as on /travel/) */
.alert-page .badge-legend { background: var(--a-surface); border: 1px solid var(--a-border); border-radius: 12px; padding: 1rem 1.25rem; margin-bottom: 1rem; }
.alert-page .badge-legend-title { font-size: 0.85rem; font-weight: 700; color: var(--a-muted); text-transform: uppercase; letter-spacing: 0.06em; margin: 0 0 0.6rem; }
.alert-page .badge-legend-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; font-size: 0.95rem; }
.alert-page .badge-legend-list .check-badge { margin: 0 4px 0 0; }

.alert-page .check-badge { display: inline-block; font-size: 0.8rem; line-height: 1.4; padding: 1px 8px; border-radius: 4px; font-weight: 600; margin-left: 6px; white-space: nowrap; vertical-align: 1px; }
.alert-page .badge-official { background: var(--official-bg); color: var(--official-text); }
.alert-page .badge-mine { background: var(--mine-bg); color: var(--mine-text); }

/* Progress */
.alert-page .progress-container { background: var(--a-surface-1); border-radius: 12px; padding: 1.25rem; margin-bottom: 1.5rem; }
.alert-page .progress-container[hidden] { display: none; }
.alert-page .section-inner .progress-text { font-size: 1.05rem; font-weight: 700; margin: 0; }
.alert-page .progress-bar-outer { background: var(--a-border); border-radius: 999px; height: 14px; overflow: hidden; margin: 10px 0; }
.alert-page .progress-bar-inner { background: var(--a-check); height: 100%; width: 0; border-radius: 999px; transition: width 0.3s ease; }
.alert-page .section-inner .progress-sub { margin: 0; color: var(--a-muted); font-size: 0.95rem; }
.alert-page .section-inner .progress-warning { margin: 0.5rem 0 0; color: var(--danger-text); font-weight: 600; font-size: 0.95rem; }

/* Categories */
.alert-page .checklist-category { background: var(--a-surface); border: 1px solid var(--a-border); border-radius: 12px; overflow: hidden; margin-bottom: 12px; }
.alert-page .category-header { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 12px 1.25rem; background: var(--tone-bg); border-bottom: 1px solid var(--a-border); }
.alert-page .section-inner .category-header h2 { margin: 0; font-size: 1.1rem; line-height: 1.3; color: var(--tone-text); }
.alert-page .tone-danger  { --tone-bg: var(--danger-bg);  --tone-text: var(--danger-text); }
.alert-page .tone-accent  { --tone-bg: var(--accent-bg);  --tone-text: var(--accent-text); }
.alert-page .tone-warning { --tone-bg: var(--warning-bg); --tone-text: var(--warning-text); }
.alert-page .tone-success { --tone-bg: var(--success-bg); --tone-text: var(--success-text); }
.alert-page .tone-neutral { --tone-bg: var(--neutral-bg); --tone-text: var(--neutral-text); }
.alert-page .category-count { font-size: 0.85rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: var(--a-surface); color: var(--a-muted); white-space: nowrap; }
.alert-page .category-count:empty { display: none; }
.alert-page .category-count.done { background: var(--success-bg); color: var(--success-text); }
.alert-page .category-body { padding: 0.25rem 1.25rem 0.75rem; }
.alert-page .section-inner .category-intro { margin: 0.75rem 0 0.25rem; font-weight: 600; }

/* Check items: native checkbox + label, whole row is at least 44px tall */
.alert-page .check-list { list-style: none; margin: 0; padding: 0; }
.alert-page .check-item { display: flex; align-items: flex-start; gap: 12px; padding: 4px 0; border-bottom: 1px solid var(--a-border); }
.alert-page .check-item:last-child { border-bottom: none; }
.alert-page .check-item input {
  flex-shrink: 0;
  width: 24px; height: 24px;
  /* 10px top margin centres the box on the first 44px-tall label line */
  margin: 10px 0 0;
  accent-color: var(--a-check);
  cursor: pointer;
}
.alert-page .check-text { flex: 1; min-width: 0; }
.alert-page .check-item label { display: block; padding: 10px 0; min-height: 44px; cursor: pointer; }
.alert-page .check-label { font-size: 1rem; }
.alert-page .check-item input:checked + .check-text .check-label { text-decoration: line-through; text-decoration-thickness: 2px; color: var(--a-muted); }
.alert-page .section-inner .check-hint { margin: -6px 0 8px; font-size: 0.92rem; color: var(--a-muted); }
.alert-page .check-hint a, .alert-page .info-note a { display: inline-block; padding: 12px 0; margin: -12px 0; }

/* Official links */
.alert-page .section-inner .links-title { font-size: 0.85rem; font-weight: 700; color: var(--a-muted); text-transform: uppercase; letter-spacing: 0.06em; margin: 1rem 0 0.25rem; }
.alert-page .link-list { list-style: none; margin: 0; padding: 0; }
.alert-page .link-list li { padding: 6px 0; border-bottom: 1px solid var(--a-border); }
.alert-page .link-list li:last-child { border-bottom: none; }
.alert-page .link-list a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.alert-page .link-note { display: block; font-size: 0.9rem; color: var(--a-muted); margin-top: -6px; }

/* Buttons */
.alert-page .alert-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 1.25rem; }
.alert-page .alert-actions[hidden] { display: none; }
.alert-page .alert-btn {
  min-height: 44px; padding: 8px 18px;
  font: inherit; font-size: 0.95rem; font-weight: 600;
  color: var(--a-text); background: var(--a-surface);
  border: 1px solid var(--a-border-strong); border-radius: var(--radius); cursor: pointer;
}
.alert-page .alert-btn:hover { background: var(--a-surface-1); }
.alert-page .alert-btn-danger { color: var(--danger-text); }
.alert-page .alert-btn-danger:hover { background: var(--danger-bg); }

/* Guidance + privacy note */
.alert-page .info-note { background: var(--a-surface-1); border: 1px solid var(--a-border); border-radius: 12px; padding: 0.875rem 1.25rem; margin-top: 1.5rem; font-size: 0.95rem; }
.alert-page .section-inner .info-note p { margin: 0.25rem 0; }
.alert-page .info-note-title { font-weight: 700; }

@media (prefers-reduced-motion: reduce) {
  .alert-page .progress-bar-inner { transition: none; }
}

@media print {
  .site-header, .site-footer, .skip-link, .nav-flags, #cookie-banner,
  .alert-page .progress-container, .alert-page .alert-actions { display: none !important; }
  body { font-size: 11pt; background: #fff; color: #000; }
  .page-hero { background: none !important; color: #000 !important; padding: 0 0 0.5rem !important; text-align: left; }
  .page-hero p { color: #333 !important; margin: 0; }
  .alert-page.page-section { padding: 0 !important; background: none !important; }
  .alert-page .section-inner { max-width: none; }
  .alert-page .badge-legend { border: 1px solid #999; padding: 6px 10px; margin-bottom: 8px; }
  .alert-page .checklist-category { break-inside: avoid; border: 1px solid #999; margin-bottom: 8px; }
  .alert-page .category-header { background: none; border-bottom: 1px solid #999; padding: 6px 10px; }
  .alert-page .section-inner .category-header h2 { color: #000; font-size: 13pt; }
  .alert-page .category-body { padding: 0 10px 4px; }
  .alert-page .check-item label { padding: 4px 0; min-height: 0; }
  .alert-page .check-item input { margin-top: 5px; width: 14px; height: 14px; }
  .alert-page .section-inner .check-hint { margin: 0 0 4px; }
  .alert-page .check-hint a, .alert-page .info-note a, .alert-page .link-list a { padding: 0; margin: 0; min-height: 0; }
  .alert-page .check-badge { border: 1px solid #666; background: none; color: #000; }
  .alert-page a { color: #000; }
  .alert-page .check-hint a[href^="http"]::after, .alert-page .link-list a[href^="http"]::after, .alert-page .info-note a[href^="http"]::after {
    content: " (" attr(href) ")"; font-weight: normal; word-break: break-all;
  }
}
