
/* forms on website */
.custom-form {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 20px;
}

.custom-form label span {
  font-size: clamp(0.875rem, 0.813rem + 0.25vw, 1rem);
  line-height: 130%;
  letter-spacing: -0.03em;
  color: var(--black-black);
  opacity: 0.4;
}

.custom-form label {
  width: 100%;
  display: flex;
  align-items: center;
}

.custom-form label a {
  color: var(--black-black);
  line-height: 120%;
  text-decoration: underline;
  text-decoration-skip-ink: none;
}

.form-message:empty {
  display: none;
}

.custom-form input,
.custom-form textarea {
  display: inline-block;
  width: 100%;
  border: none;
  outline: none;
  background: var(--blue-blue-005);
  padding: 15px 20px;

  letter-spacing: -0.03em;
  color: var(--black-black);
}

.phone-input {
  display: inline-block;
  white-space: nowrap;
  width: 100%;
  border: none;
  outline: none;
}

.custom-form input::placeholder,
.custom-form textarea::placeholder {
  color: var(--grey-grey);
  opacity: 0.6;
}

.custom-form textarea {
  height: 122px;
}


.custom-form input[type="checkbox"] {
  width: fit-content;
}

label.custom-form__half,
.phone-field {
  width: calc(50% - 10px);
}

input[type=checkbox],
input[type=checkbox].input-checkbox {
  box-sizing: border-box;
	cursor: pointer;
	appearance: none;
	border: 1px solid var(--black-black-015) !important;
	width: 15px;
	height: 15px;
  min-width: 15px;
	margin-right: 10px;
	background: var(--grey-light-grey);
	position: relative;
	transition: opacity .25s linear;
  padding: 0;


}

input[type=checkbox]::after,
input[type=checkbox].input-checkbox::after  {
  content: "";
  position: absolute;
	width: 0;
	height: 0;
	background-color:  var(--blue-blue);
  background-image: url("../icon/my-check.svg");
  background-repeat: no-repeat;
	background-position: center;
	background-size: 12px;
  transition: opacity .25s linear;
	opacity: 0;
}

input[type=checkbox]:checked::after,
input[type=checkbox].input-checkbox:checked::after {
	width: 15px;
	height: 15px;
	opacity: 1;
  transition: opacity .25s linear;
}

.custom-form button {
  width: 100%;
}

.field-error {
  border-color: #e53935 !important;
  background-color: #fff5f5;
}

.form-error {
  position: absolute;
  top: 100%;
  left: 0;
  color: #e53935;
  font-size: 12px;
  margin-top: 4px;
  margin-bottom: 5px;
}

.phone-field {
  position: relative;
  display: inline-block;
  background: var(--blue-blue-005);
  padding: 15px 20px;
  letter-spacing: -0.03em;
  color: var(--grey-grey);
  height: 50px;
  gap: 10px;
}

/* Обёртка телефонного поля */
.phone-field {
  position: relative;
  display: flex;
  align-items: center;
}

/* Селектор страны */
.country-selector {
  position: relative;
}

/* Кнопка выбранной страны */
.country-selector .selected-country {
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  min-width: 93px;
  padding: 0;

  outline: none;
  background-color: transparent;
  border: 0;
}

/* Флаг в кнопке */
.country-selector .selected-country .flag {
  height: 18px;
  margin-right: 6px;
}

/* Стрелка */
.country-selector .selected-country::after {
  content: url(../icon/arrow.svg);
  display: inline-block;
  width: 24px;
  height: 12px;
  margin-left: 6px;
  display: flex;
  justify-content: center;
  align-items: center;
  
  transition: transform .2s;
}

/* Когда список открыт */
.country-selector.open .selected-country::after {
  transform: rotate(180deg);
}

/* При ховере/фокусе */
/*.country-selector .selected-country:hover,
.country-selector .selected-country:focus {
  border-color: #0073aa;
  box-shadow: 0 0 4px rgba(0,115,170,.3);
}*/

/* Список стран */
.country-selector .country-list {
  position: absolute;
  top: calc(100% + 15px);
  left: 0;
  right: 0;
  border: 1px solid var(--black-black-015);
  background: var(--white-white);
  /*max-height: 200px;*/
  overflow-y: auto;
  margin: 0;
  padding: 0;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-5px);
  transition: opacity .2s, transform .2s, visibility .2s;
  z-index: 1000;
}

/* Показать список */
.country-selector.open .country-list {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Элемент списка */
.country-selector .country-list li {
  display: flex;
  align-items: center;
  padding: 8px 10px;
  cursor: pointer;
}

.country-selector .country-list li:not(:last-child) {
  border-bottom: 1px solid var(--black-black-015);
}

/* Флаг в элементе */
.country-selector .country-list li .flag {
  margin-right: 8px;
  line-height: 100%;
  height: 18px;
  font-size: 18px;
}

/* Код страны справа */
.country-selector .country-list li::after {
  content: attr(data-code);

  line-height: 110%;
  letter-spacing: -0.03em;
  color: var(--black-black);
  opacity: 0.4;

  transition: opacity .2s;
}

/* Стили для активного пункта списка */
.country-list li.active::after {
  opacity: 1;
}

/* При ховере элемента */
.country-selector .country-list li:hover::after {
  opacity: 1;
}

/* Поле ввода */
.phone-field input[type="tel"] {
  flex: 1;
  padding: 0;
  background: transparent;
}

/* Фокус на поле */
.phone-field input[type="tel"]:focus {
  /*border-color: #0073aa;*/
}

.custom-form img.emoji {
  min-width: 18px;
  height: 18px;
}

.phone-input .mask-char, 
.phone-input .placeholder {
  color: #aaa; /* Серый цвет для символов маски и заполнителей */
}

.phone-input .digit {
  color: #000; /* Чёрный цвет для введённых цифр */
}

@media (max-width: 550px) {
  label.custom-form__half, .phone-field {
    width: 100%;
  }
}