/* ============================================================
   Вход в ЛК клиники внутри приложения ГЗТ.РФ (User-Agent содержит GZTApp).
   Оформление повторяет мастер входа gzt.med/auth: светлый фон, белая карточка,
   поля с рамкой и радиусом 16, красная кнопка-пилюля. Подключается после
   style.css и mobile-app.css только для приложения; сайт не затрагивает.
   ============================================================ */

body.gzt-app {
  margin: 0;
  min-height: 100vh;
  background: #efe4ea;
  background-image: linear-gradient(160deg, #f3f0fb 0%, #f7e9ee 55%, #f5e3e6 100%);
  font-family: 'Inter Display', 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

body.gzt-app .wrapper,
body.gzt-app .registration {
  background: transparent;
  padding: 0;
  min-height: 100vh;
}

body.gzt-app .registration {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: calc(env(safe-area-inset-top, 0px) + 16px) 16px calc(env(safe-area-inset-bottom, 0px) + 24px);
  box-sizing: border-box;
}

body.gzt-app .registration > .container {
  width: 100%;
  max-width: 440px;
  margin: 0;
  padding: 20px 20px 24px;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 12px 40px rgba(2, 13, 32, 0.06);
  box-sizing: border-box;
}

/* «Вернуться назад» — тихая ссылка, как в мастере */
body.gzt-app .registration .close {
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #5c6578;
  margin-bottom: 4px;
}
body.gzt-app .registration .close svg {
  width: 7px;
  height: 13px;
}
body.gzt-app .registration .close svg path {
  fill: #5c6578;
}

body.gzt-app .registration_top {
  padding-top: 8px;
  margin-bottom: 20px;
}
body.gzt-app .registration_top img {
  height: 40px;
  width: auto;
}
body.gzt-app .registration_top .section_title {
  margin-top: 18px;
  font-size: 24px;
  line-height: 1.15;
  font-weight: 600;
  color: #1c2258;
  letter-spacing: -0.02em;
  text-align: center;
}
body.gzt-app .registration_top p {
  margin-top: 8px;
  font-size: 15px;
  color: #a18a92;
  text-align: center;
}

body.gzt-app .alert-success {
  border-radius: 12px;
  font-size: 14px;
}
body.gzt-app #sdk-error {
  font-size: 13px;
}
body.gzt-app #sdk-error:not(:empty) {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  text-align: left;
}

body.gzt-app .registration_form.bottom {
  gap: 0;
}
body.gzt-app .registration_form_phone {
  width: 100%;
  gap: 0;
  margin-bottom: 14px;
}
body.gzt-app .registration_form_phone .form-group {
  margin: 0;
}
body.gzt-app .form_item_input,
body.gzt-app .registration_form_content .form_item_input {
  width: 100%;
  height: 56px;
  padding: 16px 20px 16px 52px;
  background: #fff;
  border: 1px solid rgba(161, 138, 146, 0.4);
  border-radius: 16px;
  font-family: inherit;
  font-size: 16px; /* ≥16px: iOS не приближает поле при фокусе */
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.32px;
  color: #1c2258;
  outline: none;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.2s;
}
body.gzt-app .form_item_input:focus {
  border-color: #ed3237;
}
body.gzt-app .form_item_input::placeholder {
  color: #a18a92;
}
body.gzt-app .registration_form_phone img {
  top: 50%;
  left: 20px;
  width: 20px;
  height: 20px;
  transform: translateY(-50%);
  opacity: 0.8;
}
body.gzt-app .help-block {
  font-size: 13px;
}

body.gzt-app button.button,
body.gzt-app .registration .button {
  width: 100%;
  height: 54px;
  margin-top: 6px;
  padding: 0 24px;
  background: #ed3237;
  color: #fff;
  border: none;
  border-radius: 32px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: none;
}
body.gzt-app .registration .button:active {
  background: #d02a25;
}

body.gzt-app .login-registration {
  font-size: 14px;
  color: #5c6578;
  margin: 12px 0 0;
}
body.gzt-app .login-registration a {
  color: #ed3237;
  text-decoration: underline;
  text-underline-offset: 3px;
}

body.gzt-app .registration_form_check {
  margin-top: 18px;
  gap: 10px;
}
body.gzt-app .registration_form_check p {
  font-size: 12px;
  line-height: 1.4;
  color: rgba(2, 13, 32, 0.5);
}
body.gzt-app .registration_form_check p a {
  color: #ed3237 !important;
}
body.gzt-app .custom_checkbox .checkmark {
  border-radius: 6px;
  background: #1c2258;
}

/* Без масштабирования: страница не шире экрана, тап без задержки */
body.gzt-app {
  touch-action: pan-x pan-y;
}

/* Шрифт и фон мастера входа gzt.med (файлы скопированы из /var/www/hormone) */
@font-face { font-family: "Inter Display"; font-weight: 400; font-style: normal; font-display: swap; src: url("/fonts/interdisplay-regular.ttf") format("truetype"); }
@font-face { font-family: "Inter Display"; font-weight: 500; font-style: normal; font-display: swap; src: url("/fonts/interdisplay-medium.ttf") format("truetype"); }
@font-face { font-family: "Inter Display"; font-weight: 600; font-style: normal; font-display: swap; src: url("/fonts/interdisplay-semibold.ttf") format("truetype"); }
body.gzt-app {
  background-color: #efe4ea;
  background-image: url("/images/auth-bg.webp");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  background-attachment: fixed;
}

/* gzt-app-v3-tweaks: как в мастере входа — карточка по центру экрана, кнопка того же красного, без hover-оттенка сайта */
body.gzt-app .registration {
  align-items: center;
  min-height: 100vh;
  min-height: 100dvh;
}
body.gzt-app .registration > .container {
  padding: 24px 20px 28px;
}
body.gzt-app button.button,
body.gzt-app .registration .button,
body.gzt-app .registration .button:hover,
body.gzt-app .registration .button:focus {
  background: #ed3237 !important;
  background-image: none !important;
  color: #fff !important;
}
body.gzt-app .registration .button:active {
  background: #d02a25 !important;
}
body.gzt-app .registration_top .section_title {
  font-size: 26px;
  color: #020d20;
}
body.gzt-app .registration .close span {
  color: #5c6578;
}
body.gzt-app .login-registration a,
body.gzt-app .registration_form_check p a {
  color: #ed3237 !important;
  text-decoration: underline;
  text-decoration-color: rgba(237, 50, 55, 0.3);
}

/* gzt-app-v4-layout: карточка как в мастере входа — без пустой полосы над полями,
   «Вернуться назад» тихой ссылкой внизу, ровные отступы сверху и снизу */
body.gzt-app .registration {
  align-items: center;
  padding: calc(env(safe-area-inset-top, 0px) + 20px) 16px calc(env(safe-area-inset-bottom, 0px) + 20px) !important;
}
body.gzt-app .registration > .container {
  display: flex !important;
  flex-direction: column;
  padding: 28px 20px 24px !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}
body.gzt-app .registration_top {
  padding-top: 0;
  margin-bottom: 8px !important;
}
body.gzt-app .registration_top img {
  height: 36px;
}
body.gzt-app .registration_top .section_title {
  margin-top: 16px !important;
}
body.gzt-app .registration_top p {
  margin-top: 8px !important;
  margin-bottom: 0;
}
body.gzt-app #sdk-error:empty {
  display: none;
  margin: 0;
}
body.gzt-app form#login-form,
body.gzt-app .registration_form.login {
  padding-top: 20px !important;
  margin: 0;
  max-width: none;
}
body.gzt-app .registration_form.bottom {
  gap: 0 !important;
  align-items: stretch;
}
body.gzt-app .registration_form.bottom .button {
  margin-top: 4px !important;
}
body.gzt-app .registration_form_check {
  margin-top: 16px !important;
}
body.gzt-app .login-registration {
  margin: 14px 0 0 !important;
  text-align: center;
  max-width: none;
  font-size: 14px;
}
/* «Вернуться назад» — под формой, по центру, как «Выбрать другой путь» в мастере */
body.gzt-app .registration .close {
  order: 99;
  align-self: center;
  margin: 22px 0 0 !important;
  font-size: 14px;
  font-weight: 500;
  color: #5c6578;
  text-decoration: none;
}
