/* Country and language dropdowns (locale-picker.js, founders 2026-11-06).
   The old globe panel and button rows stay in the page as hidden switches. */

details.language-menu[data-lp-source],
.has-locale-picker details.language-menu,
.language-switcher[data-lp-source],
.mobile-menu-language[data-lp-source] > :not(.lp-mobile) {
  display: none !important;
}

.lp-header {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.lp-dropdown {
  position: relative;
}

.lp-dropdown[hidden],
.lp-field[hidden] {
  display: none !important;
}

.lp-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 40px;
  padding: 6px 8px 6px 12px;
  border: 0;
  border-radius: 10px;
  color: var(--ink, #171714);
  background: transparent;
  font: 900 15px/1 Manrope, Inter, 'Segoe UI', Arial, sans-serif;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.15s ease;
}

.lp-trigger:hover,
.lp-dropdown.is-open .lp-trigger {
  background: rgba(0, 0, 0, 0.06);
}

.lp-trigger:focus-visible,
.lp-option:focus-visible,
.lp-select select:focus-visible {
  outline: 3px solid rgba(196, 180, 158, 0.6);
  outline-offset: 2px;
}

.lp-short {
  display: none;
}

.lp-chevron,
.lp-check {
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lp-chevron {
  width: 16px;
  height: 16px;
  color: var(--muted, #65625b);
  transition: transform 0.15s ease;
}

.lp-dropdown.is-open .lp-chevron {
  transform: rotate(180deg);
}

.lp-list {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 90;
  min-width: 200px;
  max-height: min(60vh, 440px);
  margin: 0;
  padding: 6px;
  overflow-y: auto;
  list-style: none;
  border: 1px solid var(--topbar-glass-stroke, rgba(23, 23, 20, 0.08));
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(255, 255, 255, 0.9)),
    #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 18px 44px rgba(31, 27, 20, 0.12);
  -webkit-backdrop-filter: blur(22px) saturate(1.22);
  backdrop-filter: blur(22px) saturate(1.22);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition:
    opacity 0.15s ease,
    transform 0.15s ease,
    visibility 0s linear 0.15s;
}

.lp-dropdown.is-open .lp-list {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0s;
}

.lp-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 38px;
  padding: 0 10px 0 12px;
  border-radius: 9px;
  color: var(--ink, #171714);
  font: 700 14px/1.2 Manrope, Inter, 'Segoe UI', Arial, sans-serif;
  white-space: nowrap;
  cursor: pointer;
}

.lp-option:hover,
.lp-option:focus {
  background: var(--surface-soft, #f0eee8);
  outline: none;
}

.lp-option[aria-selected='true'] {
  font-weight: 900;
}

.lp-check {
  width: 16px;
  height: 16px;
  color: var(--green, #1f6f4d);
  visibility: hidden;
}

.lp-option[aria-selected='true'] .lp-check {
  visibility: visible;
}

/* Narrower laptops: the language shrinks to its code; the country stays
   readable because it decides prices and currency. */
@media (max-width: 1180px) {
  .lp-dropdown--language .lp-long {
    display: none;
  }

  .lp-dropdown--language .lp-short {
    display: inline;
  }
}

/* Sign-up wizard header: compact, and hidden on phones like the old row. */
.lp-header--inline .lp-trigger {
  min-height: 36px;
  font-size: 13px;
  border: 1px solid var(--line, #ddd6cb);
  border-radius: 999px;
  background: var(--surface, #fff);
}

@media (max-width: 520px) {
  .wizard-appbar .lp-header--inline {
    display: none;
  }
}

/* Phone menu: the phone's own picker, country and language side by side. */
.lp-mobile {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 10px;
}

.lp-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.lp-field-label {
  color: var(--muted, #65625b);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.lp-select {
  position: relative;
  display: block;
}

.lp-select select {
  width: 100%;
  min-height: 46px;
  padding: 0 34px 0 14px;
  border: 1px solid var(--line, #ddd6cb);
  border-radius: 12px;
  color: var(--ink, #171714);
  background: var(--surface, #fff);
  font: 800 15px/1.2 Manrope, Inter, 'Segoe UI', Arial, sans-serif;
  text-overflow: ellipsis;
  -webkit-appearance: none;
  appearance: none;
}

.lp-select .lp-chevron {
  position: absolute;
  top: 50%;
  right: 12px;
  margin-top: -8px;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .lp-list,
  .lp-chevron,
  .lp-trigger {
    transition: none;
  }
}
