/* Движок формы рождения (встраивается в таро, кабинет, MV) — без lp-hd page shell */
.birth-engine{
  margin:0;
  min-height:0;
  background:transparent;
  font:inherit;
  color:inherit;
  line-height:inherit;
}
.birth-engine .lp-hd-fields{display:grid;gap:11px}
.birth-engine .lp-hd-field{
  display:flex;
  flex-direction:column;
  gap:5px;
  margin:0;
  min-width:0;
}
.birth-engine .lp-hd-field>span{
  font-size:.72rem;
  font-weight:800;
  color:#5a4d7a;
  letter-spacing:.03em;
  text-transform:uppercase;
}
.birth-engine .lp-hd-field input{
  width:100%;
  box-sizing:border-box;
  padding:12px 13px;
  border-radius:13px;
  border:1.5px solid #e4dff5;
  background:#fbfaff;
  color:#17122a;
  font:inherit;
  font-size:.95rem;
  transition:border-color .15s,box-shadow .15s,background .15s;
}
.birth-engine .lp-hd-field input:focus{
  outline:none;
  border-color:#8b5cf6;
  background:#fff;
  box-shadow:0 0 0 4px rgba(139,92,246,.14);
}
.birth-engine .lp-hd-grid2{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:10px;
}
.birth-engine .lp-hd-city-wrap{position:relative}
.birth-engine .suggest{
  position:absolute;
  left:0;
  right:0;
  top:calc(100% + 6px);
  z-index:60;
  display:none;
  max-height:280px;
  overflow:auto;
  padding:6px;
  border-radius:16px;
  border:1px solid #e4dff5;
  background:#fff;
  box-shadow:0 16px 40px rgba(31,38,69,.16);
}
.birth-engine .suggest:not(.is-open){display:none!important}
.birth-engine .suggest.is-open{display:block!important}
.birth-engine .suggest-item{
  width:100%;
  display:grid;
  grid-template-columns:34px 1fr auto;
  align-items:center;
  gap:10px;
  text-align:left;
  border:0;
  background:#fff;
  padding:10px;
  border-radius:12px;
  cursor:pointer;
  color:#1a1430;
  font:inherit;
}
.birth-engine .suggest-item:hover,
.birth-engine .suggest-item:focus{background:#f4f3ff;outline:0}
.birth-engine .suggest-pin{
  width:34px;height:34px;display:grid;place-items:center;
  background:#efedff;color:#5b46e8;border-radius:11px;font-size:.9rem;
}
.birth-engine .suggest-copy{display:flex;flex-direction:column;min-width:0;gap:2px}
.birth-engine .suggest-copy strong{font-size:.92rem;font-weight:700}
.birth-engine .suggest-copy small{
  color:#7a7390;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:.78rem;
}
.birth-engine .suggest-state{padding:14px;color:#7a7390;font-size:.88rem;display:flex;align-items:center;gap:8px}
.birth-engine .spinner{
  width:16px;height:16px;border:2px solid #e4dff5;border-top-color:#5b46e8;border-radius:50%;
  animation:bf-spin .7s linear infinite;
}
@keyframes bf-spin{to{transform:rotate(360deg)}}
.birth-engine .lp-hd-place{
  display:none!important;
  grid-template-columns:auto 1fr auto;
  gap:10px;
  align-items:center;
  padding:10px 12px;
  border-radius:14px;
  background:linear-gradient(135deg,#f5f3ff,#eef2ff);
  border:1px solid rgba(91,70,232,.15);
}
.birth-engine .lp-hd-place.is-visible{display:grid!important}
.birth-engine .lp-hd-place[hidden]{display:none!important}
.birth-engine .lp-hd-place-ic{font-size:1.2rem}
.birth-engine .lp-hd-place-main{min-width:0;display:flex;flex-direction:column;gap:1px}
.birth-engine .lp-hd-place-main small{
  font-size:.68rem;font-weight:700;color:#7c3aed;text-transform:uppercase;letter-spacing:.03em;
}
.birth-engine .lp-hd-place-main strong{font-size:.92rem;color:#17122a}
.birth-engine .lp-hd-place-main span{font-size:.78rem;color:#6b657a}
.birth-engine .lp-hd-place-meta{display:none}
.birth-engine .lp-hd-place-change{
  border:0;background:#fff;color:#5b46e8;font:inherit;font-size:.78rem;font-weight:700;
  padding:7px 10px;border-radius:10px;cursor:pointer;border:1px solid rgba(91,70,232,.15);
}
.birth-engine .lp-hd-place-change:hover{background:#f5f3ff}
.birth-engine .lp-hd-time-field{position:relative}
.birth-engine .lp-hd-time-shell{display:flex;flex-direction:column;gap:4px;align-items:stretch}
.birth-engine .lp-hd-time-field input[type="time"]{
  width:100%;min-height:42px;padding:10px 12px;border-radius:12px;
  border:1px solid #ddd6f5;background:#fff;font:inherit;color:#1a1430;
}
.birth-engine .lp-hd-time-field .inline-help{
  align-self:flex-start;border:0;background:transparent;padding:0;
  color:#5b46e8;font-size:.78rem;font-weight:700;cursor:pointer;text-align:left;
}
.birth-engine .lp-hd-time-field .inline-help:hover{text-decoration:underline;text-underline-offset:2px}
.birth-engine .lp-hd-time-field.is-approximate input[type="time"]{
  border-color:#f59e0b;background:#fffbeb;
}
.birth-engine .lp-hd-time-field.is-approximate::after{
  content:"примерно";position:absolute;right:10px;top:36px;
  font-size:.58rem;color:#b45309;font-weight:800;background:#fff8e7;
  padding:1px 6px;border-radius:999px;
}

/* «Указать дату» в MV-сервисах и кабинете */
.mv-birth-attach-form,
.cab-birth-attach-form{
  display:grid;
  gap:12px;
  width:100%;
  min-width:0;
}
.mv-birth-opt-body .mv-birth-attach-form{
  max-width:none;
}
.mv-soft-gate .mv-birth-attach-form{
  margin-top:4px;
}
.mv-birth-attach-form .birth-engine,
.cab-birth-attach-form .birth-engine{
  width:100%;
  min-width:0;
}
.birth-engine-submit{
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  box-sizing:border-box;
  margin:0;
  padding:12px 16px;
  border:0;
  border-radius:14px;
  background:linear-gradient(135deg,#6847f5 0%,#7c3aed 50%,#a855f7 100%);
  color:#fff!important;
  font:inherit;
  font-size:.95rem;
  font-weight:800;
  cursor:pointer;
  text-decoration:none;
  box-shadow:0 10px 24px rgba(104,71,245,.28);
  transition:transform .12s,filter .12s;
}
.birth-engine-submit:hover{filter:brightness(1.05);transform:translateY(-1px)}
.birth-engine-submit:disabled,.birth-engine-submit.is-loading{
  opacity:.62;cursor:not-allowed;pointer-events:none;transform:none;
  background:linear-gradient(135deg,#9ca3af,#6b7280)!important;box-shadow:none!important;
}
.cab-birth-attach-form .cab-birth-gate-actions{
  display:grid;
  gap:10px;
  width:100%;
}
.cab-birth-attach-form .cab-birth-gate-actions .secondary-button{
  width:100%;
}

/* Модалка «Не знаю время» (modal вне .birth-engine) */
body.modal-open{overflow:hidden}
#timeHelperModal.modal{position:fixed;inset:0;z-index:120;display:none!important}
#timeHelperModal.modal.is-open{display:block!important}
#timeHelperModal .modal-backdrop{position:absolute;inset:0;background:rgba(11,14,29,.63);backdrop-filter:blur(7px)}
#timeHelperModal .assistant-modal{
  position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);
  width:min(570px,calc(100% - 24px));max-height:min(780px,calc(100vh - 24px));
  display:flex;flex-direction:column;background:#fff;border-radius:27px;
  box-shadow:0 35px 100px rgba(0,0,0,.32);overflow:hidden;
}
#timeHelperModal .modal-close{
  position:absolute;right:15px;top:13px;width:34px;height:34px;border:0;
  background:#f1f2f7;border-radius:11px;font-size:1.35rem;cursor:pointer;color:#596075;
}
#timeHelperModal .assistant-head{display:flex;gap:13px;align-items:center;padding:22px 24px 13px}
#timeHelperModal .assistant-avatar{
  width:44px;height:44px;display:grid;place-items:center;border-radius:14px;
  background:linear-gradient(135deg,#6847f5,#9a78ff);color:#fff;font-size:1.2rem;
}
#timeHelperModal .assistant-head small{color:#6847f5;font-weight:800;text-transform:uppercase;font-size:.64rem;letter-spacing:.1em}
#timeHelperModal .assistant-head h2{font-size:1.25rem;margin:2px 0;color:#17122a}
#timeHelperModal .assistant-context{
  margin:0 24px 10px;padding:10px 12px;border-radius:12px;
  background:#f2efff;border:1px solid #e2d9ff;color:#4a378d;font-size:.82rem;line-height:1.45;
}
#timeHelperModal .assistant-warning{
  margin:0 24px 12px;padding:10px 12px;border-radius:12px;
  background:#fffbeb;border:1px solid #fde68a;color:#92400e;font-size:.82rem;line-height:1.45;
}
#timeHelperModal .chat{display:flex;flex-direction:column;gap:10px;padding:0 24px 12px;overflow-y:auto;flex:1;min-height:120px;max-height:340px}
#timeHelperModal .chat-bubble{max-width:85%;padding:11px 13px;border-radius:16px;white-space:pre-wrap;font-size:.91rem}
#timeHelperModal .chat-bubble.assistant{align-self:flex-start;background:#fff;border:1px solid #e4dff5;border-bottom-left-radius:5px}
#timeHelperModal .chat-bubble.user{align-self:flex-end;background:#6847f5;color:#fff;border-bottom-right-radius:5px}
#timeHelperModal .quick-replies{display:flex;gap:7px;flex-wrap:wrap;padding:10px 24px 0}
#timeHelperModal .quick-replies button{
  border:1px solid #e4dff5;background:#fff;color:#4a378d;border-radius:999px;padding:7px 12px;font:inherit;font-size:.78rem;font-weight:700;cursor:pointer;
}
#timeHelperModal .chat-form{display:flex;gap:8px;padding:13px 18px 18px}
#timeHelperModal .chat-form input{
  flex:1;border:1.5px solid #e4dff5;border-radius:12px;padding:10px 12px;font:inherit;
}
#timeHelperModal .chat-form button,
#timeHelperModal .apply-time{
  border:0;border-radius:12px;padding:10px 16px;background:#6847f5;color:#fff;font:inherit;font-weight:700;cursor:pointer;
}
#timeHelperModal .apply-time{margin:0 18px 18px;padding:12px;width:calc(100% - 36px)}

@media (max-width:720px){
  .birth-engine .lp-hd-grid2{grid-template-columns:1fr}
  .birth-engine .lp-hd-place{grid-template-columns:auto 1fr}
  .birth-engine .lp-hd-place-change{grid-column:1/-1}
  #timeHelperModal .assistant-modal{
    left:50%;top:auto;bottom:0;transform:translateX(-50%);
    width:100%;max-height:94vh;border-radius:25px 25px 0 0;
  }
}
