/* Every material icon on the seat page, including the shared header and drawer. */
body[data-page="constituency-details"] .material-symbols-outlined {
  width: 1em;
  height: 1em;
  line-height: 1;
  vertical-align: middle;
}

body[data-page="constituency-details"] .material-symbols-outlined > svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: currentColor;
}

/* font-variation FILL does not apply to a path. icons.js draws both shapes. */
body[data-page="constituency-details"] .material-symbols-outlined .icon-star-fill {
  display: none;
}

body[data-page="constituency-details"] .watch[aria-pressed="true"] .icon-star-outline,
body[data-page="constituency-details"] .mobile-nav .active .icon-star-outline {
  display: none;
}

body[data-page="constituency-details"] .watch[aria-pressed="true"] .icon-star-fill,
body[data-page="constituency-details"] .mobile-nav .active .icon-star-fill {
  display: block;
}

/* style.css: .back-button .material-symbols-outlined { font-size: 20px }
   shell.css also boxes this span at 20px. */
body[data-page="constituency-details"] .back-button .material-symbols-outlined {
  width: 20px;
  height: 20px;
  font-size: 20px;
}

/* style.css icon block: .watch .material-symbols-outlined { font-size: 20px }
   The button itself stays 30px; the star is the 20px glyph inside it. */
body[data-page="constituency-details"] .watch .material-symbols-outlined {
  width: 20px;
  height: 20px;
  font-size: 20px;
}

/* style.css: .redelineation-note .material-symbols-outlined { font-size: .9375rem } */
body[data-page="constituency-details"] .redelineation-note .material-symbols-outlined {
  width: 0.9375rem;
  height: 0.9375rem;
  font-size: 0.9375rem;
}

/* style.css: .history-colour-note .material-symbols-outlined { font-size: 18px } */
body[data-page="constituency-details"] .history-colour-note .material-symbols-outlined {
  width: 18px;
  height: 18px;
  font-size: 18px;
}

/* style.css: .archive-notice / .archive-current-card icons are 20px. */
body[data-page="constituency-details"] .archive-notice .material-symbols-outlined,
body[data-page="constituency-details"] .archive-current-card .material-symbols-outlined {
  width: 20px;
  height: 20px;
  font-size: 20px;
}

/* style.css: .nomination-empty-state .material-symbols-outlined { font-size: 32px } */
body[data-page="constituency-details"] .nomination-empty-state .material-symbols-outlined {
  width: 32px;
  height: 32px;
  font-size: 32px;
}

/* style.css: winner trophy is 26px, 22px under 700px. Colour stays #56606d from .winner-icon. */
body[data-page="constituency-details"] .result-score .winner-icon {
  width: 26px;
  height: 26px;
  font-size: 26px;
}

@media (max-width: 700px) {
  body[data-page="constituency-details"] .result-score .winner-icon {
    width: 22px;
    height: 22px;
    font-size: 22px;
  }
}

/* style.css: .candidate-card-arrow { font-size: 24px }. The card column is 24px, 22px on small screens. */
body[data-page="constituency-details"] .candidate-card-arrow {
  width: 24px;
  height: 24px;
  font-size: 24px;
}

@media (max-width: 700px) {
  body[data-page="constituency-details"] .candidate-card-arrow {
    width: 22px;
    height: 22px;
    font-size: 22px;
  }
}

/* style.css share row: the more button is 22px, copy is 20px.
   The constituency-details 17px rule loses to those two selectors.
   The drawer uses the same two icons inside 30px buttons, so it follows them
   instead of the 24px box in candidates-v2.css. */
body[data-page="constituency-details"] .seat-share > .seat-share-actions > button > .material-symbols-outlined,
body[data-page="constituency-details"] .drawer-actions .material-symbols-outlined {
  width: 22px;
  height: 22px;
  font-size: 22px;
}

body[data-page="constituency-details"] .seat-share > .seat-share-actions > button[data-share-seat] > .material-symbols-outlined,
body[data-page="constituency-details"] #drawer-copy .material-symbols-outlined {
  width: 20px;
  height: 20px;
  font-size: 20px;
}

/* style.css: .drawer-close .material-symbols-outlined is 20px.
   candidates-v2.css paints this SVG at 24px; keep the seat-page size. */
body[data-page="constituency-details"] .drawer-close > .material-symbols-outlined {
  width: 20px;
  height: 20px;
  font-size: 20px;
}

body[data-page="constituency-details"] #close-alerts > .material-symbols-outlined {
  font-size: 16px;
  padding-top: 1px;
}


/* Copied state swaps the button contents for a check icon (seat-page.js). */
body[data-page="constituency-details"] .seat-share-actions button.is-copied .material-symbols-outlined,
body[data-page="constituency-details"] .drawer-actions button.is-copied .material-symbols-outlined {
  width: 1em;
  height: 1em;
}

/* Header sizes from style.css / shell.css. 1em already follows font-size;
   these pin the boxes that otherwise stretch to the 44px hit target. */
body[data-page="constituency-details"] .election-selector .material-symbols-outlined,
body[data-page="constituency-details"] .language .material-symbols-outlined {
  width: 1.125rem;
  height: 1.125rem;
  font-size: 1.125rem;
}

body[data-page="constituency-details"] .icon-button .material-symbols-outlined {
  width: 21px;
  height: 21px;
  font-size: 21px;
}

body[data-page="constituency-details"] .mobile-nav .material-symbols-outlined {
  width: 22px;
  height: 22px;
  font-size: 22px;
}

body[data-page="constituency-details"] .nav-watch .material-symbols-outlined {
  width: 1.25rem;
  height: 1.25rem;
  font-size: 1.25rem;
}

@media (max-width: 700px) {
  body[data-page="constituency-details"] .header-tools .material-symbols-outlined {
    width: 1.5rem;
    height: 1.5rem;
    font-size: 1.5rem;
  }

  body[data-page="constituency-details"] .header-tools .language .material-symbols-outlined {
    width: 1.35rem;
    height: 1.35rem;
    font-size: 1.35rem;
  }

  body[data-page="constituency-details"] .election-selector .material-symbols-outlined {
    width: 1.25rem;
    height: 1.25rem;
    font-size: 1.25rem;
  }

  /* shell.css: .mobile-more .material-symbols-outlined { font-size: 15px } */
  body[data-page="constituency-details"] .mobile-more .material-symbols-outlined {
    width: 15px;
    height: 15px;
    font-size: 15px;
  }
}

@media (max-width: 360px) {
  body[data-page="constituency-details"] .mobile-more .material-symbols-outlined {
    width: 12px;
    height: 12px;
    font-size: 12px;
  }
}

/* "The Star" external-link mark is a raw <svg>, not a material span.
   style.css sized the old icon at 18px in --muted. */
body[data-page="constituency-details"] .more-star > svg {
  display: block;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  fill: currentColor;
  color: var(--muted);
}

/* Archive label uses the watch-star slot: right of the heading, level with the seat name.
   style.css still centers it for the old place inside the title line. */
body[data-page="constituency-details"] .detail-heading > .archive-tag--title {
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 18px;
}

/* style.css writes the Official check as the corrupted bytes of ✓ (âœ“).
   Staging draws the mark with this rule. \2713 is U+2713, so the file
   encoding cannot turn it back into those bytes. */
body[data-page="constituency-details"] .status-confirmed:before,
body[data-page="constituency-details"] .official-tag:before {
  content: "\2713";
  font-weight: 800;
}

/* Share popup. Not in style.css; it only exists on the seat page. */
body[data-page="constituency-details"] .custom-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 10000000;
  align-items: center;
  justify-content: center;
}

body[data-page="constituency-details"] .custom-modal-overlay.is-open {
  display: flex;
}

body[data-page="constituency-details"] .custom-modal-box {
  background: #fff;
  padding: 40px 24px 24px;
  border-radius: 8px;
  max-width: 450px;
  width: 90%;
  position: relative;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  text-align: center;
}

body[data-page="constituency-details"] .custom-modal-close {
  position: absolute;
  top: 8px;
  right: 14px;
  font-size: 28px;
  color: #4a4a4a;
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
}

body[data-page="constituency-details"] .custom-modal-close:hover {
  opacity: 1;
}

body[data-page="constituency-details"] .share-more-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

body[data-page="constituency-details"] .share-more-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 88px;
  padding: 12px 8px;
  border: 1px solid #ececec;
  border-radius: 8px;
  background: #fff;
  color: #222;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}

body[data-page="constituency-details"] .share-more-item svg {
  display: block;
}
.candidate-drawer.open {
    margin-top: 20px;
}

/* style.css hides .masthead below 700px on body.compact-header. Only seat pages
   used that class, so a phone showed the nav row and dropped the logo, election
   switcher and tools. Other support pages keep that row. shell.css still
   supplies the phone grid once the masthead is shown again. */
@media (max-width: 700px) {
  body.compact-header .site-header .masthead {
    display: grid;
  }

  body.compact-header .site-header .navigation-row {
    box-shadow: none;
  }

  /* shell.css sticks the header at -masthead, so the nav row starts at the
     top of the viewport. The Star55 bar is fixed over that top 36px.
     --global-bar-height is set below when the bar is present. */
  body:has(#smg55-global-bar) .site-header {
    top: calc(var(--global-bar-height) - var(--mobile-masthead-height));
  }

  /* #more-menu is fixed from the full header height (masthead + nav). Once
     the header sticks, the masthead is above the viewport but still included
     in --header-height. The visible row is the 52px nav plus its 1px rule,
     under the Star55 bar. */
  body.compact-header #more-menu {
    top: calc(var(--global-bar-height, 0px) + 53px);
  }
}

/* Archive pages keep the brand and header tools, and omit the election switcher.
   :has() covers seat HTML generated before data-archive was written on the body. */
body[data-page="constituency-details"][data-archive] .site-header .election-controls,
body[data-page="constituency-details"]:has(.archive-notice) .site-header .election-controls {
  display: none;
}

@media (max-width: 1024px) {
  body[data-page="constituency-details"][data-archive] .site-header .masthead,
  body[data-page="constituency-details"]:has(.archive-notice) .site-header .masthead {
    height: auto;
    min-height: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
  }
}
body:has(#smg55-global-bar) {
    --global-bar-height: 36px;
}
body[data-page="constituency-details"] #candidate-drawer-body .seat-share-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
body[data-page="constituency-details"] #candidate-drawer-body .seat-share-actions a,
body[data-page="constituency-details"] #candidate-drawer-body .seat-share-actions button {
    width: 38px;
    height: 38px;
    padding: 0;
}
body[data-page="constituency-details"] #candidate-drawer-body #drawer-copy .material-symbols-outlined,
body[data-page="constituency-details"] #candidate-drawer-body #drawer-share .material-symbols-outlined
{
    width: 24px;
    height: 24px;
    font-size: 24px;
}

/* Zero-figures note under the totals box on polling day and while counting. */
body[data-page="constituency-details"] .seat-disclaimer {
  margin: 12px 0 0;
}

/* Counting: "Last updated …" under Live Results / Votes are being counted. */
body[data-page="constituency-details"] .section-heading .result-updated {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.4;
}

/* Accessibility and AI crawler text. Visually hidden; still in the page text. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}