/* Fixed icon boxes avoid glyph baselines and default button padding.
   Colour and hit-area sizes continue to come from the existing GH theme. */
:root {
  --np-icon-close: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 6l12 12M6 18L18 6' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  --np-icon-plus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 5v14M5 12h14' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  --np-icon-minus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12h14' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  --np-icon-expand: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 3H3v6m12-6h6v6M3 15v6h6m12-6v6h-6' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --np-icon-play: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E");
  --np-icon-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12l4 4L19 6' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* Only icon controls are reset; cards and text actions keep their layout. */
.film-orbit,
.map-toolbar button,
.dialog-close,
.image-tools button,
.official-tour-close,
.np-plan-close,
.np-plan-zoom-controls > button,
.official-cover-icon,
#lm .icon-btn,
#lm #ctl button,
#lm #card .x {
  display: grid;
  place-items: center;
  align-content: center;
  justify-content: center;
  padding: 0;
  gap: 0;
  line-height: 1;
  text-align: center;
}

button > svg,
.official-cover-icon > svg,
#lm .icon-btn > svg,
#lm #ctl button > svg {
  display: block;
  flex-shrink: 0;
  vertical-align: middle;
}
.map-toolbar button > svg,
.np-plan-close > svg,
.np-plan-zoom-controls > button > svg {
  width: 20px;
  height: 20px;
  margin: 0;
}

/* The play triangle itself has an optical centre built into its SVG path. */
.film-orbit .play-icon {
  display: block;
  margin: 0;
  transform: none;
}
.film-play-circle {
  display: grid;
  place-items: center;
  align-content: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  font-size: 0;
  --np-control-icon: var(--np-icon-play);
  --np-control-icon-size: 22px;
}

/* Keep accessible names and existing click handlers; draw a centred vector
   instead of platform-dependent text glyphs such as ×, −, +, ▶ and ⛶. */
.dialog-close,
#imageZoomIn,
#imageZoomOut,
#mapExpand,
#lm #zIn,
#lm #zOut,
#lm #card .x {
  font-size: 0 !important;
  --np-control-icon-size: 20px;
}
.dialog-close, #lm #card .x { --np-control-icon: var(--np-icon-close); }
#imageZoomIn, #lm #zIn { --np-control-icon: var(--np-icon-plus); }
#imageZoomOut, #lm #zOut { --np-control-icon: var(--np-icon-minus); }
#mapExpand { --np-control-icon: var(--np-icon-expand); }
#mapExpand[aria-expanded="true"] { --np-control-icon: var(--np-icon-close); }
#mapExpand > svg { display: none; }

.gh-map-experience .leaflet-control-zoom > a {
  display: grid !important;
  place-items: center;
  align-content: center;
  justify-content: center;
  padding: 0 !important;
  line-height: 1 !important;
  font-size: 0 !important;
  text-indent: 0;
  --np-control-icon-size: 22px;
}
.gh-map-experience .leaflet-control-zoom-in { --np-control-icon: var(--np-icon-plus); }
.gh-map-experience .leaflet-control-zoom-out { --np-control-icon: var(--np-icon-minus); }
.gh-map-experience .leaflet-control-zoom > a > span { display: none; }

.film-play-circle::before,
.dialog-close::before,
#imageZoomIn::before,
#imageZoomOut::before,
#mapExpand::before,
.gh-map-experience .leaflet-control-zoom > a::before,
#lm #zIn::before,
#lm #zOut::before,
#lm #card .x::before,
.image-open > span[aria-hidden="true"]::before,
.library-item > i[aria-hidden="true"]::before,
.finance-detail > summary > span[aria-hidden="true"]::before,
.finance-catalog > summary > span[aria-hidden="true"]::before,
.plan-choice-check::before,
.np-res-card-check::before {
  content: "";
  display: block;
  width: var(--np-control-icon-size, 18px);
  height: var(--np-control-icon-size, 18px);
  background: currentColor;
  -webkit-mask: var(--np-control-icon) center / contain no-repeat;
  mask: var(--np-control-icon) center / contain no-repeat;
  pointer-events: none;
}

/* Inline icon badges also get square geometry, rather than a font line box. */
.image-open { align-items: center; }
.image-open > span[aria-hidden="true"],
.library-item > i[aria-hidden="true"],
.finance-detail > summary > span[aria-hidden="true"],
.finance-catalog > summary > span[aria-hidden="true"],
.plan-choice-check,
.np-res-card-check {
  display: grid;
  place-items: center;
  padding: 0;
  line-height: 1;
  font-size: 0;
  flex-shrink: 0;
}
.image-open > span[aria-hidden="true"] {
  width: 22px;
  height: 22px;
  --np-control-icon: var(--np-icon-expand);
}
.library-item > i[aria-hidden="true"] {
  width: 26px;
  height: 26px;
  --np-control-icon: var(--np-icon-expand);
}
.finance-detail > summary > span[aria-hidden="true"],
.finance-catalog > summary > span[aria-hidden="true"] {
  width: 26px;
  height: 26px;
  --np-control-icon: var(--np-icon-plus);
  --np-control-icon-size: 16px;
}
.finance-catalog[open] > summary > span[aria-hidden="true"] { transform: rotate(45deg); }
.plan-choice-check, .np-res-card-check {
  --np-control-icon: var(--np-icon-check);
  --np-control-icon-size: 13px;
}
.menu-toggle { padding: 0; }
.menu-toggle > span { flex-shrink: 0; margin: 0; }

@media (max-width: 680px) {
  .film-play-circle { --np-control-icon-size: 20px; }
  .library-item > i[aria-hidden="true"] {
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
  }
}

@media (max-width: 760px) and (min-height: 521px) {
  #lm .bd-head .icon-btn { display: none; }
}
