/* ===================================================================
   COMPONENT · DRAWER  (design system)
   -------------------------------------------------------------------
   Glass side panel that slides in from the right. Used when a card has
   a long secondary story to tell ("see the process") and expanding it
   in place would blow a hole in the grid beside it.

   Pairs with: components/drawer.js
   Theme tokens: --panel-bg --panel-border --panel-text --panel-text-soft
                 --blur --green --forest --sage --shadow-lg
   =================================================================== */

.drawer-root{position:fixed; inset:0; z-index:200; pointer-events:none}

/* scrim: darkens + slightly blurs the grid so the panel reads as "above" */
.drawer-scrim{position:absolute; inset:0; background:rgba(8,16,10,.52);
  -webkit-backdrop-filter:blur(2px); backdrop-filter:blur(2px);
  opacity:0; transition:opacity .32s ease}
.drawer-root.open .drawer-scrim{opacity:1}
.drawer-root.open{pointer-events:auto}

/* Rounded on the LEFT only — it is flush to the right edge, so this reads as a
   sheet lifted off the page. Square corners made it read as a raw slab.
   The shadow is thrown LEFTWARD (-30px 0) for the same reason: a downward
   shadow is invisible on a full-height panel. */
.drawer{position:absolute; top:0; right:0; height:100%; width:min(62vw,760px);
  display:flex; flex-direction:column; border-radius:22px 0 0 22px;
  background:var(--panel-bg); border:1px solid var(--panel-border); border-right:0;
  -webkit-backdrop-filter:var(--blur); backdrop-filter:var(--blur);
  box-shadow:-30px 0 70px rgba(10,20,14,.42);
  transform:translateX(100%); transition:transform .38s cubic-bezier(.4,0,.2,1)}
.drawer-root.open .drawer{transform:none}

/* ---- head ---- */
/* the header and footer get their own surface so they read as chrome and the
   scrolling content clearly belongs to the middle */
.drawer-head{flex:none; display:flex; align-items:center; gap:14px; padding:20px 24px 16px;
  border-bottom:1px solid var(--panel-border); border-radius:22px 0 0 0;
  background:rgba(255,255,255,.05)}
/* head-main tiene que estirarse: sin esto se encogía al ancho de la foto + el
   nombre y la X quedaba pegada al texto, en el medio de la cabecera. La X va
   siempre contra el borde derecho. */
.drawer-head-main{flex:1; min-width:0; display:flex; align-items:center; gap:14px}
.drawer-x{margin-left:auto}
.drawer-x{flex:none; width:36px; height:36px; display:grid; place-items:center; cursor:pointer;
  border-radius:50%; border:1px solid var(--panel-border); background:transparent;
  color:var(--panel-text-soft); transition:.16s}
.drawer-x:hover{background:var(--panel-soft); color:var(--panel-text)}
.drawer-x .ic{width:17px; height:17px}

/* ---- LA MARCA DE IDENTIDAD ----
   Misma caja para todos los drawers: foto de persona o icono de producto, pero
   el mismo cuadrado de 52 con radio 13. Antes el de competidores era de 44 y
   redondo-chico, asi que las dos cabeceras no arrancaban igual. */
.drawer-head .dmark .ic{width:23px; height:23px}

/* ---- LAS SECCIONES DEL CUERPO ----
   EL CUERPO DE UN DRAWER ES SIEMPRE UNA PILA DE SECCIONES IGUALES. El de
   empathy maps las tenia (`.estep`: fondo soft, borde, titulo con numero) y el
   de competidores no: campos sueltos uno abajo del otro, sin cabecera y sin
   caja. Mismo componente, dos disenos. Las reglas viven aca y no en la pagina,
   que es lo que dejo que se separaran.
     .dsec        una seccion
     .dsec-head   su titulo (Poppins 13.5, con marcador opcional)
     .dsec-n      el marcador numerado, cuando el orden significa algo
     .dsec-flow   el conector entre dos secciones ("listened to")
     .dsec-foot   la nota al pie del drawer, sin caja                        */
.drawer-body > .dsec{margin-top:14px; padding:13px 15px; border-radius:13px;
  background:var(--panel-soft); border:1px solid var(--panel-border)}
.dsec-head{display:flex; align-items:center; gap:9px; font-family:'Poppins',sans-serif;
  font-weight:700; font-size:13.5px; color:var(--panel-text); margin-bottom:11px}
.dsec-n{display:inline-flex; align-items:center; justify-content:center; width:22px; height:22px;
  flex:0 0 auto; border-radius:50%; background:var(--sage); color:#10231a;
  font-size:12.5px; font-weight:800}
.dsec .fields{margin-top:11px}
.dsec .quotes{display:grid; gap:8px}
/* la cita conserva el filete: ahi no decora, es la convencion de "esto lo dijo
   otro". Es el unico filete lateral que queda en el sistema. */
.dsec blockquote{margin:0; background:var(--panel-bg); border-left:3px solid var(--sage);
  border-radius:0 9px 9px 0; padding:9px 13px; font-size:13px; color:var(--panel-text);
  font-style:italic}
.dsec-flow{display:flex; align-items:center; justify-content:center; gap:9px; color:var(--label);
  font-size:11.5px; font-weight:700; letter-spacing:.09em; text-transform:uppercase;
  margin:14px 0 2px}
.dsec-flow .ic{width:14px; height:14px}
.dsec-foot{margin-top:14px; font-size:12px; line-height:1.5; color:var(--panel-text-soft);
  opacity:.85}
.dsec-foot b{font-weight:700; opacity:1}

/* ---- body (the only scroll container) ---- */
/* NO restyle the scrollbar here. It used to carry:
     .drawer-body::-webkit-scrollbar{width:9px}
     .drawer-body::-webkit-scrollbar-thumb{background:var(--panel-border)}
   which sets the thumb but leaves the TRACK at its default — Chrome paints
   that track opaque white, so a fat white strip ran down the glass panel. It
   also overrode the OS scrollbar the rest of the page uses (thin, widens on
   hover). The page's scrollbar is already the component: reuse it, and the
   drawer matches everywhere for free. */
.drawer-body{flex:1; overflow-y:auto; overscroll-behavior:contain; padding:4px 24px 24px}

/* ---- foot: prev / next without leaving the panel ---- */
.drawer-foot{flex:none; display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding:13px 24px; border-top:1px solid var(--panel-border); border-radius:0 0 0 22px;
  background:rgba(255,255,255,.05)}
/* es un `.chip`: aca solo va lo que no es del chip */
.drawer-nav{max-width:46%}
.drawer-nav span{overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.drawer-count{font-size:12px; color:var(--panel-text-soft); font-weight:500}

@media(max-width:900px){
  /* a pantalla completa no hay borde izquierdo que redondear */
  .drawer{width:100%; border-radius:0; border-left:0}
  .drawer-head, .drawer-foot{border-radius:0}
  .drawer-nav{max-width:42%}
}
