/* Parket - region presets (ui/regions.js).
 *
 * Loaded AFTER dock.css, like language.css: the shared `.parket-pop` popover is
 * anchored to the dock and opens UPWARDS; this one hangs off the top action row
 * and must open downwards. Same specificity, so only the later file wins.
 */

.parket-region {
  position: relative;
  display: inline-flex;
}

.parket-region[hidden] {
  display: none;
}

.parket-region-btn {
  padding: 0 0.7rem;
}

.parket-region-btn__label {
  font-size: 0.8125rem;
  white-space: nowrap;
}

.parket-region-pop {
  top: calc(100% + 0.5rem);
  bottom: auto;
  left: auto;
  right: 0;
  transform: none;
  width: min(220px, calc(100vw - 2rem));
}

.parket-region-pop__list {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.parket-region-row {
  display: flex;
  align-items: center;
  padding: 0.45rem 0.55rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--parket-ink, #e8ecf6);
  font: inherit;
  font-size: 0.875rem;
  text-align: left;
  cursor: pointer;
}

.parket-region-row:hover {
  background: rgba(136, 154, 196, 0.14);
  color: var(--parket-gold, #ffd166);
}

.parket-region-row:focus-visible {
  outline: 2px solid var(--parket-gold, #ffd166);
  outline-offset: -2px;
}

.parket-region-row.is-on {
  color: var(--parket-gold, #ffd166);
  background: rgba(255, 209, 102, 0.12);
}

/* The corner is tight on a phone: the compass alone names the control, and the
   current region is still read out through the button's accessible name. */
@media (max-width: 480px) {
  .parket-region-btn__label {
    display: none;
  }

  .parket-region-btn {
    padding: 0 0.5rem;
  }
}
