/* CARTO — Lead modal (форма заявки → Telegram) */

.lead-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.lead-modal[hidden] { display: none; }

.lead-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 42, 61, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: lead-fade-in 0.2s ease;
}

.lead-modal-dialog {
  position: relative;
  background: #fff;
  border-radius: 18px;
  padding: 32px 32px 28px;
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(15, 42, 61, 0.30);
  animation: lead-slide-up 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes lead-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes lead-slide-up {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.lead-modal-x {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0;
  background: var(--mist, #f4f7f5);
  color: var(--midnight, #0f2a3d);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, transform 0.15s;
}
.lead-modal-x:hover {
  background: var(--stone, #e4e8e6);
  transform: rotate(90deg);
}

.lead-modal-title {
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 24px;
  line-height: 1.2;
  color: var(--midnight, #0f2a3d);
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}
.lead-modal-sub {
  font-size: 14px;
  line-height: 1.5;
  color: var(--grey, #5c6370);
  margin: 0 0 20px;
}

.lead-modal-car {
  background: var(--mist, #f4f7f5);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--midnight, #0f2a3d);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.4;
}
.lead-modal-car strong {
  font-weight: 700;
}

.lead-modal-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lead-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.lead-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--midnight, #0f2a3d);
}
.lead-req {
  color: #d0282e;
}
.lead-field input,
.lead-field textarea {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 15px;
  padding: 11px 14px;
  border: 1.5px solid var(--stone, #e4e8e6);
  border-radius: 10px;
  background: #fff;
  color: var(--midnight, #0f2a3d);
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
  box-sizing: border-box;
  outline: 0;
}
.lead-field input:focus,
.lead-field textarea:focus {
  border-color: var(--accent, #00c896);
  box-shadow: 0 0 0 3px rgba(0, 200, 150, 0.15);
}
.lead-field textarea {
  resize: vertical;
  min-height: 70px;
  max-height: 200px;
  line-height: 1.5;
}

.lead-submit {
  margin-top: 6px;
  width: 100%;
  justify-content: center;
}
.lead-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.lead-disclaimer {
  font-size: 12px;
  color: var(--grey, #5c6370);
  text-align: center;
  margin: 8px 0 0;
  line-height: 1.45;
}
.lead-disclaimer a {
  color: var(--midnight, #0f2a3d);
  text-decoration: underline;
}

/* Success state */
.lead-modal-success {
  text-align: center;
  padding: 20px 0;
}
.lead-success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent, #00c896);
  color: #fff;
  font-size: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  animation: lead-pop 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes lead-pop {
  0% { opacity: 0; transform: scale(0.4); }
  100% { opacity: 1; transform: scale(1); }
}
.lead-modal-success h3 {
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 20px;
  margin: 0 0 8px;
  color: var(--midnight, #0f2a3d);
}
.lead-modal-success p {
  color: var(--grey, #5c6370);
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 18px;
}

/* Body lock when modal open */
body.lead-modal-open {
  overflow: hidden;
}

/* Mobile */
@media (max-width: 600px) {
  .lead-modal {
    padding: 0;
    align-items: flex-end;
  }
  .lead-modal-dialog {
    border-radius: 16px 16px 0 0;
    max-height: 92vh;
    padding: 24px 20px 20px;
    animation: lead-slide-up-mobile 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }
  @keyframes lead-slide-up-mobile {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }
  .lead-modal-title { font-size: 20px; }
}

/* Чекбоксы согласия */
.lead-consent {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 4px 0;
  cursor: pointer;
  font-size: 12px;
  line-height: 1.45;
  color: var(--grey, #5c6370);
}
.lead-consent input[type="checkbox"] {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  cursor: pointer;
  accent-color: var(--accent, #00c896);
}
.lead-consent span {
  flex: 1;
}
.lead-consent a {
  color: var(--midnight, #0f2a3d);
  text-decoration: underline;
  text-decoration-color: rgba(15, 42, 61, 0.3);
  text-underline-offset: 2px;
}
.lead-consent a:hover {
  text-decoration-color: var(--accent, #00c896);
}
