/* Форма «Попробовать ИИ-примерку» (redesign/js/tryon-lead.js).
   Цвета литералами: тема Aspro перебивает --dark/--light на body.
   z-index = как у попапа-опроса, выше панели чата (2147482100). */
html.tl-open { overflow: hidden; }

/* Ссылка-триггер: тема красит ссылки текста в цвет абзаца без подчёркивания */
a[href="#ai-tryon-form"] {
  color: #8F7662;
  text-decoration: underline;
  text-underline-offset: 3px;
}
a[href="#ai-tryon-form"] b,
a[href="#ai-tryon-form"] strong {
  color: inherit;
}
a[href="#ai-tryon-form"]:hover,
a[href="#ai-tryon-form"]:focus {
  color: #001F1F;
  text-decoration: underline;
}

.tl-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 31, 31, .5);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  font-family: 'Inter', sans-serif;
  animation: tlFade .2s ease;
}
.tl-overlay[hidden] { display: none; }
@keyframes tlFade { from { opacity: 0; } to { opacity: 1; } }

.tl-modal {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  max-width: 440px;
  max-height: calc(100vh - 48px);
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 38px 34px 30px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 30px 90px rgba(0, 31, 31, .4);
  color: #001F1F;
}

.tl-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 30px;
  line-height: 1;
  color: #001F1F;
  opacity: .5;
  cursor: pointer;
  transition: opacity .15s;
}
.tl-close:hover { opacity: 1; }

.tl-title {
  margin: 0 0 8px;
  padding-right: 30px;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.22;
  color: #001F1F;
}
.tl-lead {
  margin: 0 0 22px;
  font-size: 16px;
  line-height: 1.4;
  color: rgba(0, 31, 31, .7);
}

.tl-field { margin-bottom: 14px; }
.tl-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 500;
  color: #001F1F;
}
.tl-req {
  margin-left: 3px;
  font-weight: 600;
  color: #8F7662;
}
.tl-field input {
  box-sizing: border-box;
  width: 100%;
  height: 50px;
  padding: 0 14px;
  border: 1px solid rgba(0, 31, 31, .2);
  border-radius: 12px;
  background: #fff;
  font: inherit;
  font-size: 16px;
  color: #001F1F;
  transition: border-color .15s;
}
.tl-field input:focus { outline: none; border-color: #8F7662; }
.tl-field input[aria-invalid="true"] { border-color: #b3261e; }
.tl-err, .tl-fail {
  margin-top: 6px;
  font-size: 14px;
  font-weight: 500;
  color: #b3261e;
}
.tl-err[hidden], .tl-fail[hidden] { display: none; }

.tl-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.tl-submit {
  width: 100%;
  margin-top: 8px;
  padding: 17px;
  border: 0;
  border-radius: 14px;
  background: #001F1F;
  color: #fff;
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.tl-submit:hover { background: #8F7662; }
.tl-submit:disabled { opacity: .6; cursor: default; }

.tl-legal {
  margin: 14px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: rgba(0, 31, 31, .55);
}
.tl-legal a { color: inherit; text-decoration: underline; }

.tl-done { text-align: center; padding: 14px 0 4px; }
.tl-done[hidden] { display: none; }
.tl-done-title { font-size: 26px; font-weight: 700; line-height: 1.22; margin-bottom: 8px; }
.tl-done p { margin: 0 0 18px; font-size: 16px; color: rgba(0, 31, 31, .7); }

@media (max-width: 480px) {
  .tl-overlay { align-items: flex-end; padding: 0 10px max(10px, env(safe-area-inset-bottom)); }
  .tl-modal { max-height: calc(100vh - 16px); padding: 28px 20px 20px; border-radius: 18px; }
  .tl-title { font-size: 22px; }
  .tl-lead { font-size: 15px; margin-bottom: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .tl-overlay { animation: none; }
}
