/* RoAlert: ventanas de aviso y confirmación (estilo SweetAlert) para toda la web.
   Usa solo las variables del tema (claro/oscuro) definidas en core.css, así que cambia sola con el tema. */
.ra-overlay { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; padding: 16px; overflow-y: auto; background: var(--overlay, rgba(5, 9, 20, .72)); animation: raFade .18s ease-out both; }
.ra-box { position: relative; width: min(100%, 440px); margin: auto; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 26px 24px 22px; text-align: center; color: var(--text); border: 1px solid var(--line-strong, var(--line)); border-radius: var(--radius, 16px); background: var(--surface-solid, var(--surface, #fff)); box-shadow: var(--shadow, 0 18px 50px -18px rgba(0, 0, 0, .7)); animation: raPop .22s cubic-bezier(.2, .9, .3, 1.2) both; }
.ra-box.is-wide { width: min(100%, 560px); }
.ra-title { margin: 0; font: 800 1.25rem var(--font-head, inherit); overflow-wrap: anywhere; }
.ra-text { margin: 0; color: var(--text-soft); font-size: .96rem; line-height: 1.5; overflow-wrap: anywhere; }
.ra-html { width: 100%; color: var(--text-soft); font-size: .95rem; text-align: left; }

/* icono: SVG redondo o GIF de los emoticonos de Ragnarok */
.ra-icon { width: 60px; height: 60px; display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--line-strong, var(--line)); color: var(--text-soft); }
.ra-icon svg { width: 30px; height: 30px; }
.ra-icon.is-warning { color: var(--accent-text, var(--accent)); border-color: var(--accent); }
.ra-icon.is-error { color: var(--bad); border-color: var(--bad); }
.ra-icon.is-question, .ra-icon.is-info { color: var(--text-soft); }
.ra-icon.is-loading { border-color: var(--line); border-top-color: var(--accent); animation: raSpin .8s linear infinite; }
.ra-gif { display: block; max-width: 100%; height: auto; max-height: 130px; image-rendering: pixelated; }

/* campos */
.ra-fields { width: 100%; display: flex; flex-direction: column; gap: 14px; text-align: left; }
.ra-field { display: flex; flex-direction: column; gap: 6px; }
.ra-field label { font: 700 .72rem var(--font-head, inherit); letter-spacing: .08em; text-transform: uppercase; color: var(--text-soft); }
.ra-field .input, .ra-field .select { width: 100%; }
.ra-error { width: 100%; margin: 0; padding: 10px 12px; text-align: left; font-weight: 700; font-size: .88rem; color: var(--bad); border: 1px solid var(--bad); border-radius: 10px; background: var(--surface-2, transparent); }

/* botones */
.ra-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 6px; }
.ra-actions .btn[disabled] { opacity: .6; cursor: wait; }

/* aviso breve (toast) */
.ra-toasts { position: fixed; z-index: 2100; top: calc(var(--nav-h, 68px) + 12px); right: 16px; display: flex; flex-direction: column; gap: 10px; max-width: min(360px, calc(100vw - 32px)); pointer-events: none; }
.ra-toast { display: flex; align-items: center; gap: 12px; padding: 12px 14px; pointer-events: auto; color: var(--text); border: 1px solid var(--line-strong, var(--line)); border-radius: 12px; background: var(--surface-solid, var(--surface)); box-shadow: var(--shadow); animation: raToastIn .25s ease-out both; }
.ra-toast .ra-gif { width: 44px; max-height: 44px; flex: 0 0 auto; }
.ra-toast .ra-icon { width: 36px; height: 36px; flex: 0 0 auto; }
.ra-toast .ra-icon svg { width: 18px; height: 18px; }
.ra-toast strong { display: block; font: 800 .95rem var(--font-head, inherit); }
.ra-toast span { display: block; color: var(--text-soft); font-size: .85rem; }
.ra-toast.is-out { animation: raToastOut .2s ease-in both; }

/* Poring / RO celebration header inside RoAlert */
.ra-poring-hero { position: relative; width: 104px; height: 104px; margin: 0 auto 6px; display: grid; place-items: center; }
.ra-poring-avatar { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; object-position: center 42%; border: 3px solid var(--accent, #e8b84b); box-shadow: 0 8px 24px rgba(0, 0, 0, .28), 0 0 0 4px rgba(232, 184, 75, .18); animation: raPoringBounce 1.8s ease-in-out infinite; }
.ra-poring-emote { position: absolute; right: -4px; bottom: -2px; width: 38px; height: 38px; image-rendering: pixelated; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .35)); pointer-events: none; }
.ra-poring-lead { margin: 0 0 6px; text-align: center; font-size: .98rem; color: var(--text); }
.ra-poring-sub { margin: 0 0 12px; text-align: center; font-size: .92rem; color: var(--text-soft); overflow-wrap: anywhere; }
.ra-poring-note { padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line-soft, var(--line)); background: var(--surface-2, rgba(128, 128, 128, .08)); font-size: .86rem; line-height: 1.5; color: var(--text-soft); text-align: center; }
@keyframes raPoringBounce { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-5px) scale(1.03); } }

body.ra-lock { overflow: hidden; }
@keyframes raFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes raPop { from { opacity: 0; transform: translateY(8px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes raSpin { to { transform: rotate(360deg); } }
@keyframes raToastIn { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
@keyframes raToastOut { to { opacity: 0; transform: translateX(16px); } }
@media (prefers-reduced-motion: reduce) { .ra-overlay, .ra-box, .ra-toast { animation-duration: .01s; } .ra-icon.is-loading { animation-duration: 2.4s; } }
