/* Additions for the Next magazine (not in the WordPress theme): place maps in the portal map style. */
.iw-mpin { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; background: var(--iw-yellow, #FDCF10); color: #000; border: 2px solid #000; border-radius: 50%; font: 800 13px/1 var(--iw-font-body, Inter, sans-serif); box-shadow: 0 2px 8px rgba(0,0,0,.2); cursor: pointer; }
.iw-mpin:focus-visible { outline: 3px solid #2676db; outline-offset: 3px; }
.iw-mpin.is-near { background: #000; color: var(--iw-yellow, #FDCF10); z-index: 2; }
.iw-mpin-me { width: 18px; height: 18px; background: #1a73e8; border: 3px solid #fff; border-radius: 50%; box-shadow: 0 0 0 6px rgba(26,115,232,.25); }
.iw-rmap .maplibregl-popup-content { border-radius: 10px; padding: 12px 14px; font: 400 14px/1.45 var(--iw-font-body, Inter, sans-serif); box-shadow: 0 4px 18px rgba(0,0,0,.15); }
.iw-rmap .maplibregl-popup-content a { color: #111; font-weight: 600; }
.iw-rmap .iw-rmap__map { background: #ECEEF5; }

/* Full-screen photo viewer (article photos). */
.iw-article__content img { cursor: zoom-in; }
.iw-rmap img, .iw-ad img { cursor: auto; }
.iw-lb { position: fixed; inset: 0; z-index: 10000; background: rgba(0,0,0,.94); display: grid; place-items: center; padding: 56px 72px; }
.iw-lb figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: 100%; max-height: 100%; }
.iw-lb figure img { max-width: 100%; max-height: calc(100svh - 150px); width: auto; height: auto; object-fit: contain; cursor: default; }
.iw-lb figcaption { color: #cfcfcf; font: 400 14px/1.4 var(--iw-font-body, Inter, sans-serif); text-align: center; }
.iw-lb button { position: absolute; border: 0; background: rgba(255,255,255,.1); color: #fff; width: 48px; height: 48px; border-radius: 50%; font: 400 28px/48px sans-serif; cursor: pointer; padding: 0; }
.iw-lb button:hover { background: var(--iw-yellow, #FDCF10); color: #000; }
.iw-lb__close { top: 16px; right: 16px; font-size: 20px !important; }
.iw-lb__nav--prev { left: 16px; top: 50%; transform: translateY(-50%); }
.iw-lb__nav--next { right: 16px; top: 50%; transform: translateY(-50%); }
.iw-lb__count { position: absolute; top: 28px; left: 24px; color: #cfcfcf; font: 700 13px/1 var(--iw-font-mono, monospace); letter-spacing: .08em; }
@media (max-width: 700px) { .iw-lb { padding: 64px 8px; } .iw-lb__nav { top: auto !important; bottom: 16px; transform: none !important; } }

/* Wide tables in article text never widen the page on phones: the table scrolls sideways inside the column. */
@media (max-width: 760px) {
  .iw-article__content table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .iw-article__content table th, .iw-article__content table td { min-width: 120px; }
  .iw-article__content .wp-block-table { max-width: 100%; overflow-x: auto; }
}

/* Photo credit on the article cover (CC BY / Unsplash licences) */
.iw-article__hero { position: relative; }
.iw-article__credit { position: absolute; right: 8px; bottom: 8px; max-width: calc(100% - 16px); padding: 3px 8px; border-radius: 4px; background: rgba(0,0,0,.55); color: #fff; font: 500 11px/1.35 var(--body, Inter, system-ui, sans-serif); letter-spacing: .01em; }
