table.form-table {
  width: 100%;
  background-color: white;
  border-collapse: collapse;
  font-size: 100%;
  font-weight: normal;
  line-height: 160%;
}

table.form-table th,
table.form-table td {
  border: 1px solid #ADC3D5;
  padding: 5px 5px;
  vertical-align: top;
}

table.form-table th {
  background-image: url(images/table_head.gif);
  background-repeat: repeat-x;
  text-align: left;
  color: #25639A;
}


table.form-table td {
  padding: 15px 5px;
}

.form-required {
  color: red;
}

.error-fld {
  display: block;
  float: left;
  height: 13px;
  width: 15px;
  background-repeat: no-repeat;
  background-image: url(images/icon_warn.gif);
}

/* Обертка для нашего кастомного селекта */
.custom-select {
  position: relative;
  width: 100%;
  font-family: inherit;
}

/* Скрываем стандартный селект, но оставляем его в DOM для формы */
.custom-select select {
  display: none;
}

/* Главная кнопка (Триггер) */
.custom-select__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  /* background-color: #f2f2f2; */
  border-radius: 8px;
  cursor: pointer;
  color: #747373;
  font-size: 14px;
  transition: background-color 0.2s;
  user-select: none;
}

.custom-select__trigger:hover {
  /* background-color: #e8e8e8; */
  border: var(--color-primary) solid 1px;
  padding: 15px 20px;
}

/* Стрелочка CSS (уголок) */
.custom-select__arrow {
  width: 10px;
  height: 10px;
  border-right: 2px solid #545454;
  border-bottom: 2px solid #545454;
  transform: translateY(-25%) rotate(45deg);
  transition: transform 0.3s ease;
  opacity: 0.5;
}

/* Состояние, когда селект открыт */
.custom-select.open .custom-select__trigger {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  background: #EAEAEE;
}

.custom-select.open .custom-select__arrow {
  opacity: 1;
}

.custom-select.open .custom-select__arrow {
  transform: translateY(25%) rotate(-135deg);
  /* Стрелка смотрит вверх */
}

/* Выпадающий список */
.custom-select__options {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: #ffffff;
  border: 1px solid #e6e6e6;
  border-top: none;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
  max-height: 260px;
  /* Ограничиваем высоту, чтобы появился скролл */
  overflow-y: auto;
  z-index: 99;

  /* Скрываем по умолчанию */
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

.custom-select.open .custom-select__options {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Отдельные пункты списка */
.custom-select__option {
  padding: 14px 20px;
  color: #545454;
  font-size: 14px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.2s;
}

.custom-select__option:last-child {
  border-bottom: none;
}

/* Ховер на пунктах меню (как на скрине "Самара") */
.custom-select__option:hover {
  background-color: #f2f2f2;
}

.custom-select__option.selected {
  font-weight: 500;
  color: #141414;
  /* Темный цвет для выбранного */
}

/* Кастомный скроллбар для списка */
.custom-select__options::-webkit-scrollbar {
  width: 6px;
}

.custom-select__options::-webkit-scrollbar-track {
  background: #ffffff;
  border-radius: 8px;
}

.custom-select__options::-webkit-scrollbar-thumb {
  background: #d1d1d1;
  border-radius: 8px;
}

.profi-form__checkbox.profi-form__input--error+.profi-form__checkbox-custom {
  border-color: #e53935 !important;
}

#pf-flag-container {
  background-repeat: no-repeat;
}



/* Контейнер самого окна */
.popup-window#popup-window-phoneNumberInputSelectCountry {
  background-color: #ffffff !important;
  border-radius: 12px !important;
  /* Скругление как на фото */
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
  /* Мягкая тень */
  border: 1px solid #e1e8ee !important;
  margin-top: 5px !important;
}

/* Внутренний контент */
.popup-window-content#popup-window-content-phoneNumberInputSelectCountry {
  background: transparent !important;
  scrollbar-width: thin;
  /* Тонкий скролл для Firefox */
}

/* Стилизация полосы прокрутки для Chrome/Safari */
.popup-window-content#popup-window-content-phoneNumberInputSelectCountry::-webkit-scrollbar {
  width: 4px;
}

.popup-window-content#popup-window-content-phoneNumberInputSelectCountry::-webkit-scrollbar-thumb {
  background: #d1d9e0;
  border-radius: 10px;
}

/* Строка страны (пункт списка) */
.main-phonenumber-country {
  padding: 10px 15px !important;
  transition: background 0.2s ease !important;
  cursor: pointer;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #f5f7f9;
}

.main-phonenumber-country:last-child {
  border-bottom: none;
}

/* Ховер (наведение) на страну */
.main-phonenumber-country:hover {
  background-color: #f0f7ff !important;
  /* Светло-голубой фон при наведении */
}

/* Текст названия страны */
.main-phonenumber-country-name {
  font-size: 14px !important;
  color: #333 !important;
  font-family: "Helvetica Neue", Arial, sans-serif;
  margin-left: 10px !important;
}

/* Иконка флага */
.main-phonenumber-country-flag {
  margin: 0 !important;
  border-radius: 2px;
}

.phone-search-wrapper input:focus {
  border-color: #2fc6f6 !important;
  box-shadow: 0 0 0 2px rgba(47, 198, 246, 0.2);
}

/* Общий контейнер поиска */
.phone-search-wrapper {
  padding: 10px;
  position: sticky;
  /* Чтобы поиск не уезжал при скролле */
  top: 0;
  background: #fff;
  z-index: 10;
  border-bottom: 1px solid #eee;
}

/* Сам инпут */
.phone-country-search-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d9e0;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.phone-country-search-input:focus {
  border-color: #00A650;
  /* Цвет под твой бренд */
  box-shadow: 0 0 0 2px rgba(0, 166, 80, 0.1);
}

/* Подправляем само окно Битрикса */
#popup-window-content-phoneNumberInputSelectCountry {
  padding-top: 0 !important;
  /* Убираем лишний отступ сверху */
  max-height: 350px !important;
}