/* ==========================================================================
   Region pop-up (components/region.js), as the designers drew it: their region-selector.html of 2026-11-03 (Figma
   "Ready-to-Develop" 3657:17689 wrong region, 3657:17513 no match, 3658:17512 phone). Their classes, renamed for this
   site: .rp → .nf-region, .rp-card → .nf-region__card, .rp-go → .nf-region__go, and so on.
   - A dark backdrop and a white 647px card with 8px corners, left-aligned text and a thin ×.
   - The text roles of their typescale: title = Subsection (500, 28 / 26 / 24px), text = Body (400, 16px, grey),
     pill and "Stay" = Button (500, 15px), list rows = Nav item (500, 15px). The file draws them in Inter and says to
     use the site's own type: here this site's fonts (base.css).
   - A green pill with the suggested site; its arrow opens every other site in a list that tucks under the pill, and
     the pill widens to the list. "Stay" is outlined in green.
   - Up to 690px wide the two buttons stack and the pill shows only the language.
   Breakpoints for the type: desktop >= 1440, tablet 810-1439.98, phone <= 809.98. base.css resets buttons
   (all: unset, so box-sizing and centring are set here), lists and links.
   ========================================================================== */
.nf-region {
  --nf-region-ease: cubic-bezier(.33, 1, .68, 1);
  position: fixed; inset: 0; z-index: 1001; display: flex; overflow-y: auto; padding: 16px;
  background: rgba(0, 0, 0, .72); opacity: 0; transition: opacity 200ms var(--nf-region-ease);
}
.nf-region.is-in { opacity: 1; }

/* margin: auto centres the card and, on a very short screen, lets it scroll instead of cutting its top off */
.nf-region__card {
  position: relative; display: flex; flex-direction: column; width: 647px; max-width: 100%; margin: auto;
  padding: 32px; border-radius: 8px; background: var(--nf-white); color: var(--nf-black); text-align: left;
  opacity: 0; transform: translateY(8px) scale(.98);
  transition: opacity 220ms var(--nf-region-ease), transform 320ms var(--nf-region-ease);
}
.nf-region.is-in .nf-region__card { opacity: 1; transform: none; }
.nf-region__card:focus { outline: none; }

/* Close: a 16px icon with a 44px hit area */
.nf-region__top { display: flex; justify-content: flex-end; height: 16px; }
.nf-region__x {
  display: grid; place-items: center; flex: none; width: 44px; height: 44px; margin: -14px; border-radius: 50%;
  color: var(--nf-black); cursor: pointer;
}
.nf-region__x svg { width: 16px; height: 16px; }

.nf-region__copy { display: flex; flex-direction: column; gap: 16px; }
.nf-region__title {
  margin: 0; font-family: var(--nf-font-medium); font-weight: 500; font-size: 28px; line-height: 1.3;
  letter-spacing: -.02px; text-wrap: balance;
}
.nf-region__desc {
  margin: 0; font-family: var(--nf-font-regular); font-weight: 400; font-size: 16px; line-height: 1.5;
  letter-spacing: -.02px; color: var(--nf-grey-61); text-wrap: pretty;
}

/* ---------- The two buttons ---------- */
.nf-region__actions { display: flex; align-items: stretch; gap: 18px; padding-top: 32px; }
.nf-region__go, .nf-region__stay, .nf-region__opt {
  font-family: var(--nf-font-medium); font-weight: 500; font-size: 15px; line-height: 1.2; letter-spacing: -.02px;
}

.nf-region__select { position: relative; }
.nf-region__pill {
  position: relative; z-index: 2; display: flex; align-items: stretch; height: 51px; border-radius: 62px;
  background: var(--nf-green); overflow: hidden; transition: width 260ms var(--nf-region-ease);
}
.nf-region__go, .nf-region__toggle {
  display: flex; align-items: center; color: var(--nf-black); text-decoration: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.nf-region__go { flex: 1; gap: 16px; min-width: 0; padding: 0 8px 0 24px; }
.nf-region__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nf-region__toggle { padding: 0 24px 0 8px; }
.nf-region__toggle svg { width: 10px; height: 10px; transition: transform 260ms var(--nf-region-ease); }
.nf-region__select.is-open .nf-region__toggle svg { transform: rotate(180deg); }
.nf-region__go:active, .nf-region__toggle:active { background: #a5cf76; }

.nf-region__ico { display: block; flex: none; width: 18px; height: 18px; }

.nf-region__stay {
  box-sizing: border-box; display: flex; align-items: center; justify-content: center; height: 51px; padding: 0 24px;
  border: 1px solid var(--nf-green); border-radius: 62px; background: var(--nf-white); color: var(--nf-black);
  cursor: pointer; white-space: nowrap;
}

/* ---------- The list of sites: tucks under the pill and may reach past the card ---------- */
.nf-region__list {
  position: absolute; z-index: 1; top: 25px; left: 0; width: max-content; min-width: 100%;
  margin: 0; padding: 26px 0 4px; list-style: none;
  background: var(--nf-white); border-radius: 0 0 8px 8px; box-shadow: 0 10px 20px rgba(0, 0, 0, .05);
  visibility: hidden; opacity: 0; transform: translateY(-6px);
  transition: opacity 170ms var(--nf-region-ease), transform 260ms var(--nf-region-ease), visibility 0s linear 260ms;
}
.nf-region__select.is-open .nf-region__list { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
.nf-region__opt {
  display: flex; align-items: center; gap: 12px; height: 51px; padding: 0 24px;
  color: var(--nf-black); text-decoration: none; white-space: nowrap;
}
.nf-region__list li:last-child .nf-region__opt { border-radius: 0 0 8px 8px; }

@media (hover: hover) {
  .nf-region__x:hover, .nf-region__stay:hover, .nf-region__opt:hover { background: var(--nf-grey-f5); }
}

.nf-region__x:focus-visible, .nf-region__go:focus-visible, .nf-region__toggle:focus-visible,
.nf-region__stay:focus-visible, .nf-region__opt:focus-visible { outline: 2px solid var(--nf-green); outline-offset: 2px; }
.nf-region__go:focus-visible, .nf-region__toggle:focus-visible { outline-color: var(--nf-black); outline-offset: -4px; }
.nf-region__opt:focus-visible { outline-offset: -2px; }

/* The pill's label: the full name, or only the language up to 690px */
.nf-region__short { display: none; }

/* ---------- tablet and phone type ---------- */
@media (max-width: 1439.98px) { .nf-region__title { font-size: 26px; } }
@media (max-width: 809.98px) { .nf-region__title { font-size: 24px; } }

/* ---------- up to 690px (Figma 3658:17512: a 351px card in a 390px screen) ---------- */
@media (max-width: 690px) {
  .nf-region { padding: 20px; }
  .nf-region__actions { flex-direction: column; gap: 18px; }
  .nf-region__select, .nf-region__pill { width: 100% !important; }
  .nf-region__stay { width: 100%; }

  /* Flag, language and arrow, centred. The link covers the whole pill; the arrow sits on top with its own target. */
  .nf-region__pill { justify-content: center; }
  .nf-region__go { position: static; flex: none; padding: 0; }
  .nf-region__go::before { content: ""; position: absolute; inset: 0; border-radius: inherit; }
  .nf-region__go:active::before { background: #a5cf76; }
  .nf-region__go:active { background: none; }
  .nf-region__go > * { position: relative; }
  .nf-region__toggle { position: relative; z-index: 1; padding: 0 16px; margin-right: -16px; }
  .nf-region__full { display: none; }
  .nf-region__short { display: inline; }
  .nf-region__go:focus-visible { outline: none; }
  .nf-region__go:focus-visible::before { box-shadow: inset 0 0 0 2px var(--nf-black); }

  .nf-region__list { width: 100%; }
  .nf-region__opt span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
}

@media (prefers-reduced-motion: reduce) {
  .nf-region, .nf-region__card, .nf-region__pill, .nf-region__list, .nf-region__toggle svg { transition: none !important; }
}
