/* Новые стили для элементов локалей (добавь к существующим) */

/* Фильтры друг под другом */
.location-filters {
    margin-bottom: 20px;
}

.filter-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 14px;
}

.filter-row label {
    white-space: nowrap;
    color: #666;
}

.filter-row select {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background: #f9f9f9;
    min-width: 200px;
}

.filter-row.full-width {
    width: 100%;
    position: relative;  /* Для позиционирования иконки */
}

.search-wrapper {
    position: relative;
    width: 100%;
}

.filter-row.full-width input[type="search"] {
	font-family: 'Nunito-Regular';
  font-size: 24px;
  line-height: 24px;
  font-weight:400;
  width: 100%;
  height: 56px;
  padding: 0 44px 0 16px;
  border: 1px solid #909090;
  border-radius: 12px;

  color: #212121;
  background-color:#EDEDED;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.filter-row.full-width .search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 18px;
    pointer-events: none;
}

/* Быстрые города */
.quick-cities {
    margin-left: 20px;
    display: flex;
    gap: 10px;
}

.quick-city {
	font-family: 'Nunito-Regular';
	font-size:20px;
	line-height:120%;
	font-weight:400;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;

}

.quick-city:hover {
    background-color: #e3f2fd;
}

/* Сетка локаций (фиксированная высота) */
.location-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Фиксировано 3 колонки */
    gap: 20px;
    margin-bottom: 20px;
    max-height: 200px; /* Фиксированная высота */
    overflow-y: auto;
}

.letter-column {
    display: flex;  /* Горизонтальное размещение */
    align-items: flex-start;
    padding: 10px;
    background: white; /* Белый фон */
}

.letter-header {
	font-family: 'Rubik-SemiBold';
    font-size: 36px;
    font-weight: 600;
	line-height:120%;
    margin-right: 15px;  /* Отступ справа от буквы */
    color: #333;
    min-width: 30px;  /* Фиксированная ширина для буквы */
    text-align: left;  /* Выравнивание слева */
    border-bottom: none;  /* Убрал подчёркивание */
    padding-bottom: 0;
}

.location-list {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;  /* Занимает остальное пространство */
}

.location-item {
	font-family: 'Nunito-Regular';
    font-size: 20px;
    line-height: 120%;
	font-weight:400;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.2s ease;

	text-align:left;
}

.location-item:hover {
    background-color: #e3f2fd;
}

.location-item.selected {
    background-color: #2196f3;
    color: white;
}

/* Переопределение ширины модалки */
.modal-content {
    width: 900px;
    overflow-y: auto;
}

.search-wrapper input[type="search"] {
  width: 100%;
  padding-right: 40px; /* место под иконку */
  box-sizing: border-box;
}

.search-wrapper img {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none; /* чтобы не мешала клику по инпуту */
}	

.custom-select-wrapper {
  position: relative;
  width: 374px;
  font-size: 20px;
  line-height: 24px;
  font-weight: 400;
  font-family: 'Nunito-Regular';
  color: #212121D9;
}

/* Прячем стандартную стрелку */
.custom-select-wrapper select {
  width: 100%;
  padding: 10px 35px 10px 10px; /* отступ под иконку справа */
  border: 1px solid #909090;
  border-radius: 8px;
  background: #fff;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  line-height: inherit;
}

/* Кастомная иконка */
.custom-select-wrapper .select-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  transition: transform 0.3s ease;
  width: 20px;
  height: 20px;
}

/* Если хочешь — поворот при открытии (нужно JS) */
.custom-select-wrapper.open .select-icon {
  transform: translateY(-50%) rotate(180deg);
}

#countrySelected{background-color:#EDEDED}

.quick-city.active {
    font-weight: bold;
    text-decoration: underline;
    color: #ff0000; /* или любой цвет для выделения */
}

/* Адаптивность для мобильных */

@media (max-width: 768px) {

    /* Убираем флекс, чтобы фильтры шли вертикально */
    .filter-row {
        display: block;
    }

    .filter-row select {
        width: 100%;
        min-width: 0;
        margin-top: 6px;
    }

    .filter-row.full-width input[type="search"] {
        font-size: 18px;
        height: 48px;
    }

    /* Быстрые города уходят на новую строку → нужен отступ */
    .quick-cities {
        margin-left: 0;
        margin-top: 12px;
        flex-wrap: wrap;
    }

    .quick-city {
        font-size: 18px;
        padding: 6px 10px;
    }

    /* Модалка под мобильный */
	.modal-content {
    width: 90%;
    max-width: none;
    padding: 20px;
    border-radius: 10px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
	}

    /* Сетка локаций: одна колонка */
    .location-grid {
        grid-template-columns: 1fr;

    }

    .letter-column {
        flex-direction: column;
    }

    .letter-header {
        margin-right: 0;
        margin-bottom: 6px;
        font-size: 28px;
    }

    .location-item {
        font-size: 18px;
        padding: 6px 10px;
    }
}
