/* EPQA Motion UX v0.1 — Morph, Stagger, Spring, Easing.
   Opt-in, progressive enhancement. No layout animation, no CDN. */
@media (prefers-reduced-motion: no-preference) {
  /* MORPH: the same search surface signals focus, without resizing layout. */
  body.page-recursos .epqa-library-v3 .catalog-search.epqa-resources-search,
  body.page-home .epqa-landing-search,
  body.page-mis-creaciones .epqa-creations__search {
    transition: transform 220ms cubic-bezier(.2,.8,.25,1),
                border-radius 220ms cubic-bezier(.2,.8,.25,1),
                border-color 180ms ease-out,
                box-shadow 220ms ease-out !important;
    transform-origin:center center;
  }
  body.page-recursos .epqa-library-v3 .catalog-search.epqa-resources-search:focus-within,
  body.page-home .epqa-landing-search:focus-within,
  body.page-mis-creaciones .epqa-creations__search:focus-within {
    transform: translateY(-1px);
    border-radius: 18px !important;
    box-shadow: 0 0 0 3px rgba(7,151,226,.19), 0 8px 19px rgba(4,32,102,.08) !important;
  }
  /* EASING: only an icon travels; the input itself never jumps. */
  body.page-recursos .epqa-library-v3 .catalog-search.epqa-resources-search > .epqa-ui-icon,
  body.page-home .epqa-landing-search > .epqa-ui-icon,
  body.page-mis-creaciones .epqa-creations__search > i {
    transition: transform 260ms cubic-bezier(.22,1.35,.35,1) !important;
  }
  body.page-recursos .epqa-library-v3 .catalog-search.epqa-resources-search:focus-within > .epqa-ui-icon,
  body.page-home .epqa-landing-search:focus-within > .epqa-ui-icon,
  body.page-mis-creaciones .epqa-creations__search:focus-within > i {
    transform: scale(1.1);
  }
  /* SPRING: tactile feedback, limited to controls, not large cards. */
  body.page-recursos .epqa-library-v3 :is(.epqa-catalog-view-controls button,#resource-clear-filters,.resource-filters button),
  body.page-mis-creaciones .epqa-creations__filter,
  body.page-home .epqa-landing-search button {
    transition: transform 300ms cubic-bezier(.22,1.45,.35,1),
                box-shadow 180ms ease-out !important;
  }
  body.page-recursos .epqa-library-v3 :is(.epqa-catalog-view-controls button,#resource-clear-filters,.resource-filters button):active,
  body.page-mis-creaciones .epqa-creations__filter:active,
  body.page-home .epqa-landing-search button:active {
    transform: scale(.96);
  }
  /* EASING: selection has restrained emphasis. */
  body.page-recursos .epqa-library-v3 .epqa-catalog-view-controls button[aria-pressed="true"],
  body.page-mis-creaciones .epqa-creations__filter[aria-pressed="true"] {
    transform: scale(1.025);
  }
}
html[data-theme="dark"] body.page-recursos .epqa-library-v3 .catalog-search.epqa-resources-search:focus-within,
html[data-theme="dark"] body.page-home .epqa-landing-search:focus-within,
html[data-theme="dark"] body.page-mis-creaciones .epqa-creations__search:focus-within {
  box-shadow:0 0 0 3px rgba(111,181,255,.33) !important;
}
/* Respect accessibility preference even against older !important styles. */
@media (prefers-reduced-motion: reduce) {
  body.page-recursos .epqa-library-v3 .catalog-search.epqa-resources-search,
  body.page-recursos .epqa-library-v3 .catalog-search.epqa-resources-search > .epqa-ui-icon,
  body.page-recursos .epqa-library-v3 :is(.epqa-catalog-view-controls button,#resource-clear-filters,.resource-filters button),
  body.page-home .epqa-landing-search,
  body.page-home .epqa-landing-search > .epqa-ui-icon,
  body.page-home .epqa-landing-search button,
  body.page-mis-creaciones .epqa-creations__search,
  body.page-mis-creaciones .epqa-creations__search > i,
  body.page-mis-creaciones .epqa-creations__filter {
    transition:none!important;
    animation:none!important;
    transform:none!important;
  }
}

/* Fase 11 · Mis creaciones: motion contextual sobre los componentes existentes.
   No se modifican fuentes de datos, cantidades ni accesos. */
@media (prefers-reduced-motion: no-preference) {
  /* MORPH real del campo; la etiqueta no tiene fondo propio. */
  body.page-mis-creaciones .epqa-creations__search input {
    transition: border-color 210ms ease-out,
                box-shadow 240ms cubic-bezier(.2,.8,.25,1),
                border-radius 240ms cubic-bezier(.2,.8,.25,1) !important;
  }
  body.page-mis-creaciones .epqa-creations__search:focus-within input {
    border-color:#0797e2!important;
    border-radius:15px!important;
    box-shadow:0 0 0 3px rgba(7,151,226,.22)!important;
  }
  /* La lupa ya usa translateY(-50%) para permanecer centrada. */
  body.page-mis-creaciones .epqa-creations__search:focus-within > i {
    transform:translateY(-50%) scale(1.12)!important;
  }
  /* SPRING solo en iconos/controles: las métricas no parecen botones. */
  body.page-mis-creaciones .epqa-creations__stat-icon {
    transition:transform 300ms cubic-bezier(.2,1.45,.3,1)!important;
  }
  @media (hover:hover) {
    body.page-mis-creaciones .epqa-creations__stat:hover .epqa-creations__stat-icon {
      transform:translateY(-2px) scale(1.055);
    }
  }
  body.page-mis-creaciones .epqa-creations__item {
    transition:border-color 240ms ease-out,box-shadow 260ms ease-out!important;
  }
  @media (hover:hover) {
    body.page-mis-creaciones .epqa-creations__item:not([open]):hover {
      border-color:#68a8ed!important;
      box-shadow:0 5px 16px rgba(9,51,113,.13)!important;
    }
  }
  /* EASING: el indicador explica apertura/cierre sin mover la fila. */
  body.page-mis-creaciones .epqa-creations__chevron {
    transition:transform 320ms cubic-bezier(.22,1.18,.35,1),
               background-color 200ms ease-out!important;
  }
  body.page-mis-creaciones .epqa-creations__actions :is(a,button),
  body.page-mis-creaciones .epqa-creations__heading-links a {
    transition:transform 260ms cubic-bezier(.22,1.35,.35,1),
               border-color 190ms ease-out,box-shadow 190ms ease-out!important;
  }
  body.page-mis-creaciones .epqa-creations__actions :is(a,button):active,
  body.page-mis-creaciones .epqa-creations__heading-links a:active {
    transform:scale(.97);
  }
}
body.page-mis-creaciones .epqa-creations__summary:focus-visible {
  outline:3px solid #00a8fe!important;
  outline-offset:2px;
  border-radius:12px;
}
html[data-theme="dark"] body.page-mis-creaciones .epqa-creations__search:focus-within input {
  border-color:#89caff!important;
  box-shadow:0 0 0 3px rgba(125,192,255,.32)!important;
}
@media (prefers-reduced-motion: reduce) {
  body.page-mis-creaciones .epqa-creations__search input,
  body.page-mis-creaciones .epqa-creations__stat-icon,
  body.page-mis-creaciones .epqa-creations__item,
  body.page-mis-creaciones .epqa-creations__actions :is(a,button),
  body.page-mis-creaciones .epqa-creations__heading-links a {
    animation:none!important;
    transition:none!important;
    transform:none!important;
  }
  /* El chevron debe conservar sus estados abierto/cerrado sin animarse. */
  body.page-mis-creaciones .epqa-creations__chevron {
    animation:none!important;
    transition:none!important;
  }
  /* Conservar centrada la lupa, incluso con movimiento reducido. */
  body.page-mis-creaciones .epqa-creations__search > i {
    transform:translateY(-50%)!important;
  }
}
