/* Größen-Helper für flag-icons.
   Die SVGs sind vektoriell, font-size steuert die Render-Größe.
   Defaults bewusst kompakter als 1em, damit Flaggen nicht dominant wirken. */

.nk-flag      { font-size: 16px; line-height: 1; }
.nk-flag-sm   { font-size: 13px; line-height: 1; }
.nk-flag-md   { font-size: 18px; line-height: 1; }
.nk-flag-lg   { font-size: 24px; line-height: 1; }

/* Country-Field: Custom-Dropdown mit Flagge IN den Optionen
   (native <select> kann kein HTML in <option> rendern). */
.nk-country-select {
  position: relative;
  width: 100%;
  min-width: 0;
}

.nk-country-select-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 4px 10px 4px 12px;
  border: 1px solid #b8c5d4;
  border-left: 3px solid rgba(62, 107, 140, 0.45);
  border-radius: 10px;
  background: #ffffff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.nk-country-select.is-open .nk-country-select-trigger,
.nk-country-select-trigger:focus-within {
  outline: none;
  border-color: rgba(62, 107, 140, 0.55);
  border-left-color: var(--preview-primary);
  box-shadow: 0 0 0 3px rgba(62, 107, 140, 0.15);
}

.nk-country-select-search {
  flex: 1;
  min-width: 0;
  padding: 6px 0;
  border: 0;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  color: #0f172a;
}

.nk-country-select-search::placeholder {
  color: #94a3b8;
}

.nk-country-select-chevron {
  cursor: pointer;
}

.nk-country-select-flag {
  flex-shrink: 0;
  width: 1.4em;
  height: 1.05em;
  display: inline-block;
  border-radius: 0;
  border: 0;
  background-color: transparent;
  box-shadow: none;
  outline: none;
}

/* Defensiv: ALLE inneren Elemente des Triggers ohne eigenen Border —
   damit keine globale Field-Regel oder flag-icons-Style sich durchsetzt. */
.nk-country-select-trigger .nk-country-select-flag,
.nk-country-select-trigger .nk-country-select-flag.fi,
.nk-country-select-trigger .nk-country-select-search,
.nk-country-select-trigger .nk-country-select-chevron {
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  background-color: transparent !important;
}

/* Im leeren State komplett ausblenden */
.nk-country-select-flag.is-empty {
  display: none;
}

.nk-country-select-name {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nk-country-select-name.is-placeholder {
  color: #94a3b8;
}

.nk-country-select-chevron {
  font-size: 18px;
  color: #64748b;
  transition: transform 0.16s ease;
  flex-shrink: 0;
}

.nk-country-select.is-open .nk-country-select-chevron {
  transform: rotate(180deg);
}

.nk-country-select-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 50;
  max-height: 280px;
  overflow-y: auto;
  margin: 0;
  padding: 4px;
  list-style: none;
  background: #ffffff;
  border: 1px solid var(--preview-border, #dce6ef);
  border-radius: 10px;
  box-shadow: 0 24px 36px -22px rgba(15, 23, 42, 0.32);
}

.nk-country-select-list[hidden] { display: none; }

.nk-country-select-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  font-size: 13px;
  color: #0f172a;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s ease;
}

.nk-country-select-option .fi,
.nk-country-select-option .nk-country-select-flag-slot {
  flex-shrink: 0;
  width: 1.4em;
  height: 1.05em;
  display: inline-block;
  border-radius: 2px;
  border: 1px solid var(--preview-border, #dce6ef);
}

.nk-country-select-option .nk-country-select-flag-slot {
  background-color: #f8fafc;
}

.nk-country-select-option:hover {
  background: var(--preview-sidebar-hover, #f4f8fe);
}

.nk-country-select-option.is-active {
  background: rgba(62, 107, 140, 0.12);
  font-weight: 600;
}

.nk-country-select-option.is-clear {
  color: #64748b;
  font-style: italic;
}

.nk-country-select-divider {
  height: 1px;
  margin: 4px 8px;
  background: var(--preview-border, #dce6ef);
}

/* Multi-Country/Multi-Select: EIN gemeinsamer Container für Chips + Search,
   damit nicht zwei sichtbare Boxen untereinander stehen. Outer-Border +
   linker Akzent-Streifen analog zu den Standard-Eingabefeldern. */
.nk-country-multi {
  position: relative;
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid #b8c5d4;
  border-left: 3px solid rgba(62, 107, 140, 0.45);
  border-radius: 10px;
  background: #ffffff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.nk-country-multi:focus-within,
.nk-country-multi.is-picker-open {
  border-color: rgba(62, 107, 140, 0.55);
  border-left-color: var(--preview-primary);
  box-shadow: 0 0 0 3px rgba(62, 107, 140, 0.15);
}

.nk-country-multi-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  min-height: 36px;
  padding: 6px 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

/* Trenner zwischen Chips-Bereich und Suchfeld, nur wenn Chips da sind */
.nk-country-multi-chips:not(:empty) ~ .nk-country-multi-search {
  border-top: 1px solid var(--preview-border, #dce6ef);
}

.nk-country-multi-empty {
  font-size: 12px;
  color: #94a3b8;
  font-style: italic;
  padding: 0 4px;
}

.nk-country-multi-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 4px 4px 8px;
  border: 1px solid var(--preview-border, #dce6ef);
  border-radius: 999px;
  background: #ffffff;
  font-size: 12px;
  color: #0f172a;
}

.nk-country-multi-chip .fi {
  flex-shrink: 0;
  width: 1.4em;
  height: 1.05em;
  border-radius: 2px;
  /* Konsistent zum Single-Country-Trigger: Flagge ohne eigenen Rahmen,
     der Chip selbst ist visuell durch seinen Pill-Border umrahmt. */
  border: 0;
  background-color: transparent;
}

.nk-country-multi-chip-name {
  font-weight: 600;
}

.nk-country-multi-chip-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.nk-country-multi-chip-remove:hover {
  background: var(--signal-red-light, #ffe2e2);
  color: var(--signal-red-deep, #a03535);
}

.nk-country-multi-chip-remove .material-icons {
  font-size: 14px;
}

.nk-country-multi-search {
  position: relative;
  display: flex;
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.nk-country-multi-search-icon {
  flex-shrink: 0;
  margin: 0 6px 0 10px;
  font-size: 18px;
  color: #94a3b8;
}

.nk-country-multi-search-input {
  flex: 1;
  min-width: 0;
  padding: 8px 12px 8px 0;
  border: 0;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  color: #0f172a;
}

.nk-country-multi-search-input::placeholder {
  color: #94a3b8;
}

/* Defensiv: alle inneren Elemente des Multi-Containers ohne eigenen
   Border/Outline/Shadow — outer Border kommt vom .nk-country-multi. */
.nk-country-multi .nk-country-multi-search-input,
.nk-country-multi .nk-country-multi-search-icon,
.nk-country-multi .nk-country-multi-chip .fi {
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;
}

.nk-country-multi-picker {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 50;
  margin-top: 4px;
}

.nk-country-multi-picker[hidden] { display: none; }

.nk-country-multi-picker .nk-country-select-list {
  position: static;
  margin: 0;
}

/* Sidebar-Sprachauswahl bleibt 4:3, leicht abgerundet */
.nav-lang .fi {
  border-radius: 2px;
}
