.crm-form__wrapper {
	display: flex;
	width: 100vw;
	height: 100vh;
	position: fixed;
	background: rgba(0, 0, 0, 0.5);
	top: 0;
	left: 0;
	z-index: 10000;
	justify-content: center;
	align-items: center;
}

.crm-close {
	position: absolute;
	top: 50px;
	right: 50px;
	padding: 15px;
	background: #fff;
	border-radius: 10px;
	cursor: pointer;
	box-sizing: border-box;
	width: 62px;
	height: 62px;
}

.crm-form__container button {
	padding: 13px 30px;
  width: 55%;
  border: none;
  background: #101010;
  color: #fff;
  font-size: 14px;
  text-transform: uppercase;
  font-weight: 500;
  border-radius: 50px;
  cursor: pointer;
  display: flex;
  flex-flow: row nowrap;
  align-items: center;
  gap: 30px;
  justify-content: space-between;
}

.crm-form__container button:hover {
	background: #101010;
}

.crm-form__container {
	margin: auto;
	display: flex;
	flex-flow: column nowrap;
	padding: 30px;
	gap: 10px;
	box-sizing: border-box;
	background: #fff;
	border-radius: 20px;
	width: 600px;
}

.crm-form__container .row {
	display: flex;
	flex-flow: row nowrap;
	gap: 10px;
	margin: 15px 0;
	align-items: start;
}

.crm-form__container label {
	line-height: 1.55;
    font-size: 14px;
    color: #232323;
    font-weight: 500;
}

.crm-form__container a {
	font-weight: 600;
    text-decoration: none;
    color: #203E5C;
    padding-bottom: 1px;
    border-bottom: 1px dashed #203e5c;
	transition: 0.15s ease-in-out;
}

.crm-form__container a:hover {
	border-color:#00092C;
	color: #00092C;
}

.crm-form__container .description {
	margin-top: 5px;
}


.crm-form__container .response {
	display: none;
	padding: 25px;
    border: 1px dashed grey;
    text-align: center;
    margin-top: 10px;
	border-radius: 5px;
}

.crm-form__container p {
	margin: 0;
    padding: 0;
    font-size: 20px;
    font-weight: 600;
    color: #202020;
    text-transform: uppercase;
	margin-top: 15px;
}

.crm-form__container input {
	padding: 15px;
    border: 1px solid #ccc;
    box-sizing: border-box;
    border-radius: 10px;
}

.crm-form__container form {
	margin-top: 10px;
	display: flex;
	flex-flow: column nowrap;
	gap: 10px;
}

/* кнопка в обработке */
.crm-form__container button.is-processing {
  opacity: .75;
  pointer-events: none;
}

/* Блок ответа (серверные сообщения) */
.crm-form__container .response {
  display: none;
  padding: 16px 18px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 14px;
  line-height: 1.4;
  animation: crmFadeInUp .2s ease;
}

/* Успех / Ошибка */
.crm-form__container .response.crm-toast--ok {
  background: #e8f7ee;          /* зелёный фон */
  border-color: #bde5c8;
  color: #14532d;
}
.crm-form__container .response.crm-toast--err {
  background: #fdecea;          /* красный фон */
  border-color: #f5c6cb;
  color: #7f1d1d;
}

/* Ошибки под полями */
.field-error {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #b91c1c;
}
.crm-input--invalid {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 2px rgba(239,68,68,0.15);
}

/* Кнопка в обработке */
.crm-form__container button.is-processing {
  opacity: .75;
  pointer-events: none;
}

/* Глобальный тост снизу */
#crm-global-toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translate(-50%, 20px);
  background: #111827;
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: transform .2s ease, opacity .2s ease;
  z-index: 10001;
}
#crm-global-toast.ok { background: #065f46; }
#crm-global-toast.err { background: #7f1d1d; }
#crm-global-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Плавные анимации */
@keyframes crmFadeInUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Улучшим кликабельность крестика */
.crm-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  background: #fff;
  border-radius: 10px;
  cursor: pointer;
  box-sizing: border-box;
  transition: transform .12s ease, opacity .12s ease;
}
.crm-close:hover { transform: scale(1.03); }
.crm-close:active { transform: scale(0.98); }

/* Запрет скролла когда модалка открыта */
.crm-no-scroll { overflow: hidden; }

/* Обёртка поля + иконка "Мой номер" */
.input-wrap { position: relative; }
.input-wrap .fill-phone {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: 8px; border: 1px solid #e5e7eb;
  background: #fff; display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background .15s, transform .1s, border-color .15s;
}
.input-wrap .fill-phone:hover { background: #f9fafb; border-color:#d1d5db; }
.input-wrap .fill-phone:active { transform: translateY(-50%) scale(.98); }

/* микро-тексты */
.micro-info { margin-top: -6px; color:#6b7280; font-size:12px; }
.micro-footer { margin-top: 8px; color:#6b7280; font-size:12px; text-align:center; }

/* Морфинг кнопки "Отправить" в прогресс-кольцо и галочку */
.crm-form__container button.is-processing {
  position: relative;
  color: transparent; /* прячем текст, оставляем размеры */
}

/* само кольцо */
.crm-form__container button.is-processing::after {
  content: "";
  position: absolute; inset: 50% auto auto 50%;
  width: 22px; height: 22px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 2px solid #fff;
  border-right-color: transparent;
  animation: crm-spin .8s linear infinite;
  opacity: .95;
}

/* финальная галочка (класс добавим из JS на успех) */
.crm-form__container button.is-done {
  background:#16a34a !important; /* зелёный */
}
.crm-form__container button.is-done::after {
  content: "✓";
  width:auto; height:auto; border:none; animation:none;
  color:#fff; font-weight:700; font-size:18px;
}

/* анимации */
@keyframes crm-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
