/* Mi cuenta: pantalla de inicio de sesión sobre la escena del centro.
   La escena (1440×900) cubre la ventana; el formulario vive dentro de la escena en su lugar de la composición
   y en pantallas angostas pasa a flotar centrado. Una sola apariencia (ilustración), sin modo oscuro propio. */
body.dh-login-page { margin: 0; overflow: hidden; background: linear-gradient(#535082, #D67E60) fixed; } /* el cielo con el que arranca la escena: nunca se ve el crema */
html body.dh-login-page .dh-login, html body.dh-login-page .dh-login[hidden] { visibility: visible; display: block; } /* [hidden] lo esconde el navegador mientras no llegue esta hoja (si la página se pinta a medio cargar) */ /* nace escondido en un <style> del head (inc/mi-cuenta.php) hasta que llega esta hoja */
body.dh-login-page .wp-site-blocks { padding: 0; }
.dh-login {
  --ink: #1B1A17; --paper: #FCF3E3; --paper-2: #FFFAF0; --soft: #5F574B; --verde: #04322F; --naranja: #EE8E22; --rojo: #C9481E;
  --err-bg: #FBE0D3; --err: #8E2A12; --ok-bg: #E2EFD6; --ok: #24532A;
  --f-display: "Newsreader", "Iowan Old Style", "Times New Roman", serif; --f-sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gap: .95rem; --ease-out: cubic-bezier(.2, .9, .25, 1.08);
  position: fixed; inset: 0; color: var(--ink); font-family: var(--f-sans); font-size: 15px; -webkit-font-smoothing: antialiased;
}
.dh-login *, .dh-login *::before, .dh-login *::after { box-sizing: border-box; }

/* ---------- escena ---------- */
.dh-scene { position: absolute; inset: 0; overflow: hidden; background: linear-gradient(#535082, #D67E60); }
.dh-stage { position: absolute; left: 0; top: 0; width: 1440px; height: 900px; transform-origin: 0 0; }
.dh-layer { position: absolute; left: 0; top: 0; width: 1440px; height: 900px; overflow: visible; pointer-events: none; }
#dhSky { z-index: 1; }
#dhItems { z-index: 2; }
.dh-formwrap { position: absolute; z-index: 3; display: flex; flex-direction: column; justify-content: flex-end; }   /* la tarjeta se desborda hacia arriba */
.dh-formwrap > .card { flex: none; }
#dhItems2 { z-index: 4; }
.dh-layer path, .dh-layer ellipse, .dh-layer circle { vector-effect: non-scaling-stroke; }
@keyframes dhVeta { to { stroke-dashoffset: var(--off); } }
.dh-login .veta { animation: dhVeta 1s linear infinite; }
@keyframes dhPuff { 0%, 100% { transform: scale(.96); } 50% { transform: scale(1.06); } }
.dh-login .puff { transform-box: fill-box; transform-origin: 50% 50%; animation: dhPuff 1.8s ease-in-out infinite; }

/* intro: cada pieza aparece abajo y sube a su lugar; el retraso lo pone login.js de enfrente hacia el fondo */
.dh-login .dh-in { animation: dhIn 1s cubic-bezier(.2, .8, .2, 1) both, dhShow 0s linear both; }
@keyframes dhIn { from { transform: translateY(90px); } to { transform: none; } }
@keyframes dhShow { from { visibility: hidden; } to { visibility: visible; } }   /* oculta la pieza mientras espera su turno, sin desvanecer */

/* ---------- tarjeta del formulario ---------- */
.dh-login .card {
  position: relative; width: 400px; max-width: 100%; display: flex; flex-direction: column; pointer-events: auto;
  background: var(--paper); border: 2px solid var(--ink); border-radius: 22px; box-shadow: 7px 7px 0 var(--ink);
  --base: translate(0, 0); transform: var(--base); opacity: 0;
}
/* intro del formulario (sin desvanecer, como la escena): la tarjeta sube completa, ya con su contenido y su listón */
.dh-login.is-ready .card { opacity: 1; animation: dhCardIn 1.5s cubic-bezier(.16, 1, .3, 1) .3s both, dhPop 0s linear .3s both; }
@keyframes dhPop { from { opacity: 0; } to { opacity: 1; } }   /* aparece de golpe (con opacidad, para que el contenido no se asome antes que la tarjeta) */
@keyframes dhCardIn {
  from { transform: var(--base) translateY(100vh) rotate(-5deg); }   /* sube desde fuera de la pantalla y frena suave */
  to { transform: var(--base); }
}
.dh-login .card { overflow: hidden; }
/* listón de rombos (copiado de la referencia): va recortado por el borde redondo de la tarjeta y su alto extra se lo quita al relleno de arriba */
.dh-login .card::before { content: ""; flex: none; height: 30px; border-bottom: 2px solid var(--ink);
  background: #F2C14E url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='92' height='30' viewBox='0 0 92 30' shape-rendering='geometricPrecision'><path d='M0 0L23 0L8 15Z' fill='%23EE7A3A'/><path d='M0 0L8 15L0 15Z' fill='%23F2C14E'/><path d='M0 15L8 15L0 30Z' fill='%23F4A24A'/><path d='M0 30L8 15L23 30Z' fill='%23F2C14E'/><path d='M46 0L23 0L38 15Z' fill='%232F6B47'/><path d='M46 0L38 15L46 15Z' fill='%23EE7A3A'/><path d='M46 15L38 15L46 30Z' fill='%232F6B47'/><path d='M46 30L38 15L23 30Z' fill='%23F4A24A'/><path d='M23 0L38 15L23 30L8 15Z' fill='%231E4D3B'/><path d='M23 5.4L32.6 15L23 24.6L13.4 15Z' fill='%23F6DFA6'/><path d='M23 10.5L27.5 15L23 19.5L18.5 15Z' fill='%23EE7A3A'/><path d='M46 0L69 0L54 15Z' fill='%23F2C14E'/><path d='M46 0L54 15L46 15Z' fill='%232F6B47'/><path d='M46 15L54 15L46 30Z' fill='%23EE7A3A'/><path d='M46 30L54 15L69 30Z' fill='%232F6B47'/><path d='M92 0L69 0L84 15Z' fill='%23EE7A3A'/><path d='M92 0L84 15L92 15Z' fill='%23F2C14E'/><path d='M92 15L84 15L92 30Z' fill='%23F4A24A'/><path d='M92 30L84 15L69 30Z' fill='%23F2C14E'/><path d='M69 0L84 15L69 30L54 15Z' fill='%231E4D3B'/><path d='M69 5.4L78.6 15L69 24.6L59.4 15Z' fill='%23F2C14E'/><path d='M69 10.5L73.5 15L69 19.5L64.5 15Z' fill='%23E0573A'/></svg>") repeat-x 50% 0 / 92px 30px; }
/* las tres pantallas viven apiladas en la misma tarjeta: solo se ve la activa y su contenido entra en cascada */
.dh-login .views { position: relative; overflow: hidden; transition: height .5s cubic-bezier(.2, .8, .2, 1); }
.dh-login .view:not(.on) { position: absolute; left: 0; right: 0; top: 0; }
.dh-login .view { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .35s ease, visibility 0s linear .35s; }
.dh-login .view.on { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity .45s ease .12s, visibility 0s; }
.dh-login .cardin { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap); padding: 6px 28px 26px; }
.dh-login .cardin form { grid-template-columns: minmax(0, 1fr); }
.dh-login .cardin > * { opacity: 0; transform: translateY(14px); transition: opacity .3s ease, transform .4s ease; }
.dh-login .view.on .cardin > * { opacity: 1; transform: none; transition: opacity .5s ease, transform .8s var(--ease-out); transition-delay: calc(120ms + var(--i, 0) * 80ms); }

.dh-login .brand { display: grid; gap: .4rem; text-align: center; }
.dh-login .logo { width: 184px; max-width: 100%; height: auto; display: block; margin: 1rem auto .55rem; }
.dh-login .title { margin: 0; color: #04322f; /* verde del logo */ font-family: var(--f-display); font-weight: 600; font-size: 2.45rem; line-height: 1.02; letter-spacing: -.012em; text-wrap: balance; }
.dh-login .title em { font-style: normal; font-weight: inherit; color: inherit; } /* los títulos van lisos, sin cursiva naranja (como "Qué gusto verte de nuevo") */
.dh-login .kicker { margin: 0; font-size: .74rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--soft); }
.dh-login .lede { margin: 0; font-size: .95rem; line-height: 1.5; color: var(--soft); }
.dh-login form { display: grid; gap: var(--gap); margin: 0; }

.dh-login .field { display: flex; align-items: center; gap: .7rem; height: 52px; padding: 0 .9rem; margin: 0; background: var(--paper-2); border: 2px solid var(--ink); border-radius: 14px; cursor: text; transition: box-shadow .18s ease, transform .18s ease, background-color .18s ease; }
.dh-login .field > svg { flex: none; width: 20px; height: 20px; fill: none; stroke: var(--soft); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: stroke .18s ease; }
.dh-login .field input { flex: 1; width: 0; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font: 500 1rem var(--f-sans); color: var(--ink); padding: 0; box-shadow: none; }
.dh-login .field input::placeholder { color: #9A8F7F; font-weight: 400; }
.dh-login .field:focus-within { background: #fff; box-shadow: 3px 3px 0 var(--ink); transform: translate(-1px, -1px); }
.dh-login .field:focus-within > svg { stroke: var(--naranja); }
.dh-login .field.is-bad { border-color: var(--err); }
.dh-login .eye { flex: none; display: grid; place-items: center; width: 36px; height: 36px; margin-right: -.45rem; padding: 0; border: 0; border-radius: 10px; background: transparent; color: var(--soft); cursor: pointer; }
.dh-login .eye svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dh-login .eye .es { display: none; }
.dh-login .eye[aria-pressed="true"] .es { display: inline; }
.dh-login .eye:hover { background: rgba(27, 26, 23, .07); }

.dh-login .opts { display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; font-size: .88rem; }
.dh-login .chk { display: inline-flex; align-items: center; gap: .55rem; cursor: pointer; font-weight: 500; }
.dh-login .chk input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.dh-login .chk .box { width: 20px; height: 20px; display: grid; place-items: center; border: 2px solid var(--ink); border-radius: 6px; background: var(--paper-2); transition: background-color .15s ease, transform .15s ease; }
.dh-login .chk .box svg { width: 13px; height: 13px; fill: none; stroke: var(--paper); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 22; stroke-dashoffset: 22; transition: stroke-dashoffset .25s ease .05s; }
.dh-login .chk input:checked + .box { background: var(--verde); }
.dh-login .chk input:checked + .box svg { stroke-dashoffset: 0; }
.dh-login .link { color: var(--verde); font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; text-decoration-color: var(--naranja); border-radius: 4px; }
.dh-login .link:hover { text-decoration-color: var(--ink); }

.dh-login .cta { position: relative; display: flex; align-items: center; width: 100%; height: 56px; padding: 0 64px 0 24px; margin: 0; border: 2px solid var(--ink); border-radius: 999px; background: var(--verde); color: var(--paper); cursor: pointer; font: 700 1rem var(--f-sans); letter-spacing: .01em; text-align: left; box-shadow: 4px 4px 0 var(--ink); transition: transform .15s ease, box-shadow .15s ease, filter .15s ease; }
.dh-login .cta:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.dh-login .cta:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.dh-login .cta-a { position: absolute; right: 6px; top: 50%; width: 40px; height: 40px; margin-top: -20px; display: grid; place-items: center; border: 2px solid var(--ink); border-radius: 50%; background: var(--naranja); transition: transform .25s var(--ease-out); }
.dh-login .cta-a svg { width: 20px; height: 20px; fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.dh-login .cta:hover .cta-a { transform: translateX(3px); }
@keyframes dhSpin { to { transform: rotate(360deg); } }
.dh-login .cta > span:first-child { transition: opacity .2s ease; }
.dh-login .cta.is-loading { pointer-events: none; filter: saturate(.85); }
.dh-login .cta.is-loading > span:first-child { opacity: 0; }
.dh-login .cta.is-loading::before { content: ""; position: absolute; left: 24px; top: 50%; width: 20px; height: 20px; margin-top: -10px; border-radius: 50%; border: 2.5px solid rgba(252, 243, 227, .3); border-top-color: var(--paper); animation: dhSpin .8s linear infinite; }
.dh-login .woocommerce-privacy-policy-text p { margin: 0; font-size: .76rem; line-height: 1.45; color: var(--soft); }
.dh-login .woocommerce-privacy-policy-text a { color: inherit; }
.dh-login .reg, .dh-login .back { margin: 0; text-align: center; font-size: .9rem; color: var(--soft); }

.dh-login .meter { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .8rem; margin: -.35rem .2rem 0; min-height: 1.2rem; font-size: .78rem; font-weight: 600; color: var(--soft); }
.dh-login .meter .mbar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.dh-login .meter .mbar i { height: 6px; border-radius: 3px; background: rgba(27, 26, 23, .13); transition: background-color .35s ease; }
.dh-login .meter[data-s="1"] .mbar i:nth-child(-n+1) { background: var(--rojo); }
.dh-login .meter[data-s="2"] .mbar i:nth-child(-n+2) { background: var(--naranja); }
.dh-login .meter[data-s="3"] .mbar i:nth-child(-n+3) { background: #D9A928; }
.dh-login .meter[data-s="4"] .mbar i { background: #3E8E3F; }
.dh-login .meter .mtxt { min-width: 5.4em; text-align: right; opacity: 0; transition: opacity .3s ease; }
.dh-login .meter:not([data-s="0"]) .mtxt { opacity: 1; }

/* avisos de WooCommerce dentro del formulario: abren y cierran animando su altura */
.dh-login .notices { overflow: hidden; height: 0; opacity: 0; margin-bottom: calc(var(--gap) * -1); transition: height .5s cubic-bezier(.2, .8, .2, 1), margin-bottom .5s cubic-bezier(.2, .8, .2, 1), opacity .25s ease; }
.dh-login .notices.is-open { opacity: 1; margin-bottom: 0; transition: height .6s cubic-bezier(.2, .8, .2, 1), margin-bottom .6s cubic-bezier(.2, .8, .2, 1), opacity .5s ease .12s; }
.dh-login .notices ul { list-style: none; margin: 0; padding: .7rem .85rem; border: 2px solid currentColor; border-radius: 12px; font-size: .88rem; font-weight: 500; line-height: 1.4; }
.dh-login .notices li { margin: 0; }
.dh-login .notices ul::before, .dh-login .notices .wc-block-components-notice-banner::before { content: none !important; display: none !important; }
.dh-login .notices li + li { margin-top: .3rem; }
.dh-login .notices .woocommerce-error { background: var(--err-bg); color: var(--err); }
.dh-login .notices .woocommerce-message, .dh-login .notices .woocommerce-info { background: var(--ok-bg); color: var(--ok); }
/* avisos con el formato de bloques de WooCommerce: ícono a la izquierda, alineado con la primera línea */
.dh-login .notices .wc-block-components-notice-banner { display: flex; align-items: flex-start; gap: .55rem; margin: 0; padding: .7rem .85rem; border: 2px solid currentColor; border-radius: 12px; font-size: .88rem; font-weight: 500; line-height: 1.4; background: var(--ok-bg); color: var(--ok); }
.dh-login .notices .wc-block-components-notice-banner + .wc-block-components-notice-banner { margin-top: .4rem; }
.dh-login .notices .wc-block-components-notice-banner.is-error { background: var(--err-bg); color: var(--err); }
.dh-login .notices .wc-block-components-notice-banner > svg { flex: none; width: 20px; height: 20px; margin: 0; padding: 0; background: none; border-radius: 0; fill: currentColor; }
.dh-login .notices .wc-block-components-notice-banner__content { flex: 1; min-width: 0; }
.dh-login .notices a { color: inherit; font-weight: 700; }
.dh-login .notices .button { display: none; }

.dh-login :focus { outline: none; }
.dh-login .cta:focus-visible, .dh-login .eye:focus-visible, .dh-login .link:focus-visible { outline: 3px solid var(--naranja); outline-offset: 3px; }
.dh-login .chk input:focus-visible + .box { outline: 3px solid var(--naranja); outline-offset: 2px; }

/* pantallas angostas: el formulario flota centrado y la escena se enfoca en la cascada */
.dh-login.is-narrow .card { position: absolute; left: 50%; top: 50%; width: min(400px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: auto; --base: translate(-50%, -50%); z-index: 5; box-shadow: 5px 5px 0 var(--ink); }
.dh-login.is-narrow .cardin { padding: 4px 20px 22px; --gap: .8rem; }
.dh-login.is-narrow .title { font-size: 1.9rem; }

@media (prefers-reduced-motion: reduce) {
  .dh-login .veta, .dh-login .puff { animation: none; }
  .dh-login .card, .dh-login .view, .dh-login .cardin > * { transition-duration: .01s !important; transition-delay: 0s !important; }
  .dh-login .card { animation: none !important; }
}

/* con sesión iniciada: la cuenta nativa de WooCommerce en un contenedor simple */
.dh-cuenta-nativa { max-width: 960px; margin: 0 auto; padding: 120px max(16px, env(safe-area-inset-left, 0px)) 64px; }

.dh-login .dh-captcha { min-height: 65px; margin: .2rem 0; }
.dh-login .dh-captcha > div { width: 100%; }

/* Contraseña nueva: el contenido lo imprime el shortcode de WooCommerce dentro de un div.woocommerce; se acomoda como el resto de la tarjeta. */
.dh-login .cardin > .woocommerce { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap); }
.dh-login .cardin > .woocommerce > form { display: grid; gap: var(--gap); }
.dh-login .cardin > .woocommerce > .brand, .dh-login .cardin > .woocommerce > .back, .dh-login .cardin > .woocommerce > .lede { margin: 0; }
/* Aviso de fuerza de la contraseña nueva (lo escribe el script de WooCommerce, que también desactiva el botón si es débil). */
.dh-login .woocommerce-password-strength { margin: -.35rem .2rem 0; font-size: .85rem; font-weight: 700; line-height: 1.3; }
.dh-login .woocommerce-password-strength:empty { display: none; }
.dh-login .woocommerce-password-strength.short, .dh-login .woocommerce-password-strength.bad { color: var(--err); }
.dh-login .woocommerce-password-strength.good { color: #8A6A00; }
.dh-login .woocommerce-password-strength.strong { color: var(--ok); }
.dh-login .woocommerce-password-hint { display: block; margin: -.4rem .2rem 0; font-size: .78rem; line-height: 1.4; color: var(--soft); }
.dh-login .cta:disabled, .dh-login .cta.disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
