/* Rapid alert page navigation: the sticky "Back to Rapid Alerts" bar at the top and the
   Previous / Next links at the end (defcon-alerts views/pages/alert-single.php, rapid
   alerts only; assets/rapid-nav.js drives the back link). Moved out of the page's own
   style block 2026-11-22. The back link is a clear outlined button, because the plain
   text link was easy to miss (owner 2026-11-14: "it's a bit small and hard to see. We
   don't want to make it annoying, and we want to make it professional"). */

.alert-backbar {
  position: sticky;
  top: var(--alert-backbar-top, 0);
  z-index: 150;
  margin: 0 0 var(--space-3, 12px);
  padding: var(--space-2, 8px) var(--space-3, 12px);
  background: var(--navbar-bg, var(--bg-primary));
  border-bottom: 1px solid var(--border-subtle, transparent);
  backdrop-filter: blur(10px);
}

.alert-backbar__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 0; /* page-wide 44px touch target (reset.css); the padding keeps a 2.25rem target */
  min-width: 0; /* phone-width 44px minimum on every link (mobile-polish.css) */
  padding: 0.45rem 1rem;
  border: 1px solid var(--accent-primary, #0ea5e9);
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent-primary, #0ea5e9) 14%, transparent);
  color: var(--accent-primary, #0ea5e9);
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
}

.alert-backbar__link:hover,
.alert-backbar__link:focus-visible {
  background: var(--accent-primary, #0ea5e9);
  color: var(--bg-primary, #0a0a0f);
  text-decoration: none;
}

.alert-backbar__link:focus-visible {
  outline: 2px solid var(--accent-primary, #0ea5e9);
  outline-offset: 2px;
}

/* The red live dot, the same red as the live alerts box's LIVE badge. */
.alert-backbar__dot {
  flex-shrink: 0;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #dc2626;
}

.alert-pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-3, 12px);
  margin-top: var(--space-6, 24px);
  padding-top: var(--space-4, 16px);
  border-top: 1px solid var(--border-subtle, currentColor);
}

.alert-pager__link {
  display: flex;
  flex-direction: column;
  flex: 1 1 14rem;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: var(--space-2, 8px) var(--space-3, 12px);
  text-decoration: none;
  text-align: left;
}

.alert-pager__link--next {
  text-align: right;
  margin-left: auto;
}

.alert-pager__dir {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-primary);
}

.alert-pager__title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  white-space: normal;
  overflow-wrap: anywhere;
  max-width: 100%;
}

@media (max-width: 600px) {
  .alert-pager {
    flex-direction: column;
  }

  .alert-pager__link,
  .alert-pager__link--next {
    flex: 1 1 auto;
    width: 100%;
    text-align: left;
    margin-left: 0;
  }

  .alert-pager__dir,
  .alert-pager__title {
    text-align: left;
    align-self: stretch;
  }
}
