/* Language picker component -- shared across every page, styled to match
   the site's existing design system (Fredoka type, #1E1B2E ink borders,
   #6E3AD1 purple accent, hard drop shadows). */

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.lang-picker {
  position: relative;
  flex: none;
}

.lang-picker-button {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 2.5px solid #1E1B2E;
  border-radius: 12px;
  padding: 7px 11px;
  font: 700 13px 'Fredoka', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #1E1B2E;
  cursor: pointer;
  line-height: 1.2;
  transition: transform .12s;
}

.lang-picker-button:hover {
  transform: translateY(-1px);
}

.lang-picker-flag {
  font-size: 16px;
  line-height: 1;
}

.lang-picker-name {
  white-space: nowrap;
}

.lang-picker-caret {
  width: 7px;
  height: 7px;
  border-right: 2px solid #6E3AD1;
  border-bottom: 2px solid #6E3AD1;
  transform: rotate(45deg);
  margin-top: -3px;
  transition: transform .15s;
}

.lang-picker[data-open="true"] .lang-picker-caret {
  transform: rotate(-135deg);
  margin-top: 3px;
}

.lang-picker-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  background: #fff;
  border: 2.5px solid #1E1B2E;
  border-radius: 16px;
  box-shadow: 4px 4px 0 #1E1B2E;
  padding: 6px;
  min-width: 200px;
  display: none;
  flex-direction: column;
  gap: 2px;
  max-height: 70vh;
  overflow-y: auto;
}

.lang-picker[data-open="true"] .lang-picker-menu {
  display: flex;
}

.lang-picker-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: none;
  background: none;
  text-align: left;
  padding: 11px 12px;
  border-radius: 10px;
  font: 600 14px 'Fredoka', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #4B4460;
  cursor: pointer;
  min-height: 44px;
}

.lang-picker-option:hover,
.lang-picker-option:focus-visible {
  background: #EDE3FB;
  color: #1E1B2E;
}

.lang-picker-option[aria-checked="true"] {
  background: #EDE3FB;
  color: #6E3AD1;
  font-weight: 700;
}

.lang-picker-option-flag {
  font-size: 18px;
  line-height: 1;
  flex: none;
}

.lang-picker-option-check {
  margin-left: auto;
  color: #6E3AD1;
  font-weight: 800;
  opacity: 0;
}

.lang-picker-option[aria-checked="true"] .lang-picker-option-check {
  opacity: 1;
}

@media (max-width: 480px) {
  .lang-picker-name {
    display: none;
  }

  .lang-picker-button {
    padding: 8px 9px;
  }
}
