.lang-dropdown {
  position: relative;
  font-family: sans-serif;
  z-index: 1001;
}

.lang-current {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--main-color);
  color: var(--mainBtn-color);
  padding: 6px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s;
}

.flag-img {
  width: 24px !important;
  height: auto;
  border-radius: 2px;
  display: block;
}

.flag-img-sm {
  width: 20px !important;
  height: auto;
  border-radius: 2px;
}

.arrow-icon {
  font-size: 10px;
  transition: transform 0.3s;
  margin-left: 5px;
}

.arrow-icon.open {
  transform: rotate(180deg);
}

.lang-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 15px;
  text-decoration: none;
  color: #333;
  transition: background 0.2s;
}

.lang-item.active {
  background: var(--main-color);
  pointer-events: none;
}
.lang-item.active span {
  color: var(--mainBtn-color) !important;
}
.lang-info {
  display: flex;
  flex-direction: column;
}

.lang-label {
  font-size: 14px;
  font-weight: 500;
}

.country-name {
  font-size: 11px;
  color: #777;
}
.lang-list .lang-item span {
  font-size: 16px;
}

/* Стилизация скроллбара */
.lang-list::-webkit-scrollbar {
  width: 6px;
}
.lang-list::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 10px;
}

.section-title {
  font-size: 10px;
  color: #888;
  text-transform: uppercase;
  padding: 8px 15px 4px;
  margin: 0;
  font-weight: bold;
}

.divider {
  height: 1px;
  background: #eee;
  margin: 5px 0;
}

.other-countries-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 4 флага в ряд */
  gap: 8px;
  padding: 10px;
}

.country-quick-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #fff;
  font-size: 10px;
  gap: 4px;
  padding: 5px;
  border-radius: 4px;
}

.country-quick-link:hover {
  background: var(--card-background);
}

.flag-mini {
  width: 20px !important;
  border: 1px solid #ddd;
}
.lang-item span {
  font-size: 14px;
  color: #fff;
}

.lang-list {
  position: absolute;
  top: 50px;
  right: -20px;
  background: var(--bg-color);
  width: 240px;
  max-height: 450px;
  overflow-y: auto;
  padding: 8px;
  border-top: 1px solid #ddd;
}

.country-group {
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f0f0f0;
}

.country-group:last-child {
  border-bottom: none;
}

.country-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.country-options {
  display: flex;
  flex-wrap: wrap; /* Чтобы языки шли в ряд, если их много */
  gap: 4px;
  margin-top: 4px;
}

.lang-option {
  flex: 1;
  min-width: 100px;
  padding: 8px 10px;
  font-size: 13px;
  text-decoration: none;
  color: #333;
  border-radius: 6px;
  transition: all 0.2s;
  background: #f8f9fa;
  text-align: center;
}

.lang-option:hover {
  background: #007bff;
  color: #fff;
}

.lang-option.active {
  background: #e3f2fd;
  color: #007bff;
  font-weight: 600;
  pointer-events: none;
}

@media (max-width: 520px) {
  .lang-current span {
    display: none;
  }
}

.lang-dropdown summary {
  list-style: none;
}

.lang-dropdown summary::-webkit-details-marker {
  display: none;
}
