/* Shared public header: flag + TDAC Entry wordmark (admin-style) */

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: #0f172a;
  text-decoration: none;
  white-space: nowrap;
}

.logo-flag {
  display: block;
  flex-shrink: 0;
  width: 1.2em;
  height: 0.8em;
  overflow: hidden;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(26, 31, 54, 0.12);
}

.logo-wordmark b,
.logo-tdac {
  font-weight: 800;
  color: #0b5394;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.lang-switcher {
  position: relative;
}

.lang-switcher-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  appearance: none;
  background: #fff;
  border: 1px solid #e0e4ec;
  border-radius: 8px;
  padding: 6px 10px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #4a5068;
  cursor: pointer;
  line-height: 1;
}

.lang-switcher-toggle:hover,
.lang-switcher.is-open .lang-switcher-toggle {
  border-color: #2454C5;
  color: #1E4B9C;
}

.lang-switcher-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 80;
  min-width: 13.75rem;
  max-height: min(70vh, 28rem);
  overflow-y: auto;
  margin: 0;
  padding: 4px 0;
  list-style: none;
  background: #fff;
  border: 1px solid #d8dce6;
  border-radius: 10px;
  box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.15);
}

.lang-switcher-menu button,
.lang-switcher-menu a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1.75rem;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  border: none;
  background: #fff;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  color: #1a1f36;
  cursor: pointer;
  text-decoration: none;
  box-sizing: border-box;
}

.lang-switcher-menu button:hover,
.lang-switcher-menu a:hover {
  background: #f8f9fb;
}

.lang-switcher-menu button.is-active,
.lang-switcher-menu a.is-active {
  background: #eef3ff;
  color: #1E4B9C;
  font-weight: 600;
}

.lang-switcher-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lang-switcher-code {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #8a90a6;
  text-align: right;
}

.lang-switcher-menu button.is-active .lang-switcher-code,
.lang-switcher-menu a.is-active .lang-switcher-code {
  color: #1E4B9C;
}

@media (max-width: 768px) {
  .header {
    flex-wrap: nowrap;
    row-gap: 8px;
  }

  .logo {
    font-size: 18px;
  }

  .header-right {
    gap: 10px;
    flex-shrink: 0;
    justify-content: flex-end;
  }

  .lang-switcher-toggle {
    font-size: 12px;
    padding: 6px 8px;
  }

  .lang-switcher-menu {
    min-width: 12.5rem;
  }
}
