﻿/* Country editions selector — isolated to the News from the World category. */
.category-page .category-links.world-country-nav {
  position: relative;
  z-index: 20;
  display: block;
  overflow: visible;
  white-space: normal;
  margin: 18px 0 24px;
  padding: 0;
  border: 0;
}
.category-page .category-links.world-country-nav > a.country-link { display: none !important; }
.category-page .category-links.world-country-nav > a:not(.country-link) { display: none !important; }

.world-country-menu-bar {
  position: relative;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: center;
  gap: 22px;
  padding: 18px 20px;
  overflow: visible;
  border: 1px solid #173a61;
  border-radius: 10px;
  background:
    radial-gradient(ellipse at 100% 0%, rgb(71 105 201 / 38%), transparent 44%),
    linear-gradient(112deg, #091b3b 0%, #102e55 58%, #173d69 100%);
  box-shadow: 0 10px 26px rgb(9 27 59 / 15%);
}
.world-country-menu-intro { display: grid; gap: 4px; min-width: 0; }
.world-country-menu-intro > span:first-child {
  color: #a9c4e4;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .17em;
}
.world-country-menu-intro strong { color: #fff; font-size: 20px; line-height: 1.2; }
.world-country-menu-intro > span:last-child { color: #d2deee; font-size: 13px; line-height: 1.45; }

.world-country-menu-controls { display: flex; align-items: center; gap: 9px; min-width: 0; }
.world-country-overview-link,
.world-country-picker-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 15px;
  border: 1px solid rgb(255 255 255 / 25%);
  border-radius: 7px;
  background: rgb(255 255 255 / 9%);
  color: #fff;
  font: 700 13px/1.2 'DM Sans', sans-serif;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.world-country-overview-link { background: #fff; border-color: #fff; color: #102c54; }
.world-country-overview-link::after { content: '→'; color: #195594; font-size: 17px; line-height: 1; }
.world-country-overview-link:hover { background: #f2f7fd; border-color: #f2f7fd; color: #081d3e; transform: translateY(-1px); }
.world-country-picker-trigger:hover,
.world-country-picker[open] > .world-country-picker-trigger {
  border-color: rgb(255 255 255 / 55%);
  background: rgb(255 255 255 / 17%);
  color: #fff;
}
.world-country-overview-link:focus-visible,
.world-country-picker-trigger:focus-visible,
.world-country-option:focus-visible,
.world-country-search input:focus-visible {
  outline: 3px solid #f5c84c;
  outline-offset: 2px;
}
.world-country-picker { position: relative; min-width: 0; }
.world-country-picker > summary { list-style: none; }
.world-country-picker > summary::-webkit-details-marker { display: none; }
.world-country-picker-trigger { min-width: 270px; max-width: min(360px, 44vw); justify-content: space-between; cursor: pointer; }
.world-country-picker-trigger::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f5c84c;
  content: '';
}
.world-country-trigger-flag { width: 24px; height: 16px; flex: 0 0 24px; object-fit: cover; border-radius: 2px; box-shadow: 0 0 0 1px rgb(255 255 255 / 22%); }
.world-country-globe { display: block; width: 22px; height: 22px; flex: 0 0 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.world-country-picker-label { flex: 1 1 auto; min-width: 0; max-width: 190px; overflow: hidden; text-overflow: ellipsis; }
.world-country-picker-count { color: #d6e1ef; font-size: 11px; font-weight: 500; }
.world-country-picker-chevron {
  width: 8px;
  height: 8px;
  border-right: 2px solid #e9f0fa;
  border-bottom: 2px solid #e9f0fa;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .18s ease;
}
.world-country-picker[open] .world-country-picker-chevron { transform: rotate(225deg) translate(-1px, -1px); }

.world-country-picker-panel {
  position: absolute;
  top: calc(100% + 11px);
  right: 0;
  z-index: 30;
  width: min(780px, calc(100vw - 40px));
  padding: 19px;
  border: 1px solid #d8e2ec;
  border-top: 3px solid #174d7b;
  border-radius: 9px;
  background: #fff;
  font-family: 'DM Sans', sans-serif;
  box-shadow: 0 20px 52px rgb(9 27 59 / 22%);
}
.world-country-picker-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 13px; }
.world-country-picker-heading-copy { display: grid; gap: 2px; min-width: 0; }
.world-country-picker-heading strong { color: #172538; font-size: 17px; }
.world-country-picker-heading span { color: #738299; font-size: 12px; }
.world-country-picker-close { display: inline-grid; place-items: center; width: 36px; height: 36px; flex: 0 0 36px; padding: 0; border: 1px solid #e2e9f0; border-radius: 50%; background: #f6f8fb; color: #294360; cursor: pointer; }
.world-country-picker-close:hover { background: #eaf1f8; border-color: #cbd9e8; }
.world-country-picker-close svg { display: block; width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.world-country-picker-backdrop { display: none; }
.world-country-search {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 45px;
  margin-bottom: 13px;
  padding: 0 13px;
  border: 1px solid #d9e2ec;
  border-radius: 6px;
  background: #f8fafc;
  color: #42698d;
}
.world-country-search:focus-within { border-color: #25639a; box-shadow: 0 0 0 3px rgb(37 99 154 / 12%); background: #fff; }
.world-country-search-icon { display: flex; width: 19px; height: 19px; flex: 0 0 19px; }
.world-country-search-icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.world-country-search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: #202c3a; font: 14px/1.4 'DM Sans', sans-serif; }
.world-country-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  max-height: min(400px, 56vh);
  overflow: auto;
  padding: 2px 3px 2px 0;
}
.world-country-options .world-country-option {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  min-height: 41px;
  margin: 0;
  padding: 7px 9px;
  border: 1px solid #edf1f5;
  border-radius: 6px;
  background: #fff;
  color: #263649;
  font-size: 13px;
  line-height: 1.25;
  text-decoration: none;
  white-space: normal;
  transition: border-color .14s ease, background-color .14s ease, color .14s ease, transform .14s ease;
}
.world-country-options .world-country-option:hover { border-color: #c7d8e8; background: #f3f8fc; color: #123d66; transform: translateY(-1px); }
.world-country-options .world-country-option.current { border-color: #a9c4de; background: #eaf2fa; color: #123d66; font-weight: 700; }
.world-country-options .world-country-option[hidden] { display: none !important; }
.world-country-options .world-country-option .country-flag { display: block; width: 20px !important; height: 14px !important; flex: 0 0 20px !important; object-fit: cover; border-radius: 2px; box-shadow: 0 0 0 1px rgb(0 0 0 / 10%); }
.world-country-option-name { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: 'DM Sans', sans-serif; }
.world-country-no-results { margin: 6px 0 0; color: #6c7c88; font-size: 13px; }
.world-country-no-results[hidden] { display: none; }

.category-page .section-monogram .country-flag-masthead { display: block; width: 112px; height: 75px; object-fit: cover; border-radius: 3px; box-shadow: 0 2px 7px rgb(0 0 0 / 18%); }
.category-subdesks .country-flag-heading { display: block; width: 24px !important; height: 16px !important; flex: 0 0 24px !important; object-fit: cover; border-radius: 2px; box-shadow: 0 0 0 1px rgb(0 0 0 / 10%); }

@media (max-width: 700px) {
  .category-page .category-links.world-country-nav { margin: 14px 0 20px; }
  .world-country-menu-bar { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 16px; }
  .world-country-menu-intro strong { font-size: 18px; }
  .world-country-menu-intro > span:last-child { font-size: 12px; }
  .world-country-menu-controls { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 8px; }
  .world-country-overview-link,
  .world-country-picker-trigger { width: 100%; min-width: 0; max-width: none; min-height: 46px; padding: 0 10px; font-size: 12px; }
  .world-country-picker-trigger { justify-content: flex-start; }
  .world-country-picker-count { display: none; }
  .world-country-picker-label { max-width: none; }
  .world-country-picker-chevron { flex: 0 0 8px; }
  body.world-country-picker-open { overflow: hidden; }
  .world-country-picker-backdrop.is-open { display: block; position: fixed; inset: 0; z-index: 1000; width: 100%; height: 100%; padding: 0; border: 0; background: rgb(7 19 40 / 58%); backdrop-filter: blur(2px); }
  .world-country-picker-panel { position: fixed; inset: auto 0 0; box-sizing: border-box; width: 100%; max-height: min(88vh, 88dvh, 760px); margin: 0; padding: 23px 18px calc(17px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; transform: none; z-index: 1001; overflow: hidden; border: 1px solid #d8e2ec; border-top: 3px solid #174d7b; border-right: 0; border-bottom: 0; border-left: 0; border-radius: 18px 18px 0 0; box-shadow: 0 -18px 55px rgb(5 16 37 / 22%); }
  .world-country-picker-panel::before { content: ''; position: absolute; top: 8px; left: 50%; width: 38px; height: 4px; border-radius: 99px; background: #d8e2ec; transform: translateX(-50%); }
  .world-country-picker-heading,
  .world-country-search { flex: 0 0 auto; }
  .world-country-picker-heading { margin: 0 0 14px; padding-top: 2px; }
  .world-country-picker-heading strong { font-size: 18px; line-height: 1.2; }
  .world-country-picker-heading span { font-size: 12px; }
  .world-country-picker-close { width: 42px; height: 42px; flex-basis: 42px; }
  .world-country-search { height: 48px; margin-bottom: 12px; border-radius: 10px; }
  .world-country-search input { font-size: 16px; }
  .world-country-options { grid-template-columns: minmax(0, 1fr); gap: 6px; flex: 1 1 auto; min-height: 0; max-height: none; overscroll-behavior: contain; padding-right: 2px; }
  .world-country-options .world-country-option { min-height: 48px; padding: 9px 12px; border-radius: 9px; font-size: 14px; }
  .world-country-options .world-country-option .country-flag { width: 22px !important; height: 15px !important; flex-basis: 22px !important; }
}
@media (max-width: 360px) {
  .world-country-menu-controls { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .world-country-picker-chevron,
  .world-country-overview-link,
  .world-country-picker-trigger,
  .world-country-option { transition: none !important; transform: none !important; }
}
