/* Lead widget adapted from 6201.ru chat panel (style.css .chat-toggle / .chat-panel).
   Colors and type follow LegalDent: Inter, #2176ff, frosted white cards. */
html.ld-admin .ld-lead { display: none !important; }

.ld-lead { font-family: Inter, Arial, sans-serif; color: #172d49; }
.ld-lead__toggle {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 35;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #2176ff;
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(33, 118, 255, .32);
  transition: transform .2s ease, background .2s ease;
  overflow: hidden;
}
.ld-lead__toggle:hover { background: #1565e7; transform: translateY(-2px); }
.ld-lead__toggle svg { display: block; transform-origin: center; animation: ld-lead-icon 1.8s ease-in-out infinite; }
@keyframes ld-lead-icon { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.28); } }

.ld-lead__panel {
  position: fixed;
  left: 18px;
  bottom: 82px;
  z-index: 35;
  width: min(320px, calc(100vw - 32px));
  overflow: visible;
  padding: 14px 14px 12px;
  border: 1px solid #dae5f2;
  border-radius: 20px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 22px 50px rgba(23, 45, 73, .14);
  backdrop-filter: blur(16px);
}
.ld-lead__panel[hidden],
.ld-lead__reply[hidden],
.ld-lead__form[hidden] { display: none; }
.ld-lead__panel:not([hidden]) { animation: ld-lead-in .34s cubic-bezier(.16, 1, .3, 1); }
@keyframes ld-lead-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.ld-lead__panel b { display: block; margin: 0 0 2px; font-size: 15px; font-weight: 650; letter-spacing: -.03em; }
.ld-lead__intro { margin: 0 0 10px; color: #70849d; font-size: 12px; line-height: 1.4; }
.ld-lead__form label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin: 0 0 6px;
  font-size: 11px;
  color: #59718d;
}
.ld-lead__form input,
.ld-lead__form textarea {
  width: 100%;
  box-sizing: border-box;
  border: 0;
  border-radius: 10px;
  background: #f3f7fb;
  padding: 8px 10px;
  box-shadow: none;
  color: #172d49;
  font: inherit;
  font-size: 16px;
}
.ld-lead__form textarea { min-height: 64px; resize: none; }
.ld-lead__form input:focus,
.ld-lead__form textarea:focus {
  outline: none;
  background: #eaf1f8;
}
.ld-lead__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  margin: 0;
  padding: 0;
}
.ld-lead__consent-block { display: grid; gap: 4px; margin: 2px 0 8px; }
.ld-lead__consent {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: #59718d;
}
.ld-lead__consent input {
  width: 16px;
  height: 16px;
  min-width: 16px;
  margin: 1px 0 0;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  box-shadow: none;
  accent-color: #2176ff;
  flex: none;
}
.ld-lead__consent a { color: #2176ff; text-decoration: underline; }
.ld-lead__note { margin: 0; font-size: 10px; line-height: 1.3; color: #8095ad; }
.ld-lead__send {
  align-self: flex-start;
  width: auto;
  display: inline-flex;
  margin-top: 2px;
  border: 0;
  border-radius: 999px;
  background: #2176ff;
  color: #fff;
  font: 600 13px/1 Inter, Arial, sans-serif;
  padding: 9px 14px;
  cursor: pointer;
}
.ld-lead__send:hover { background: #1565e7; }
.ld-lead__send:disabled { opacity: .65; cursor: default; }
.ld-lead__reply { margin: 0; font-size: 15px; line-height: 1.45; }
.ld-lead__error { margin: 8px 0 0; color: #b42318; font-size: 12px; line-height: 1.35; }

.ld-fix-wrap { margin: 36px 0 8px; }
.ld-fix { box-shadow: 0 8px 18px #2176ff22; }

@media (max-width: 740px) {
  .ld-lead__toggle { left: 12px; bottom: 12px; }
  .ld-lead__panel { left: 12px; bottom: 74px; }
}
@media (prefers-reduced-motion: reduce) {
  .ld-lead__panel:not([hidden]) { animation: none; }
  .ld-lead__toggle,
  .ld-lead__toggle svg { transition: none; animation: none; }
}
@media print {
  .ld-lead,
  .ld-fix-wrap { display: none !important; }
}
