/* IQeur Language Selector Styles */
.iqeur-lang-picker {
  display: inline-flex;
  align-items: center;
}

.iqeur-lang-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 5px 11px;
  border: 1px solid #dce4e0;
  border-radius: 9px;
  background: #ffffff;
  color: #1f332e;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 650;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
  line-height: 1;
}

.iqeur-lang-trigger:hover,
.iqeur-lang-trigger[aria-expanded="true"] {
  background: #f4f8f5;
  border-color: #b9d1c5;
  color: #155b4b;
}

.iqeur-lang-trigger:focus-visible {
  outline: 2px solid #1c6d5b;
  outline-offset: 2px;
}

.iqeur-lang-flag {
  display: inline-block;
  width: 20px;
  height: 14px;
  border-radius: 2px;
  object-fit: cover;
  flex: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .1);
}

.iqeur-lang-label {
  white-space: nowrap;
}

.iqeur-lang-chevron {
  display: inline-block;
  width: 12px;
  height: 12px;
  stroke: currentColor;
  opacity: .7;
  flex: none;
  transition: transform .18s ease;
}

.iqeur-lang-trigger[aria-expanded="true"] .iqeur-lang-chevron {
  transform: rotate(180deg);
}

/* Modal Dialog */
.iqeur-lang-modal {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(580px, calc(100% - 32px));
  max-height: min(85vh, 640px);
  padding: 0;
  border: 1px solid #dce5e0;
  border-radius: 18px;
  background: #ffffff;
  color: #192b27;
  box-shadow: 0 24px 64px rgba(22, 48, 38, .18);
  overflow: hidden;
}

.iqeur-lang-modal::backdrop {
  background: rgba(18, 33, 27, .48);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.iqeur-lang-modal-card {
  display: flex;
  flex-direction: column;
  max-height: min(85vh, 640px);
}

.iqeur-lang-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px 14px;
  border-bottom: 1px solid #edf2ee;
}

.iqeur-lang-modal-title {
  margin: 0;
  font-size: 18px;
  font-weight: 730;
  letter-spacing: -.02em;
  color: #153830;
}

.iqeur-lang-modal-close {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #5d736c;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}

.iqeur-lang-modal-close:hover {
  background: #f1f6f3;
  color: #14493c;
}

.iqeur-lang-modal-close:focus-visible {
  outline: 2px solid #1c6d5b;
  outline-offset: 2px;
}

.iqeur-lang-search-wrap {
  padding: 12px 22px 8px;
}

.iqeur-lang-search {
  width: 100%;
  box-sizing: border-box;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid #cfe0d7;
  border-radius: 9px;
  background: #fafcfb;
  color: #182e29;
  font-family: inherit;
  font-size: 13px;
  outline: none;
  transition: border-color .15s ease, background .15s ease;
}

.iqeur-lang-search:focus {
  border-color: #1c6d5b;
  background: #ffffff;
  box-shadow: 0 0 0 2px rgba(28, 109, 91, .15);
}

.iqeur-lang-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 8px 16px 18px;
  overflow-y: auto;
  max-height: calc(85vh - 150px);
}

.iqeur-lang-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #213530;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  text-align: left;
  transition: background-color .12s ease, color .12s ease;
  box-sizing: border-box;
}

.iqeur-lang-item:hover,
.iqeur-lang-item:focus-visible {
  background: #f2f7f4;
  color: #145647;
  outline: none;
}

.iqeur-lang-item.is-selected {
  background: #e8f4ee;
  color: #135546;
  font-weight: 700;
  border-color: #cce3d7;
}

.iqeur-lang-item-flag {
  width: 20px;
  height: 14px;
  border-radius: 2px;
  object-fit: cover;
  flex: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
}

.iqeur-lang-item-names {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.iqeur-lang-item-native {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
  line-height: 1.25;
}

.iqeur-lang-item-english {
  font-size: 11px;
  color: #687e77;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.iqeur-lang-item.is-selected .iqeur-lang-item-english {
  color: #2a6859;
}

.iqeur-lang-item-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  color: #176553;
  font-size: 13px;
  font-weight: 800;
  flex: none;
  visibility: hidden;
}

.iqeur-lang-item.is-selected .iqeur-lang-item-check {
  visibility: visible;
}

.iqeur-lang-empty {
  grid-column: 1 / -1;
  padding: 24px 12px;
  text-align: center;
  color: #677b74;
  font-size: 13px;
}

@media (max-width: 520px) {
  .iqeur-lang-list {
    grid-template-columns: 1fr;
    max-height: calc(85vh - 140px);
  }
  .iqeur-lang-modal {
    width: calc(100% - 20px);
  }
}
