@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400;
  font-display: optional;
  src: url('/fonts/montserrat-cyrillic-400.woff2?v=7849168d695f8cba6b33') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400;
  font-display: optional;
  src: url('/fonts/montserrat-latin-400.woff2?v=ddc148b8a0a27b1449fd') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 500;
  font-display: optional;
  src: url('/fonts/montserrat-cyrillic-500.woff2?v=ef3882642e9f2f1d67b0') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 500;
  font-display: optional;
  src: url('/fonts/montserrat-latin-500.woff2?v=ed121b1a8fbf30998a4e') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  --ink: #202020;
  --muted: #74747d;
  --line: #b9b9bf;
  --soft: #f0f0f2;
  --blue: #0c62bd;
  --paper: #ffffff;
  --accent: #272725;
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-width: 0;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--paper);
  overscroll-behavior-y: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}

button,
input {
  font: inherit;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

input {
  -webkit-user-select: text;
  user-select: text;
}

a {
  color: var(--blue);
  text-decoration: none;
  text-underline-offset: 3px;
}

a:active {
  opacity: 0.72;
}

.page-shell {
  display: block;
  width: 100%;
  min-height: 100dvh;
}

.consultation-card {
  display: flex;
  width: 100%;
  min-height: 100dvh;
  flex-direction: column;
  padding:
    max(22px, env(safe-area-inset-top))
    max(14px, env(safe-area-inset-right))
    max(14px, env(safe-area-inset-bottom))
    max(14px, env(safe-area-inset-left));
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: var(--paper);
  box-shadow: none;
}

.intro,
.support-note {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
}

.intro {
  max-width: 410px;
}

.intro-callback {
  display: none;
}

.callback-mode .intro-default,
.callback-mode .consultation-select {
  display: none;
}

.callback-mode .intro-callback {
  display: inline;
}

.support-note {
  margin-top: 12px;
  color: var(--ink);
}

form {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  margin-top: 22px;
}

.consultation-select {
  position: relative;
  display: block;
}

.consultation-select__trigger {
  position: relative;
  display: flex;
  width: 100%;
  height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 52px 0 16px;
  border: 1px solid #56565a;
  border-radius: 13px;
  outline: none;
  background: var(--paper);
  color: #92929c;
  font-size: 16px;
  font-weight: 400;
  text-align: left;
}

.consultation-select__trigger.has-value {
  color: var(--ink);
}

.consultation-select__trigger:focus-visible {
  border-color: #202020;
  box-shadow: 0 0 0 3px rgba(32, 32, 32, 0.08);
}

.consultation-select__arrow {
  position: absolute;
  top: 50%;
  right: 17px;
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  pointer-events: none;
  transform: translateY(-50%);
  transition: transform 160ms ease;
}

.consultation-select__trigger[aria-expanded='true'] .consultation-select__arrow {
  transform: translateY(-50%) rotate(180deg);
}

.consultation-select__arrow svg {
  width: 16px;
  fill: none;
  stroke: var(--ink);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.4;
}

.consultation-options {
  display: grid;
  margin-top: 4px;
  overflow: hidden;
  border-radius: 14px;
  background: var(--paper);
  box-shadow: 0 8px 24px rgba(32, 32, 32, 0.1);
}

.consultation-options[hidden] {
  display: none;
}

.consultation-options button {
  min-height: 52px;
  padding: 0 16px;
  border: 0;
  border-bottom: 1px solid #f2f2f3;
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  font-weight: 400;
  text-align: left;
}

.consultation-options button:last-child {
  border-bottom: 0;
}

.consultation-options button:active,
.consultation-options button[aria-selected='true'] {
  background: #f7f7f8;
}

.consultation-options button:focus-visible {
  position: relative;
  outline: 2px solid rgba(12, 98, 189, 0.5);
  outline-offset: -2px;
}

.success-view {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.success-view[hidden] {
  display: none;
}

.success-view p {
  max-width: 340px;
  margin: 0;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.4;
}

.consultation-card.is-success .intro,
.consultation-card.is-success .support-note,
.consultation-card.is-success form {
  display: none;
}

.fields {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.fields[hidden] {
  display: none;
}

.field {
  position: relative;
  display: block;
}

.field > span {
  position: absolute;
  z-index: 1;
  top: 8px;
  left: 16px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  opacity: 0;
  transform: translateY(5px);
  transition: 160ms ease;
}

.field:focus-within > span,
.field:has(input:not(:placeholder-shown)) > span {
  opacity: 1;
  transform: translateY(0);
}

.field input {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border: 1px solid #56565a;
  border-radius: 13px;
  outline: none;
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  transition: border-color 160ms ease, box-shadow 160ms ease, padding 160ms ease;
}

.field input::placeholder {
  color: #9c9ca7;
}

.field:focus-within input,
.field:has(input:not(:placeholder-shown)) input {
  padding-top: 13px;
}

.field input:focus {
  border-color: #202020;
  box-shadow: 0 0 0 3px rgba(32, 32, 32, 0.08);
}

.field input[aria-invalid='true'] {
  border-color: #bb3e3e;
}

.field-error {
  display: none;
  margin: 6px 4px 0;
  color: #a42d2d;
  font-size: 11px;
}

.field-error:not(:empty) {
  display: block;
}

.phone-hint {
  max-width: 315px;
  color: #ff5c55;
  font-size: 13px;
  line-height: 1.25;
}

.request-note {
  min-height: 68px;
  margin-top: 14px;
  padding: 17px 16px;
  border-radius: 15px;
  background: var(--soft);
  font-size: 13px;
  line-height: 1.45;
}

.form-spacer {
  min-height: 56px;
  flex: 1;
}

.consents {
  display: grid;
  gap: 13px;
}

.checkbox-row {
  position: relative;
  display: grid;
  grid-template-columns: 20px 1fr;
  align-items: start;
  gap: 11px;
  font-size: 12px;
  line-height: 1.55;
  cursor: pointer;
}

.checkbox-row input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.checkbox-control {
  display: grid;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  place-items: center;
  border: 1px solid #93939b;
  border-radius: 5px;
  background: white;
  transition: 160ms ease;
}

.checkbox-control svg {
  width: 12px;
  fill: none;
  stroke: white;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  opacity: 0;
  transform: scale(0.7);
  transition: 160ms ease;
}

.checkbox-row input:focus-visible + .checkbox-control {
  box-shadow: 0 0 0 3px rgba(12, 98, 189, 0.2);
}

.checkbox-row input:checked + .checkbox-control {
  border-color: var(--accent);
  background: var(--accent);
}

.checkbox-row input:checked + .checkbox-control svg {
  opacity: 1;
  transform: scale(1);
}

.form-status {
  min-height: 20px;
  margin: 14px 2px 8px;
  color: #a42d2d;
  font-size: 12px;
  line-height: 1.4;
}

.form-status[data-kind='success'] {
  color: #216c42;
}

.submit-button {
  display: flex;
  width: 100%;
  min-height: 56px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 7px 8px 7px 20px;
  border: 0;
  border-radius: 14px;
  background: var(--accent);
  color: white;
  flex: 0 0 auto;
  font-weight: 500;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease, opacity 160ms ease;
}

.submit-button[hidden] {
  display: none;
}

.submit-button:focus-visible {
  outline: 3px solid rgba(12, 98, 189, 0.28);
  outline-offset: 3px;
}

.submit-button:disabled,
.submit-button[aria-disabled='true'] {
  background: #c9c9cf;
}

.button-arrow {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.13);
}

.button-arrow svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.submit-button.is-loading .button-arrow svg {
  animation: pulse 800ms ease-in-out infinite alternate;
}

@keyframes pulse {
  to {
    opacity: 0.35;
    transform: translateX(4px);
  }
}

@media (max-height: 700px) {
  .form-spacer {
    min-height: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
