/* Dr. Notes · micro-interacciones compartidas (dn-motion).
   Botón con relleno líquido · etiqueta flotante · modo oscuro con círculo · stepper · cascada de resultados.
   Paleta: azul #2563EB / azul oscuro #1E3A5F / celeste #7CC4F0. Respeta prefers-reduced-motion. */

/* ---------- 1 · Etiqueta flotante (login, registro, recuperar) ---------- */
#vista-login .dn-ff { margin-top: 14px; }
#vista-login .reg-campo .dn-ff { margin-top: 12px; }
#vista-login .dn-ff > label {
    position: absolute; left: 44px; top: 50%; transform: translateY(-50%); margin: 0; padding: 0 5px; z-index: 2;
    font: 500 15px/1 var(--f-cuerpo, inherit); color: var(--ui-grey, #94A3B8); pointer-events: none; white-space: nowrap; max-width: calc(100% - 60px);
    overflow: hidden; text-overflow: ellipsis; background: transparent; border-radius: 4px;
    transition: top .26s cubic-bezier(.2, .8, .2, 1), left .26s cubic-bezier(.2, .8, .2, 1), font-size .26s, color .2s, background-color .2s, transform .26s cubic-bezier(.2, .8, .2, 1);
}
#vista-login .dn-ff.dn-sel > label { left: 14px; }
#vista-login .dn-ff.dn-up > label { top: 0; left: 12px; transform: translateY(-50%); font-size: 12px; font-weight: 600; color: var(--text-3, #64748B); background: var(--superficie, #fff); }
#vista-login .dn-ff:focus-within > label { color: var(--azul, #2563EB); }
#vista-login .dn-ff > label small { display: none; }
#vista-login .dn-ff.dn-up > label small { display: inline; font-weight: 500; opacity: .8; }
#vista-login .dn-ff input::placeholder { opacity: 0; transition: opacity .2s; }
#vista-login .dn-ff input:focus::placeholder { opacity: 1; }
#vista-login .dn-ff input, #vista-login .dn-ff select { caret-color: var(--azul, #2563EB); }
#vista-login .dn-ff input:focus, #vista-login .dn-ff select:focus {
    border-color: transparent;
    background: linear-gradient(var(--superficie, #fff), var(--superficie, #fff)) padding-box, linear-gradient(90deg, #1E3A5F, #2563EB 55%, #7CC4F0) border-box;
    box-shadow: 0 0 14px rgba(37, 99, 235, .35);
}

/* ---------- 2 · Botón de envío con relleno líquido ---------- */
#vista-login .login-card button[type="submit"] { position: relative; overflow: hidden; isolation: isolate; }
.dn-liq { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 10px; color: #fff; font: inherit; }
.dn-liq.dn-liq-b { opacity: .45; z-index: 0; }
.dn-liq .dn-burbuja { position: absolute; border-radius: 50%; background: #fff; will-change: transform, opacity; }
.dn-liq svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dn-liq-linea { position: absolute; inset: 0; z-index: 2; }
.dn-tap { animation: dn-tap .5s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes dn-tap { 0% { transform: scale(1); } 18% { transform: scale(.95); } 55% { transform: scale(1.025); } 100% { transform: scale(1); } }

/* ---------- 3 · Modo claro/oscuro: círculo que crece desde el botón ---------- */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 2; }
.dn-tema-btn svg { transition: transform .45s cubic-bezier(.3, 1.4, .5, 1); }
.dn-tema-btn.dn-gira svg { transform: rotate(90deg) scale(.85); }
.dn-rim { position: fixed; z-index: 2147483000; border-radius: 50%; pointer-events: none; border: 3px solid #7CC4F0; box-shadow: 0 0 14px #2563EB, inset 0 0 12px rgba(37, 99, 235, .4); transform: translate(-50%, -50%); }
.dn-rim.dn-rim-claro { border-color: #FFD166; box-shadow: 0 0 14px #F2B647, inset 0 0 12px rgba(242, 182, 71, .4); }

/* ---------- 4 · Stepper (cantidad de preguntas) ---------- */
.dn-sp { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer; display: inline-grid; place-items: center; color: #fff;
    background: linear-gradient(135deg, #1E3A5F, #2563EB 60%, #7CC4F0); box-shadow: 0 6px 14px -6px rgba(37, 99, 235, .65); font: 600 22px/1 var(--f-cuerpo, inherit); padding: 0;
    transition: opacity .25s, filter .2s, box-shadow .2s, background .25s; }
.dn-sp:hover { filter: brightness(1.08); }
.dn-sp.dn-sp-off { background: var(--linea, #E2E8F0); color: var(--text-3, #64748B); box-shadow: none; opacity: .8; cursor: default; }
.dn-sp.dn-sp-press { animation: dn-sp-press .45s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes dn-sp-press { 0% { transform: scale(1); } 20% { transform: scale(.86); box-shadow: 0 0 0 6px rgba(37, 99, 235, .25); } 100% { transform: scale(1); } }
.dn-num-pop { animation: dn-num-pop .42s cubic-bezier(.3, 1.5, .5, 1); }
@keyframes dn-num-pop { 0% { transform: scale(.55); opacity: .2; } 70% { transform: scale(1.1); opacity: 1; } 100% { transform: scale(1); } }
.ex-cantidad .dn-sp { margin: 0 2px; }

/* ---------- 5 · Cascada de resultados (búsqueda) ---------- */
.dn-cae { animation: dn-cae .42s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes dn-cae { from { opacity: 0; transform: translateY(-10px); } }

@media (prefers-reduced-motion: reduce) {
    .dn-tap, .dn-sp-press, .dn-num-pop, .dn-cae { animation: none !important; }
    #vista-login .dn-ff > label, .dn-tema-btn svg { transition: none; }
}

/* Cambio de tema: sin transiciones intermedias durante la captura y capa nueva lista para animar en GPU. */
html.dn-cambiando *, html.dn-cambiando *::before, html.dn-cambiando *::after { transition: none !important; }
::view-transition-new(root) { will-change: clip-path; }
.dn-rim { will-change: transform, opacity; }
