/* ═══════════════════════════════════════════════════════════════════
   LS DOMÓTICA — lead-capture.css
   ------------------------------------------------------------------
   Modal de captura de leads (cotizador → presupuesto / contacto).
   Prefijo: .lc-
   Se abre con window.openLeadCapture(payload).
═══════════════════════════════════════════════════════════════════ */

/* ─── Overlay ─────────────────────────────────────────────────── */
.lc-overlay {
  position: fixed;
  inset: 0;
  z-index: 4000;
  background: rgba(5, 7, 15, .82);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  opacity: 1;
  transition: opacity .22s ease;
}
.lc-overlay.hidden { display: none; }

/* ─── Dialog card ─────────────────────────────────────────────── */
.lc-dialog {
  position: relative;
  width: min(560px, 100%);
  max-height: 92vh;
  overflow-y: auto;
  background: linear-gradient(155deg, #0d1220 0%, #111827 100%);
  border: 1px solid rgba(0, 149, 255, .2);
  border-radius: 20px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, .65),
              0 0 0 1px rgba(0, 149, 255, .06) inset;
  animation: lc-pop-in .36s cubic-bezier(.16, 1, .3, 1);
}
@keyframes lc-pop-in {
  from { opacity: 0; transform: scale(.96) translateY(12px); }
  to   { opacity: 1; transform: scale(1)   translateY(0); }
}

/* ─── Header ─────────────────────────────────────────────────── */
.lc-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 28px 0;
}
.lc-header-text h2 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 4px;
}
.lc-header-text p {
  font-size: .9rem;
  color: rgba(220, 228, 255, .58);
  margin: 0;
}
.lc-close {
  flex-shrink: 0;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .05);
  color: #eef2ff;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  transition: background .18s;
}
.lc-close:hover { background: rgba(255, 255, 255, .1); }

/* ─── States ─────────────────────────────────────────────────── */
.lc-state { padding: 20px 28px 28px; }
.lc-state.hidden { display: none; }

/* ─── Summary box ─────────────────────────────────────────────── */
.lc-summary {
  background: rgba(0, 149, 255, .06);
  border: 1px solid rgba(0, 149, 255, .15);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 18px;
  font-size: .88rem;
}
.lc-sum-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-weight: 600;
  color: #eef2ff;
}
.lc-sum-mode-badge {
  display: inline-block;
  padding: 2px 10px;
  background: rgba(0, 149, 255, .2);
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #7dd3fc;
}
.lc-sum-mode-pro { background: rgba(245, 158, 11, .2); color: #fcd34d; }

.lc-sum-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .05);
}
.lc-sum-row:last-of-type { border-bottom: none; }
.lc-sum-key {
  color: rgba(220, 228, 255, .55);
  flex-shrink: 0;
}
.lc-sum-val {
  color: #eef2ff;
  text-align: right;
}
.lc-sum-total {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  font-weight: 700;
}
.lc-sum-total .lc-sum-val {
  color: #0095ff;
  font-size: 1.1rem;
}
.lc-sum-row-list { align-items: flex-start; }
.lc-sum-list {
  list-style: disc;
  padding-left: 16px;
  margin: 0;
  color: #eef2ff;
  font-size: .86rem;
}
.lc-sum-note {
  margin: 8px 0 0;
  font-size: .78rem;
  color: rgba(220, 228, 255, .42);
  font-style: italic;
}

/* ─── Form ────────────────────────────────────────────────────── */
.lc-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.lc-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.lc-label {
  font-size: .82rem;
  font-weight: 600;
  color: rgba(220, 228, 255, .78);
}
.lc-input,
.lc-textarea {
  padding: 11px 13px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 10px;
  color: #eef2ff;
  font: inherit;
  font-size: .93rem;
  outline: none;
  width: 100%;
  transition: border-color .18s, background .18s;
}
.lc-input::placeholder, .lc-textarea::placeholder { color: rgba(220, 228, 255, .3); }
.lc-input:focus, .lc-textarea:focus {
  border-color: #0095ff;
  background: rgba(0, 149, 255, .06);
}
.lc-input.error, .lc-textarea.error { border-color: #ef4444; }

.lc-textarea { resize: vertical; min-height: 80px; }

.lc-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.lc-err {
  font-size: .8rem;
  color: #fca5a5;
  margin-top: 2px;
}

/* Consent checkbox */
.lc-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: .86rem;
  color: rgba(220, 228, 255, .72);
  cursor: pointer;
  line-height: 1.4;
}
.lc-consent input[type="checkbox"] {
  width: 16px; height: 16px;
  margin-top: 2px;
  accent-color: #0095ff;
  flex-shrink: 0;
  cursor: pointer;
}

/* Upload progress */
.lc-upload-state {
  background: rgba(0, 149, 255, .06);
  border: 1px solid rgba(0, 149, 255, .15);
  border-radius: 10px;
  padding: 12px 14px;
}
.lc-upload-bar {
  height: 6px;
  background: rgba(255, 255, 255, .08);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 6px;
}
.lc-upload-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #0095ff, #00d4ff);
  border-radius: 999px;
  transition: width .3s ease;
  width: 0%;
}
.lc-upload-text {
  font-size: .82rem;
  color: rgba(220, 228, 255, .65);
}

/* Submit button */
.lc-submit {
  position: relative;
  width: 100%;
  padding: 14px;
  font-size: 1rem;
  margin-top: 4px;
}
.lc-submit-spinner {
  display: none;
  position: absolute;
  width: 18px; height: 18px;
  border: 2px solid rgba(255, 255, 255, .3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: lc-spin .7s linear infinite;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
}
@keyframes lc-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
.lc-submit.loading .lc-submit-label { opacity: 0; }
.lc-submit.loading .lc-submit-arrow { opacity: 0; }
.lc-submit.loading .lc-submit-spinner { display: block; }

.lc-privacy {
  font-size: .76rem;
  color: rgba(220, 228, 255, .35);
  text-align: center;
  margin: 0;
}

/* ─── Success state ─────────────────────────────────────────── */
.lc-success {
  text-align: center;
  padding: 20px 0;
}
.lc-success-ico {
  margin-bottom: 16px;
}
.lc-check-bg   { stroke: rgba(34, 197, 94, .35); }
.lc-check-mark { stroke: #22c55e; stroke-dasharray: 60; stroke-dashoffset: 60; animation: lc-check .5s .2s ease forwards; }
@keyframes lc-check { to { stroke-dashoffset: 0; } }

.lc-success h3 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}
.lc-success p {
  font-size: .95rem;
  color: rgba(220, 228, 255, .65);
  margin-bottom: 20px;
}
.lc-success-summary {
  text-align: left;
  background: rgba(255, 255, 255, .04);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: .88rem;
}
.lc-success-summary .lc-sum-row { padding: 5px 0; }

.lc-success-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ─── Share box ──────────────────────────────────────────── */
.lc-share-box {
  background: rgba(0, 149, 255, 0.06);
  border: 1px solid rgba(0, 149, 255, 0.25);
  border-radius: 10px;
  padding: 14px 16px;
  margin: 4px 0 6px;
  text-align: left;
}
.lc-share-label {
  font-size: 0.75rem;
  font-weight: 700;
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--accent, #0095ff);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 8px;
}
.lc-share-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.lc-share-input {
  flex: 1;
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #e2e8f0;
  font-size: 0.8rem;
  font-family: monospace;
  min-width: 0;
  outline: none;
}
.lc-share-copy {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px;
  background: var(--accent, #0095ff);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
  flex-shrink: 0;
}
.lc-share-copy:hover { background: #007fd6; }
.lc-share-copy.copied { background: #22c55e; }
.lc-share-copy:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}
.lc-share-copy:disabled:hover { background: var(--accent, #0095ff); }
.lc-share-note {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.45);
  margin: 8px 0 0;
  line-height: 1.4;
}

/* ─── Error state ─────────────────────────────────────────── */
.lc-error {
  text-align: center;
  padding: 20px 0;
}
.lc-error-ico { font-size: 2.5rem; margin-bottom: 12px; }
.lc-error h3 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.3rem; font-weight: 700; color: #fff; margin-bottom: 8px;
}
.lc-error p {
  font-size: .9rem; color: #fca5a5; margin-bottom: 20px;
}
.lc-error-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 520px) {
  .lc-header { padding: 22px 20px 0; }
  .lc-state  { padding: 16px 20px 24px; }
  .lc-row    { grid-template-columns: 1fr; }
  .lc-dialog { border-radius: 16px; }
}

/* ─── Reduced motion ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .lc-dialog, .lc-check-mark, .lc-submit-spinner { animation: none !important; }
}
