/* Doctor Launch — «Не нашли нужное или есть вопрос?», опрос на оформлении, вопрос после кредита (23.09.2026).
   Поведение — js/dl-survey.js, обработчик — /dl-survey.php. Подключены из html/drlaunch/drawer.html
   (он есть на каждой странице). При правке менять ?v= там же. Откат — убрать две строки подключения. */

.dls-entry,
.dls-modal,
.dls-card {
  --dls-ink: #1a1917;
  --dls-muted: #5f5e5a;
  --dls-line: #e0ded9;
  --dls-soft: #fafaf8;
  --dls-err: #a3261a;
  --dls-ring: 0 0 0 3px rgba(47, 91, 211, .28);
  font-family: Manrope, system-ui, sans-serif;
  color: var(--dls-ink);
}

/* ——— входы: боковое меню, пустой поиск, карточка товара ——— */

.dls-entry--sidebar {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--dls-line);
  border-radius: 12px;
  background: #fff;
}

.dls-entry__title {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}

.dls-entry__text {
  margin: 4px 0 10px;
  color: var(--dls-muted);
  font-size: 12px;
  line-height: 1.4;
}

.dls-entry__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1.5px solid var(--dls-ink);
  border-radius: 10px;
  background: #fff;
  color: var(--dls-ink);
  font: 700 13px/1.2 Manrope, system-ui, sans-serif;
  cursor: pointer;
}

.dls-entry__btn:hover { background: var(--dls-ink); color: #fff; }
.dls-entry__btn:focus-visible { outline: none; box-shadow: var(--dls-ring); }

.dls-entry--search {
  display: grid;
  justify-items: center;
  gap: 8px;
  width: 100%;
  margin-top: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--dls-line);
  text-align: center;
}

.dls-entry--search .dls-entry__title { font-size: 15px; }
.dls-entry--search .dls-entry__text { margin: 0; font-size: 14px; max-width: 400px; }
.dls-entry--search .dls-entry__btn { width: auto; min-height: 44px; padding: 0 18px; }

.dls-entry--product {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin-top: 12px;
  color: var(--dls-muted);
  font-size: 14px;
  line-height: 1.4;
}

.dls-entry__link {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--dls-ink);
  font: 700 14px/1.3 Manrope, system-ui, sans-serif;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.dls-entry__link:focus-visible { outline: none; box-shadow: var(--dls-ring); border-radius: 4px; }

/* Пункт выдвижного меню телефона — как соседние строки, иконка своя */
.drawer__cat-item.dls-drawer-item { width: 100%; border: 0; background: none; text-align: left; font: inherit; cursor: pointer; }
.dls-drawer-item .drawer__cat-icon svg { width: 16px; height: 16px; }

/* ——— окно вопроса ——— */

body.dls-lock { overflow: hidden; }

.dls-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.dls-modal[hidden] { display: none; }

.dls-modal__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(26, 25, 23, .48);
  cursor: default;
}

.dls-modal__dialog {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  max-width: 480px;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  padding: 24px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .22);
}

.dls-x {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--dls-muted);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.dls-x:hover { background: var(--dls-soft); color: var(--dls-ink); }
.dls-x:focus-visible { outline: none; box-shadow: var(--dls-ring); }

.dls-h {
  margin: 0 40px 6px 0;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.25;
}

.dls-lead {
  margin: 0 0 16px;
  color: var(--dls-muted);
  font-size: 14px;
  line-height: 1.45;
}

.dls-product {
  margin: -8px 0 16px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--dls-soft);
  font-size: 13px;
  line-height: 1.4;
}

.dls-form { display: grid; gap: 14px; }

.dls-field { display: grid; gap: 6px; }

.dls-field > label,
.dls-label {
  font-size: 13px;
  font-weight: 700;
  color: #3d3b37;
}

.dls-opt { font-weight: 400; color: var(--dls-muted); }

.dls-field input[type="text"],
.dls-field textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1.5px solid #948f87;
  border-radius: 11px;
  background: #fff;
  color: var(--dls-ink);
  font: 400 16px/1.4 Manrope, system-ui, sans-serif;   /* меньше 16 px iOS увеличивает страницу */
  resize: vertical;
}

.dls-field textarea { min-height: 96px; }

.dls-field input:focus,
.dls-field textarea:focus { outline: none; border-color: var(--dls-ink); box-shadow: var(--dls-ring); }

.dls-field [aria-invalid="true"] { border-color: var(--dls-err); }

.dls-hint {
  margin: 0;
  color: var(--dls-muted);
  font-size: 12px;
  line-height: 1.4;
}

.dls-consent[hidden] { display: none; }

.dls-submit {
  width: 100%;
  min-height: 52px;
  padding: 0 18px;
  border: 0;
  border-radius: 12px;
  background: var(--dls-ink);
  color: #fff;
  font: 700 16px/1.2 Manrope, system-ui, sans-serif;
  cursor: pointer;
}

.dls-submit:hover { background: #000; }
.dls-submit:focus-visible { outline: none; box-shadow: var(--dls-ring); }
.dls-submit[disabled] { opacity: .6; cursor: progress; }

.dls-msg {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
}

.dls-msg[hidden] { display: none; }
.dls-msg.is-error { color: var(--dls-err); }

.dls-alt {
  margin: 14px 0 0;
  color: var(--dls-muted);
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
}

.dls-alt a { color: var(--dls-ink); font-weight: 700; white-space: nowrap; }

.dls-done { text-align: center; padding: 8px 0 4px; }

.dls-done__icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: #e7f4ea;
  color: #1f6b34;
  font-size: 24px;
  font-weight: 800;
}

.dls-done .dls-h { margin: 0 0 6px; }
.dls-done .dls-lead { margin: 0; }

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

/* ——— плашка-опрос: оформление и кредит (не модальная) ——— */

.dls-card {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 2147483000;
  box-sizing: border-box;
  width: 380px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  padding: 20px;
  border: 1px solid var(--dls-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .18);
  animation: dls-in .22s ease-out;
}

.dls-card[hidden] { display: none; }

@keyframes dls-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .dls-card { animation: none; }
}

.dls-card .dls-x { top: 6px; right: 6px; }
.dls-card .dls-h { font-size: 17px; margin-right: 36px; }
.dls-card .dls-lead { font-size: 13px; margin-bottom: 12px; }
.dls-card .dls-form { gap: 12px; }

.dls-chips { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }

.dls-chip {
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: 1.5px solid #d6d3cd;
  border-radius: 11px;
  background: #fff;
  color: var(--dls-ink);
  font: 600 14px/1.3 Manrope, system-ui, sans-serif;
  text-align: left;
  cursor: pointer;
}

.dls-chip:hover { border-color: var(--dls-ink); }
.dls-chip:focus-visible { outline: none; box-shadow: var(--dls-ring); }
.dls-chip[aria-pressed="true"] { border-color: var(--dls-ink); background: var(--dls-ink); color: #fff; }

.dls-back {
  justify-self: start;
  min-height: 32px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--dls-muted);
  font: 600 13px/1.2 Manrope, system-ui, sans-serif;
  cursor: pointer;
}

.dls-back:focus-visible { outline: none; box-shadow: var(--dls-ring); border-radius: 4px; }

@media (max-width: 767px) {
  .dls-modal { align-items: flex-end; padding: 0; }
  .dls-modal__dialog {
    max-width: none;
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
    border-radius: 16px 16px 0 0;
  }
  .dls-card {
    left: 8px;
    right: 8px;
    bottom: calc(8px + var(--dls-bottom, 0px));
    width: auto;
    max-width: none;
    max-height: calc(100vh - 96px - var(--dls-bottom, 0px));
    max-height: calc(100dvh - 96px - var(--dls-bottom, 0px));
    padding: 16px;
  }
  .dls-h { font-size: 18px; }
}
