/* ============================================================
   Cotizador — panel "tech" oscuro (misma línea gráfica que el
   panel animado del home: borde cónico dorado, grid de fondo,
   vidrio esmerilado, pulso "en línea").
   ============================================================ */

.ms-shell{ position:relative; border-radius:var(--radius-l); padding:3px; isolation:isolate; }
.ms-shell::before{
  content:''; position:absolute; inset:-2px; z-index:0; border-radius:inherit;
  background:conic-gradient(from 0deg, rgba(245,172,32,0) 0deg, var(--ms-gold) 40deg, rgba(245,172,32,0) 110deg, rgba(245,172,32,0) 250deg, var(--ms-ember) 300deg, rgba(245,172,32,0) 340deg);
  animation:msSpin 9s linear infinite;
}

.ms-wrap{
  position:relative; z-index:1; background:var(--ms-black-soft); border-radius:calc(var(--radius-l) - 3px);
  padding:40px; overflow:hidden; box-shadow:var(--shadow-2); color:#fff;
}
.ms-wrap::before{
  content:''; position:absolute; inset:0; z-index:0; pointer-events:none;
  background:
    radial-gradient(520px 280px at 100% 0%, rgba(245,172,32,.14), transparent 60%),
    radial-gradient(380px 240px at 0% 100%, rgba(47,143,70,.12), transparent 60%);
}
.ms-wrap .cell-grid{ opacity:.5; }
.ms-wrap > *{ position:relative; z-index:1; }

.ms-head-row{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:24px; flex-wrap:wrap; }
.ms-live{ display:inline-flex; align-items:center; gap:8px; font-size:11px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:#8fe39b; font-family:var(--f-display); }
.ms-live i{ width:7px; height:7px; border-radius:50%; background:#3ddc63; box-shadow:0 0 0 0 rgba(61,220,99,.6); animation:msPulse 1.8s ease-out infinite; }
@keyframes msPulse{ 0%{ box-shadow:0 0 0 0 rgba(61,220,99,.55);} 70%{ box-shadow:0 0 0 8px rgba(61,220,99,0);} 100%{ box-shadow:0 0 0 0 rgba(61,220,99,0);} }
.ms-step-counter{ font-family:var(--f-display); font-size:11px; font-weight:700; letter-spacing:.06em; color:#9aa0aa; }
.ms-step-counter b{ color:var(--ms-gold); }

.ms-progress{ display:flex; gap:6px; margin-bottom:30px; }
.ms-progress i{ flex:1; height:4px; border-radius:999px; background:rgba(255,255,255,.12); position:relative; overflow:hidden; }
.ms-progress i::after{
  content:''; position:absolute; inset:0; background:linear-gradient(90deg, var(--ms-gold), var(--ms-gold-2));
  transform:scaleX(0); transform-origin:left; transition:transform .5s cubic-bezier(.2,.8,.2,1);
}
.ms-progress i.done::after{ transform:scaleX(1); }

.ms-step{ display:none; }
.ms-step.active{ display:block; animation:msStepIn .5s cubic-bezier(.2,.8,.2,1); }
@keyframes msStepIn{ from{ opacity:0; transform:translateX(14px);} to{ opacity:1; transform:translateX(0);} }

.ms-step h2{ font-size:clamp(21px,2.6vw,27px); color:#fff; }
.ms-sub{ color:#9aa0aa; font-size:14.5px; margin-top:8px; }

/* Paso 0: Hogar / Comercial */
.ms-cards.pick-two{ display:grid; grid-template-columns:1fr 1fr; gap:18px; margin-top:26px; }
.pick-card{ position:relative; cursor:pointer; border-radius:16px; overflow:hidden; border:2px solid rgba(255,255,255,.12); background:rgba(255,255,255,.03); transition:border-color .25s, transform .25s, box-shadow .25s; }
.pick-card:hover{ transform:translateY(-4px); }
.pick-card.active{ border-color:var(--ms-gold); box-shadow:0 0 0 4px rgba(245,172,32,.16), 0 20px 40px -20px rgba(245,172,32,.5); }
.pick-card input{ position:absolute; opacity:0; }
.pick-card .card-body .img{ height:150px; background-size:cover; background-position:center; position:relative; }
.pick-card .card-body .img::after{ content:''; position:absolute; inset:0; background:linear-gradient(180deg, rgba(12,13,15,0) 40%, rgba(12,13,15,.55)); }
.pick-card .title{ padding:14px 16px; font-family:var(--f-display); font-weight:700; font-size:15.5px; color:#fff; display:flex; align-items:center; justify-content:space-between; }
.ms-check{ position:absolute; top:12px; right:12px; width:26px; height:26px; border-radius:50%; background:rgba(12,13,15,.5); border:2px solid rgba(255,255,255,.4); z-index:2; transition:.2s; }
.pick-card.active .ms-check{ background:var(--ms-gold); border-color:var(--ms-gold); }
.pick-card.active .ms-check::after{ content:'✓'; color:var(--ms-black); font-size:14px; font-weight:900; display:flex; align-items:center; justify-content:center; height:100%; }

/* Paso 1: tipo de techo — con icono ilustrado */
.roof-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:14px; margin-top:26px; }
.roof-card{ cursor:pointer; border:2px solid rgba(255,255,255,.12); background:rgba(255,255,255,.03); border-radius:14px; overflow:hidden; transition:border-color .25s, transform .25s, background .25s; text-align:center; padding:18px 10px 14px; }
.roof-card:hover{ transform:translateY(-3px); background:rgba(255,255,255,.06); }
.roof-card.active{ border-color:var(--ms-gold); background:rgba(245,172,32,.08); box-shadow:0 0 0 4px rgba(245,172,32,.14); }
.roof-card .ic{ width:46px; height:46px; margin:0 auto 10px; border-radius:12px; background:rgba(255,255,255,.06); display:flex; align-items:center; justify-content:center; color:#c7cad1; transition:.25s; }
.roof-card.active .ic{ background:var(--ms-gold); color:var(--ms-black); }
.roof-card .caption{ font-size:12.5px; font-weight:700; color:#e5e7ea; }

/* Paso 2: mapa */
.ms-map-card .ms-map-head{ display:flex; justify-content:space-between; align-items:flex-start; gap:12px; }
.ms-help{ width:28px; height:28px; border-radius:50%; border:1.5px solid rgba(255,255,255,.2); background:transparent; font-weight:800; cursor:pointer; color:#c7cad1; flex:none; }
.ms-map{ height:280px; border-radius:16px; margin-top:18px; border:1px solid rgba(255,255,255,.14); filter:saturate(.85) brightness(.96); }
.ms-map-controls{ display:flex; justify-content:space-between; align-items:center; gap:14px; margin-top:14px; flex-wrap:wrap; }
.ms-input-group{ display:flex; gap:8px; flex:1; min-width:240px; }
.ms-input{ padding:12px 14px; border-radius:12px; border:1.5px solid rgba(255,255,255,.14); font-size:14px; background:rgba(255,255,255,.05); color:#fff; flex:1; }
.ms-input::placeholder{ color:#7d828c; }
.ms-input:focus{ outline:none; border-color:var(--ms-gold); background:rgba(255,255,255,.08); }
select.ms-input option{ background:#fff; color:#14171a; }
.ms-btn.ms-search{ background:var(--ms-gold); color:var(--ms-black); padding:12px 18px; border-radius:12px; border:none; font-weight:700; cursor:pointer; }
.ms-no-loc{ display:flex; align-items:center; gap:8px; font-size:13px; color:#9aa0aa; }

/* Paso 3: factura */
.ms-grid2{ display:grid; grid-template-columns:1fr 1fr; gap:16px; margin-top:24px; }
.ms-field label{ display:block; font-size:13px; font-weight:700; margin-bottom:7px; color:#e5e7ea; }
.ms-field label b{ font-weight:800; color:#fff; }
.ms-field .opt{ font-weight:500; color:#9aa0aa; }
.ms-howto-wrap{ margin-top:20px; display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.ms-btn.ms-black{ background:rgba(255,255,255,.06); border:1.5px solid rgba(255,255,255,.16); color:#fff; border-radius:999px; padding:12px 20px; font-weight:700; cursor:pointer; }
.ms-btn.ms-black:hover{ background:rgba(255,255,255,.1); }

.ms-actions{ display:flex; justify-content:space-between; gap:14px; margin-top:30px; }
.ms-btn{ font-family:var(--f-display); font-weight:600; font-size:14px; padding:13px 22px; border-radius:999px; border:1.5px solid rgba(255,255,255,.18); background:transparent; color:#fff; cursor:pointer; transition:.2s; }
.ms-btn:hover{ border-color:#fff; }
.ms-btn.ms-primary{ background:var(--ms-gold); border-color:var(--ms-gold); color:var(--ms-black); box-shadow:0 10px 26px -12px rgba(245,172,32,.6); }
.ms-btn.ms-primary:hover{ background:var(--ms-gold-2); transform:translateY(-1px); }
.ms-btn:disabled{ opacity:.4; cursor:not-allowed; }

/* Paso 4: resultados — tarjetas con icono + conteo animado */
.ms-result{ margin-top:26px; display:grid; gap:10px; }
.ms-row{ display:flex; align-items:center; gap:14px; padding:16px 18px; border-radius:14px; background:rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.08); }
.ms-row .ic{ width:42px; height:42px; border-radius:11px; background:rgba(255,255,255,.06); color:var(--ms-gold); display:flex; align-items:center; justify-content:center; flex:none; }
.ms-row-main{ background:linear-gradient(135deg, rgba(245,172,32,.16), rgba(255,122,26,.08)); border-color:rgba(245,172,32,.35); }
.ms-row-main .ic{ background:var(--ms-gold); color:var(--ms-black); }
.ms-row-text{ flex:1; min-width:0; }
.ms-label{ font-size:12.5px; font-weight:700; color:#9aa0aa; text-transform:uppercase; letter-spacing:.04em; }
.ms-value{ font-family:var(--f-display); font-weight:800; font-size:20px; color:#fff; margin-top:2px; }
.ms-row-main .ms-value{ font-size:26px; color:var(--ms-gold); }
.ms-note{ padding:16px 18px; background:rgba(255,255,255,.03); border-radius:14px; margin-top:14px; border:1px solid rgba(255,255,255,.06); }
.ms-note ul{ padding-left:18px; list-style:disc; }
.ms-note li{ font-size:12.5px; color:#9aa0aa; line-height:1.6; margin-bottom:6px; }

/* Paso 5: lead */
.ms-card{ margin-top:10px; }
.ms-title{ margin-bottom:18px; color:#fff; }
.ms-grid{ display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.ms-grid input{ width:100%; padding:13px 14px; border-radius:12px; border:1.5px solid rgba(255,255,255,.14); font-size:14.5px; background:rgba(255,255,255,.05); color:#fff; }
.ms-grid input::placeholder{ color:#7d828c; }
.ms-grid input:focus{ outline:none; border-color:var(--ms-gold); background:rgba(255,255,255,.08); }
.consent{ color:#b7bac0; }

.ms-note-comercial{ margin-top:10px; font-size:12px; color:#c7cad1; background:rgba(255,255,255,.04); border:1px dashed rgba(255,255,255,.18); border-radius:10px; padding:10px 12px; }

/* Paso 6: agradecimiento */
.ms-thanks{ text-align:center; padding:24px 0 6px; }
.ms-thanks .ic{ width:76px; height:76px; border-radius:50%; background:rgba(61,220,99,.12); color:#3ddc63; display:flex; align-items:center; justify-content:center; margin:0 auto 20px; }
.ms-thanks .ic svg path{ stroke-dasharray:30; stroke-dashoffset:30; animation:msDraw .6s ease forwards .15s; }
@keyframes msDraw{ to{ stroke-dashoffset:0; } }
.ms-thanks h2{ font-size:24px; color:#fff; }
.ms-thanks p{ color:#9aa0aa; margin-top:10px; }

/* Modal ayuda factura (se mantiene en tema claro por contraste) */
.ms-modal{ position:fixed; inset:0; background:rgba(12,13,15,.6); display:flex; align-items:center; justify-content:center; z-index:500; opacity:0; visibility:hidden; transition:.2s; padding:20px; }
.ms-modal.open{ opacity:1; visibility:visible; }
.ms-modal-card{ background:#fff; border-radius:var(--radius-l); max-width:520px; width:100%; overflow:hidden; }
.ms-modal-head{ display:flex; justify-content:space-between; align-items:center; padding:20px 22px; border-bottom:1px solid var(--ms-line); }
.ms-modal-head h3{ font-family:var(--f-display); font-size:16px; }
.ms-close{ width:32px; height:32px; border-radius:50%; border:1px solid var(--ms-line); background:#fff; cursor:pointer; font-size:16px; }
.ms-modal-body{ padding:22px; }
.ms-tip{ font-size:13.5px; color:var(--ms-ink-soft); line-height:1.6; margin-bottom:10px; }

@media (max-width: 720px){
  .ms-wrap{ padding:26px 20px; }
  .ms-cards.pick-two, .ms-grid2, .ms-grid{ grid-template-columns:1fr; }
  .roof-grid{ grid-template-columns:repeat(2,1fr); }
}

/* ============================================================
   Cotización descargable — el nodo #pdfQuote vive fuera de la
   pantalla (position:fixed; left:-99999px, inline en el HTML) para
   que html2canvas pueda renderizarlo con su estilo real sin que el
   usuario lo vea nunca en pantalla.
   ============================================================ */
.pq-btn-wrap{ text-align:center; margin-top:18px; }
.pq-download{
  display:inline-flex; align-items:center; gap:10px; margin-top:8px;
  background:transparent; border:1.5px solid rgba(255,255,255,.25); color:#fff;
  font-family:var(--f-display); font-weight:600; font-size:14px; padding:13px 24px; border-radius:999px; cursor:pointer; transition:.2s;
}
.pq-download:hover{ border-color:var(--ms-gold); color:var(--ms-gold); }
.pq-download:disabled{ opacity:.6; cursor:wait; }
