/* Header nav tweaks */
.govuk-header__content nav { float: right; }
.govuk-header__link + .govuk-header__link { margin-left: 15px; }

/* Pill / tag spacing */
.app-pillbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.app-pillbar--inline { display: inline-flex; margin-left: 8px; vertical-align: middle; }
.app-tag { display: inline-block; padding: 2px 8px; line-height: 1.4; }
.app-tag.app-tag--link { text-decoration: none; }
.app-tag.app-tag--link:hover { text-decoration: underline; }
.app-tag.app-tag--button { cursor: pointer; border: 0; background: transparent; }
.app-tag.app-tag--code {
  background-color: #f3f2f1;
  color: #0b0c0c;
  border: 1px solid #b1b4b6;
}

.app-station { display: flex; flex-direction: column; gap: 6px; }
.app-station__row { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
.app-station__name { font-weight: 700; }
.app-station__codes, .app-station__actions { margin-left: 0; }

.pill-menu__wrap { display: inline-block; }

/* Legacy station list spacing (kept for compatibility) */
#station-list li { margin-bottom: 6px; }

/* ------------------------------------------------------------------
   Results list (index search)
------------------------------------------------------------------- */
#list { list-style: none; margin: 0; padding: 0; }
.result {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .25rem 0;
}
.result__name {
  text-decoration: underline;
  font-weight: 700;
}
.result__code { color: #6f777b; }

/* Generic pill (used for RTT and Tiger summary) */
.pill {
  display: inline-block;
  padding: .25rem .5rem;
  border-radius: .25rem;
  background: #eef2f5;
  text-decoration: none;
  line-height: 1.3;
}
.pill:hover { text-decoration: underline; }

/* ------------------------------------------------------------------
   Tiger dropdown (shared between index + station pages)
------------------------------------------------------------------- */
details.pill-menu { display: inline-block; position: relative; }
details.pill-menu > summary.pill {
  list-style: none;
  cursor: pointer;
}
details.pill-menu > summary::-webkit-details-marker { display: none; }

/* Dropdown panel */
.pill-menu__items {
  position: absolute;
  z-index: 1000;
  margin-top: .25rem;
  background: #fff;
  border: 1px solid #b1b4b6;
  border-radius: 4px;
  min-width: 240px;
  box-shadow: 0 2px 8px rgba(11,12,12,0.2);
  padding: 4px;
}
.pill-menu__items a {
  display: block;
  padding: 6px 8px;
  text-decoration: none;
}
.pill-menu__items a:hover {
  background: #f3f2f1;
  text-decoration: none;
}

/* Keep dropdown from overflowing off-screen on narrow viewports */
@media (max-width: 380px) {
  .pill-menu__items { right: 0; left: auto; min-width: 200px; }
}

/* ------------------------------------------------------------------
   Popover menu (existing component)
------------------------------------------------------------------- */
/* Popover host sits at viewport, captures nothing by itself */
#app-popover-root {
  position: fixed;     /* was relative */
  inset: 0;            /* top/right/bottom/left: 0 */
  pointer-events: none;
  z-index: 2147483647; /* be shameless */
}

/* Popover itself is fixed to the viewport and clickable */
.app-popover {
  position: fixed;     /* was absolute */
  background: #fff;
  border: 1px solid #b1b4b6;
  border-radius: 4px;
  min-width: 240px;
  box-shadow: 0 2px 8px rgba(11,12,12,0.2);
  padding: 8px 8px 6px;
  z-index: 2147483647;
  pointer-events: auto;
}

.app-popover__title {
  font-weight: bold;
  margin: 4px 4px 6px;
}

.app-popover__list { list-style: none; margin: 0; padding: 0; }
.app-popover__list li { margin: 0; padding: 0; }
.app-popover__list a { display: block; padding: 6px 8px; }
.app-popover__list a:hover { background: #f3f2f1; text-decoration: none; }
