/* Botón flotante de Morita, visible en todas las pantallas */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.morita-flot { position: fixed; right: 22px; bottom: 22px; z-index: 900; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.morita-flot__boton { position: relative; width: 62px; height: 62px; padding: 0; border-radius: 50%; cursor: pointer; background: #1a2140; border: 2px solid rgba(196, 181, 253, .95); box-shadow: 0 0 0 4px rgba(139, 92, 246, .25), 0 10px 30px -6px rgba(0, 0, 0, .8), 0 0 24px -2px rgba(34, 211, 166, .6); animation: morita-flotar 3.4s ease-in-out infinite; }
.morita-flot__boton img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; filter: brightness(1.3) saturate(1.25); }
/* Onda que se expande alrededor del botón mientras espera */
.morita-flot__boton::before, .morita-flot__boton::after { content: ''; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid rgba(34, 211, 166, .7); animation: morita-onda 3.4s ease-out infinite; pointer-events: none; }
.morita-flot__boton::after { animation-delay: 1.7s; border-color: rgba(167, 139, 250, .7); }
.morita-flot__boton:hover, .morita-flot__boton:focus-visible { animation-play-state: paused; transform: scale(1.08); outline: none; box-shadow: 0 0 0 5px rgba(139, 92, 246, .4), 0 0 30px 2px rgba(34, 211, 166, .85); }
.morita-flot__boton[aria-expanded="true"] { animation: none; }
.morita-flot__boton[aria-expanded="true"]::before, .morita-flot__boton[aria-expanded="true"]::after { display: none; }
.morita-flot__nube { position: absolute; right: 74px; top: 50%; transform: translateY(-50%); white-space: nowrap; padding: 7px 12px; border-radius: 12px; font-size: 12px; font-weight: 600; color: #fff; background: linear-gradient(100deg, #8b5cf6, #22d3a6); box-shadow: 0 6px 20px -6px rgba(139, 92, 246, .9); opacity: 0; pointer-events: none; animation: morita-nube 9s ease-in-out infinite 2s; }
.morita-flot__boton:hover .morita-flot__nube { animation: none; opacity: 1; }
.morita-flot__boton[aria-expanded="true"] .morita-flot__nube { display: none; }

.morita-flot__panel { width: min(360px, calc(100vw - 44px)); border-radius: 16px; overflow: hidden; background: #0e1428; border: 1px solid rgba(167, 139, 250, .55); box-shadow: 0 24px 60px -14px rgba(0, 0, 0, .9), 0 0 30px -10px rgba(139, 92, 246, .8); transform-origin: bottom right; animation: morita-abrir .18s ease-out; }
.morita-flot__panel header { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 14px; background: linear-gradient(110deg, rgba(139, 92, 246, .28), rgba(34, 211, 166, .1)); border-bottom: 1px solid rgba(148, 163, 255, .12); }
.morita-flot__panel header img { width: 36px; height: 36px; border-radius: 10px; border: 2px solid rgba(196, 181, 253, .9); filter: brightness(1.3) saturate(1.25); }
.morita-flot__panel header div { flex: 1; min-width: 0; }
.morita-flot__panel header b { display: block; font-size: 15px; color: #fff; }
.morita-flot__panel header small { display: block; font-size: 11px; color: #9aa3c4; }
.morita-flot__panel form { padding: 12px 14px 14px; }
.morita-flot__panel textarea { width: 100%; box-sizing: border-box; resize: none; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(139, 92, 246, .35); background: rgba(0, 0, 0, .3); color: #e6e9f5; font: inherit; font-size: 13px; line-height: 1.5; }
.morita-flot__panel textarea:focus { outline: none; border-color: #22d3a6; box-shadow: 0 0 0 3px rgba(34, 211, 166, .15); }
.morita-flot__acciones { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; }
.morita-flot__acciones a { font-size: 12px; color: #9aa3c4; display: inline-flex; gap: 6px; align-items: center; }
.morita-flot__acciones a:hover { color: #fff; }

@keyframes morita-flotar { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes morita-onda { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(1.55); opacity: 0; } }
@keyframes morita-nube { 0%, 70%, 100% { opacity: 0; transform: translateY(-50%) translateX(6px); } 76%, 94% { opacity: 1; transform: translateY(-50%) translateX(0); } }
@keyframes morita-abrir { from { opacity: 0; transform: scale(.94) translateY(8px); } to { opacity: 1; transform: none; } }
@media (max-width: 600px) { .morita-flot { right: 14px; bottom: 14px; } .morita-flot__boton { width: 54px; height: 54px; } .morita-flot__nube { display: none; } }
@media (prefers-reduced-motion: reduce) { .morita-flot__boton, .morita-flot__boton::before, .morita-flot__boton::after, .morita-flot__nube, .morita-flot__panel { animation: none !important; } }
@media print { .morita-flot { display: none !important; } }

/* Modo claro */
[data-tema="claro"] .morita-flot__panel { background: #ffffff; border-color: rgba(124, 58, 237, .35); box-shadow: 0 20px 50px -16px rgba(15, 23, 42, .35); }
[data-tema="claro"] .morita-flot__panel header { background: linear-gradient(110deg, rgba(139, 92, 246, .12), rgba(13, 148, 136, .06)); border-bottom-color: rgba(15, 23, 42, .08); }
[data-tema="claro"] .morita-flot__panel header b, [data-tema="claro"] .morita-flot__acciones a:hover { color: #111827; }
[data-tema="claro"] .morita-flot__panel header small, [data-tema="claro"] .morita-flot__acciones a { color: #6b7391; }
[data-tema="claro"] .morita-flot__panel textarea { background: #f7f8fc; color: #1f2433; border-color: rgba(124, 58, 237, .25); }
[data-tema="claro"] .morita-flot__boton { box-shadow: 0 0 0 4px rgba(124, 58, 237, .2), 0 10px 26px -8px rgba(15, 23, 42, .5); }
