/* medir-casos.css — 15/10 (Loom 1 de Agus, 14/10): el dibujo técnico de cada tipo de ventana en el detalle de «¿Cómo es tu ventana?».
   El dibujo lo arma RSMedirFig (home-qa.js) con las cotas de data/como-medir-casos.json. Tinta = marco y lo que se mide;
   punteado = la cortina; rojo = la medida final de la cortina con lo que se suma o se resta. Colores de la página: de noche cambian solos. */
.md-dlg{ --mf-r:var(--rojo, #C63A21); }
html.noche .md-dlg{ --mf-r:#F0785A; }

.md-dlg-ico:empty{ display:none; }
.md-dlg h3{ padding-right:44px; text-wrap:balance; }
.md-dlg-fig{ width:100%; margin:2px 0 0; color:var(--tx); }
.md-dlg-fig:empty{ display:none; }
.md-dlg-fig .mf{ display:block; width:100%; height:auto; max-height:min(230px, 30dvh); overflow:visible; }

.mf .mf-m{ fill:var(--s1); stroke:currentColor; stroke-width:1.6; }
.mf .mf-v{ fill:none; stroke:currentColor; stroke-width:1; opacity:.4; }
.mf .mf-l{ stroke:currentColor; stroke-width:1.4; }
.mf .mf-sill{ stroke:currentColor; stroke-width:3; stroke-linecap:round; opacity:.45; }
.mf .mf-piso{ stroke:currentColor; stroke-width:1.4; opacity:.4; }
.mf .mf-p{ fill:var(--s2); stroke:currentColor; stroke-width:1; stroke-opacity:.45; }
.mf .mf-hueco{ fill:var(--bg); }
.mf .mf-vano{ fill:var(--s1); }
.mf .mf-muro{ stroke:var(--s2); stroke-width:9; }
.mf .mf-techo{ stroke:currentColor; stroke-width:2.4; opacity:.45; }
.mf .mf-pano{ stroke:currentColor; stroke-width:6; stroke-linecap:square; }
.mf .mf-pano2{ stroke:var(--s1); stroke-width:2.4; }
.mf .mf-man{ fill:none; stroke:currentColor; stroke-width:3; stroke-linecap:round; stroke-linejoin:round; }
.mf .mf-c{ fill:none; stroke:currentColor; stroke-width:1.3; stroke-dasharray:4 3; opacity:.75; }
.mf .mf-cl{ stroke:currentColor; stroke-width:2; stroke-dasharray:4 3; opacity:.8; }
.mf .mf-riel{ stroke:currentColor; stroke-width:3; stroke-linecap:round; }
.mf .mf-fin{ fill:currentColor; }
.mf .mf-sop{ fill:currentColor; opacity:.75; }
.mf .mf-ref{ stroke:currentColor; stroke-width:.8; opacity:.35; }
.mf .mf-i{ stroke:currentColor; stroke-width:1.1; opacity:.85; }
.mf .mf-r{ stroke:var(--mf-r); stroke-width:1.7; stroke-linecap:round; }
.mf text{ font:700 12px/1 var(--texto, system-ui, sans-serif); paint-order:stroke; stroke:var(--bg); stroke-width:4px; stroke-linejoin:round; }
.mf .mf-t{ fill:var(--mf-r); }
.mf .mf-ti{ fill:var(--tx); }

/* la cota se dibuja (la cinta que se estira) y después aparece su número; una vez, al abrir el detalle */
@media (prefers-reduced-motion:no-preference){
  .mf .mf-a line[pathLength]{ stroke-dasharray:1; stroke-dashoffset:1; animation:mf-traza .55s cubic-bezier(.2,.7,.2,1) forwards; animation-delay:calc(.15s + var(--i, 0) * .14s); }
  .mf .mf-a text, .mf .mf-a .mf-ref{ opacity:0; animation:mf-num .3s ease-out forwards; animation-delay:calc(.45s + var(--i, 0) * .14s); }
  .mf .mf-a .mf-ref{ animation-delay:calc(.1s + var(--i, 0) * .14s); }
}
@keyframes mf-traza{ to{ stroke-dashoffset:0; } }
@keyframes mf-num{ to{ opacity:1; } }
@keyframes mf-num-ref{ to{ opacity:.35; } }
@media (prefers-reduced-motion:no-preference){ .mf .mf-a .mf-ref{ animation-name:mf-num-ref; } }

/* «¿Dudas? Mandanos una foto» queda siempre a la vista: si el detalle es más alto que la pantalla, el botón se queda abajo */
.md-dlg .md-dlg-wa{ position:sticky; bottom:12px; z-index:1; box-shadow:0 12px 0 0 var(--bg), 0 -14px 18px 2px var(--bg); }

/* 15/10 (reunión con el equipo): pieza única de «Cómo medir» (medir-guia.js). Miniaturas con título por tipo de ventana debajo de la
   cortina elegida; el paso a paso del caso tocado ocupa el lugar de la animación. Sin cajas dentro de cajas: la miniatura es el único
   fondo; el paso a paso va suelto sobre la página. */
.mg-casos, .mg-panel{ --mf-r:var(--rojo, #C63A21); }
html.noche .mg-casos, html.noche .mg-panel{ --mf-r:#F0785A; }
html.pag-producto .mg-casos, html.pag-producto .mg-panel{ --tx:var(--tinta); --bg:var(--papel); --s1:color-mix(in srgb, var(--tinta) 5%, var(--papel)); --s2:color-mix(in srgb, var(--tinta) 11%, var(--papel)); }
.mg-casos{ display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:8px; margin:14px 0 16px; color:var(--tx); }
.mg-casos:empty{ display:none; }
.mg-c{ display:flex; flex-direction:column; align-items:center; justify-content:flex-start; gap:6px; min-height:96px; padding:12px 6px 10px; border:1.5px solid transparent; border-radius:12px; background:var(--s1); color:inherit; font:600 13px/1.25 var(--texto, system-ui, sans-serif); text-align:center; cursor:pointer; transition:border-color .2s, background-color .2s; -webkit-tap-highlight-color:transparent; }
.mg-c svg{ flex:none; width:36px; height:36px; opacity:.85; }
.mg-c span{ text-wrap:balance; }
.mg-c[aria-pressed="true"]{ border-color:currentColor; background:var(--bg); }
.mg-c[aria-pressed="true"] svg{ opacity:1; }
@media (hover:hover){ .mg-c:hover{ border-color:color-mix(in srgb, currentColor 35%, transparent); } }
.mg-c:focus-visible{ outline:2px solid var(--mf-r); outline-offset:2px; }
@media (min-width:700px){ .mg-casos{ grid-template-columns:repeat(6, minmax(0, 1fr)); } }

.mg-panel{ color:var(--tx); scroll-margin-top:84px; }
.mg-panel[hidden]{ display:none; }
.mg-t{ margin:0 0 6px; font:700 20px/1.25 var(--texto, system-ui, sans-serif); text-wrap:balance; }
.mg-t span{ font-weight:500; opacity:.6; }
.mg-fig{ width:100%; margin:0 0 6px; }
.mg-fig .mf{ display:block; width:100%; height:auto; max-height:min(260px, 34dvh); overflow:visible; }
.mg-pasos{ margin:0; padding:0; list-style:none; counter-reset:mg; }
.mg-pasos li{ position:relative; margin:0 0 10px; padding-left:34px; font-size:16px; line-height:1.45; counter-increment:mg; }
.mg-pasos li::before{ content:counter(mg); position:absolute; left:0; top:0; width:24px; height:24px; border-radius:50%; background:var(--tx); color:var(--bg); font:700 13px/24px var(--texto, system-ui, sans-serif); text-align:center; }
.mg-ojo{ margin:4px 0 0; padding:0 0 0 34px; list-style:none; font-size:14px; line-height:1.45; opacity:.75; }
.mg-ojo li{ margin:0 0 6px; }
/* 19/10 (video de Agus): dos botones del mismo alto, uno al lado del otro también en 360 px. Guardar en WhatsApp lleno (el que más
   se usa), Descargar en PDF en contorno */
.mg-acc{ display:flex; flex-wrap:wrap; gap:8px; margin:16px 0 0; }
.mg-wa, .mg-pdf{ flex:1 1 auto; display:inline-flex; align-items:center; justify-content:center; gap:7px; height:46px; padding:0 14px; border:1.5px solid var(--tx, currentColor); border-radius:12px; font:600 15px/1 var(--texto, system-ui, sans-serif); text-decoration:none; white-space:nowrap; transition:transform .2s, background .2s, color .2s; }
.mg-wa{ background:transparent; color:inherit; }
.mg-pdf{ background:transparent; color:inherit; }
.mg-wa svg, .mg-pdf svg{ flex:none; }
.mg-wa:active, .mg-pdf:active{ transform:scale(.98); }
.mg-wa:focus-visible, .mg-pdf:focus-visible{ outline:2px solid var(--tx, currentColor); outline-offset:3px; }
@media (hover:hover){ .mg-pdf:hover{ background:var(--s1, rgba(0,0,0,.05)); } .mg-wa:hover{ background:var(--s1, rgba(0,0,0,.05)); } }
@media (max-width:439px){ .mg-acc{ flex-wrap:nowrap; } .mg-wa, .mg-pdf{ padding:0 10px; font-size:14px; } .mg-wa svg, .mg-pdf svg{ display:none; } }
@media (min-width:700px){ .mg-wa, .mg-pdf{ flex:0 0 auto; padding:0 20px; } }
/* 19/10: cierre de «Cómo medir» (home y ficha): título propio arriba de la línea */
.md-wa .md-wa-t{ display:block; margin:0 0 4px; color:var(--tx); font-size:18px; font-weight:700; line-height:1.3; }
/* 16/10: selección unificada (ver sitio.css): una línea de 1,5 px en tinta sobre el borde, radio 10 px, sin cambiar el fondo */
.mg-c{ border-radius:10px; }
.mg-c[aria-pressed="true"], .mg-c[aria-pressed="true"]:hover{ border-color:transparent; background:var(--s1); outline:1.5px solid var(--tx); outline-offset:-1.5px; }
/* impresión / PDF del instructivo de un caso: sólo el paso a paso (título, dibujo con cotas, pasos y avisos), con la marca arriba */
@media print{
  body *{ visibility:hidden !important; }
  .mg-panel, .mg-panel *{ visibility:visible !important; }
  .mg-panel{ position:absolute !important; left:0; top:0; width:100% !important; max-width:none !important; padding:24px 28px; color:#171412 !important; }
  .mg-panel::before{ content:"Roller Show · rollershow.com.ar"; display:block; margin:0 0 14px; font:700 13px/1 system-ui, sans-serif; letter-spacing:.04em; color:#171412; visibility:visible; }
  .mg-acc{ display:none !important; }
  .mg-fig .mf{ max-height:none !important; }
  .mf *{ animation:none !important; opacity:1 !important; stroke-dashoffset:0 !important; }
  .mg-pasos li::before{ -webkit-print-color-adjust:exact; print-color-adjust:exact; }
}

/* 20/10: video del caso (vertical 9:16) en lugar del dibujo; el dibujo se ve solo al imprimir/PDF */
.mg-con-video .mf{ display:none; }
.mg-vid{ display:block; width:auto; max-width:100%; height:min(72dvh, 620px); aspect-ratio:9/16; margin:0; border-radius:18px; background:#d9c3a0; object-fit:cover; }
@media print{ .mg-vid{ display:none !important; } .mg-con-video .mf{ display:block !important; } }
