/* Irene, la asistente de la web (misma base que Luz de mitarifadeluz.es, con los colores de esta web) */
.irene{--marino:#16324f;--ambar:#1f8a7a;--naranja:#176b5f;--degradado:linear-gradient(135deg,#2fa593 0%,#16324f 100%);--gris:#5d6b78;--rojo:#c0392b;--tinta:#1d2833;--fondo:#f6f8fa;--linea:#e2e8ee;--blanco:#fff}

/* Luz, la asistente virtual */
.irene { position: fixed; right: 22px; bottom: 22px; z-index: 900; font-size: .95rem; }
.irene-foto { position: relative; display: block; border-radius: 50%; overflow: hidden; background: #1f8a7a; flex: none; }
.irene-foto img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.irene-foto .f-ojos, .irene-foto .f-habla { opacity: 0; }
.irene.parpadea .irene-foto .f-ojos { opacity: 1; }
.irene.hablando.boca .irene-foto .f-habla { opacity: 1; }
.irene.hablando.boca.parpadea .irene-foto .f-ojos { opacity: 0; }

.irene-boton { position: relative; width: 88px; height: 88px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; animation: irene-flota 5s ease-in-out infinite; }
.irene-foto-boton { width: 100%; height: 100%; box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--ambar), 0 16px 34px rgba(11, 46, 79, .38); transition: transform .25s; }
.irene-boton:hover .irene-foto-boton { transform: scale(1.05); }
.irene-boton::before, .irene-boton::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--ambar); opacity: 0; animation: irene-onda 3.2s ease-out infinite; pointer-events: none; }
.irene-boton::after { animation-delay: 1.6s; }
.irene-en-linea { position: absolute; right: 4px; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: #22c55e; border: 3px solid #fff; box-shadow: 0 0 0 0 rgba(34, 197, 94, .6); animation: irene-pulso 2s infinite; }
.irene-nombre { position: absolute; left: 50%; bottom: -10px; transform: translateX(-50%); background: var(--marino); color: #fff; font-size: .74rem; font-weight: 800; padding: 3px 12px; border-radius: 99px; letter-spacing: .04em; box-shadow: 0 4px 10px rgba(11, 46, 79, .3); }
.irene.abierta .irene-boton { animation: none; }
.irene.abierta .irene-boton::before, .irene.abierta .irene-boton::after { display: none; }
.irene.saluda .irene-boton { animation: irene-saluda 1s ease-in-out 3; }
.irene-bocadillo { position: absolute; right: 104px; bottom: 22px; width: 250px; background: #fff; color: var(--tinta); padding: 14px 16px; border-radius: 18px 18px 4px 18px; box-shadow: 0 18px 40px rgba(11, 46, 79, .22); cursor: pointer; line-height: 1.4; animation: irene-entra .45s cubic-bezier(.2, .9, .3, 1.3); border: 1px solid #bfe2da; }
.irene-bocadillo b { color: var(--marino); }

.irene-panel { position: absolute; right: 0; bottom: 108px; width: 390px; max-width: calc(100vw - 32px); height: min(620px, calc(100vh - 140px)); display: flex; flex-direction: column; background: #fff; border-radius: 26px; box-shadow: 0 30px 80px rgba(11, 46, 79, .35); overflow: hidden; animation: irene-entra .3s ease-out; }
.irene-panel[hidden] { display: none !important; }
.irene-panel header { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px; background: linear-gradient(120deg, var(--marino-3), var(--marino) 55%, var(--marino-2)); color: #fff; position: relative; }
.irene-panel header::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--degradado); }
.irene-foto-mini { width: 48px; height: 48px; box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ambar); }
.irene-titulo { flex: 1; min-width: 0; }
.irene-titulo b { display: block; font-size: 1.1rem; letter-spacing: .01em; }
.irene-titulo span { font-size: .78rem; opacity: .9; }
.irene-titulo span::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: #4ade80; vertical-align: 1px; }
.irene-icono { width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; font-size: 1.05rem; line-height: 1; cursor: pointer; flex: none; }
.irene-icono:hover { background: rgba(255, 255, 255, .28); }
.irene-cerrar { font-size: 1.5rem; }
.irene-mensajes { flex: 1; overflow-y: auto; padding: 16px 16px 10px; display: flex; flex-direction: column; gap: 10px; background: radial-gradient(circle at 50% 0, #e6f4f1 0, var(--fondo) 55%); }
.irene-portada { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 6px 0 10px; }
.irene-foto-grande { width: 112px; height: 112px; box-shadow: 0 0 0 4px #fff, 0 0 0 7px var(--ambar), 0 14px 30px rgba(11, 46, 79, .25); margin-bottom: 10px; }
.irene-portada b { font-size: 1.15rem; color: var(--marino); }
.irene-portada span { font-size: .8rem; color: var(--gris); }
.irene-msg { max-width: 84%; padding: 10px 14px; border-radius: 18px; line-height: 1.45; overflow-wrap: anywhere; animation: irene-msg .25s ease-out; }
.irene-de-luz { position: relative; align-self: flex-start; margin-left: 34px; background: #fff; color: var(--tinta); border-bottom-left-radius: 5px; box-shadow: 0 3px 12px rgba(11, 46, 79, .08); }
.irene-de-luz::before { content: ''; position: absolute; left: -34px; bottom: 0; width: 26px; height: 26px; border-radius: 50%; background: #1f8a7a url(/static/img/luz.jpg) center / cover; box-shadow: 0 0 0 2px #fff; }
.irene-de-luz a { color: var(--marino-2); font-weight: 700; }
.irene-de-usuario { align-self: flex-end; background: linear-gradient(135deg, var(--marino-2), var(--marino)); color: #fff; border-bottom-right-radius: 5px; box-shadow: 0 3px 12px rgba(11, 46, 79, .18); }
.irene-voz { font-style: italic; }
.irene-error { background: #fff4f4; color: var(--rojo); }
.irene-nota { background: #e6f4f1; color: #176b5f; font-size: .85rem; }
.irene-escribiendo { display: flex; gap: 5px; padding: 14px 16px; }
.irene-escribiendo i { width: 7px; height: 7px; border-radius: 50%; background: var(--ambar); animation: irene-puntos 1s infinite; }
.irene-escribiendo i:nth-child(2) { animation-delay: .15s; }
.irene-escribiendo i:nth-child(3) { animation-delay: .3s; }
.irene-sugerencias { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 14px 0; background: var(--fondo); }
.irene-sugerencias[hidden] { display: none; }
.irene-sugerencias button { border: 1px solid #bfe2da; background: #f3faf8; color: #176b5f; border-radius: 99px; padding: 6px 12px; font: inherit; font-size: .82rem; font-weight: 600; cursor: pointer; transition: background .2s; }
.irene-sugerencias button:hover { background: #cfe9e3; }
.irene-escribir { display: flex; gap: 8px; padding: 12px 14px; background: var(--fondo); }
.irene-escribir[hidden] { display: none; }
.irene-escribir input { flex: 1; min-width: 0; border: 1px solid var(--linea); border-radius: 99px; padding: 12px 16px; font: inherit; background: #fff; box-shadow: inset 0 1px 3px rgba(11, 46, 79, .05); }
.irene-escribir input:focus { outline: 2px solid var(--ambar); border-color: transparent; }
.irene-mic, .irene-enviar { width: 46px; height: 46px; flex: none; border: 0; border-radius: 50%; cursor: pointer; display: grid; place-items: center; transition: transform .15s; }
.irene-mic { background: #fff; color: var(--marino); box-shadow: 0 0 0 1px var(--linea); }
.irene-mic:hover { color: #176b5f; box-shadow: 0 0 0 2px var(--ambar); }
.irene-enviar { background: var(--degradado); color: #fff; font-size: 1.1rem; }
.irene-mic:active, .irene-enviar:active { transform: scale(.92); }
.irene-grabando { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: #fff1f1; color: #991b1b; font-weight: 600; }
.irene-grabando[hidden] { display: none; }
.irene-rec { width: 12px; height: 12px; border-radius: 50%; background: #dc2626; animation: irene-pulso-rojo 1s infinite; flex: none; }
.irene-ondas { display: flex; gap: 3px; align-items: center; height: 22px; flex: 1; }
.irene-ondas i { width: 4px; height: 6px; border-radius: 3px; background: #dc2626; animation: irene-onda-voz .9s ease-in-out infinite; }
.irene-ondas i:nth-child(2) { animation-delay: .1s; } .irene-ondas i:nth-child(3) { animation-delay: .2s; } .irene-ondas i:nth-child(4) { animation-delay: .3s; } .irene-ondas i:nth-child(5) { animation-delay: .4s; }
.irene-rec-cancelar, .irene-rec-enviar { border: 0; border-radius: 99px; padding: 8px 12px; font: inherit; font-size: .85rem; font-weight: 700; cursor: pointer; }
.irene-rec-cancelar { background: transparent; color: #991b1b; }
.irene-rec-enviar { background: #dc2626; color: #fff; }
.irene-aviso { margin: 0; padding: 0 14px 10px; background: var(--fondo); color: var(--gris-2); font-size: .7rem; line-height: 1.3; }
.irene.escucha .irene-foto-mini { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #dc2626; }
@keyframes irene-flota { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes irene-onda { 0% { transform: scale(.95); opacity: .8; } 80%, 100% { transform: scale(1.35); opacity: 0; } }
@keyframes irene-pulso { 0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .6); } 70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }
@keyframes irene-pulso-rojo { 50% { opacity: .3; } }
@keyframes irene-onda-voz { 0%, 100% { height: 6px; } 50% { height: 20px; } }
@keyframes irene-saluda { 0%, 100% { transform: scale(1) rotate(0); } 30% { transform: scale(1.08) rotate(-4deg); } 60% { transform: scale(1.08) rotate(4deg); } }
@keyframes irene-entra { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes irene-msg { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes irene-puntos { 0%, 100% { opacity: .3; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }
@media (max-width: 560px) {
  .irene { right: 12px; bottom: 14px; }
  .irene-boton { width: 70px; height: 70px; }
  .irene-panel { position: fixed; right: 8px; left: 8px; bottom: 96px; width: auto; max-width: none; height: calc(100vh - 116px); height: calc(100dvh - 116px); }
  .irene-bocadillo { right: 84px; bottom: 14px; width: 210px; }
  .irene-foto-grande { width: 88px; height: 88px; }
}
@media (prefers-reduced-motion: reduce) {
  .irene-boton, .irene-boton::before, .irene-boton::after, .irene-en-linea { animation: none !important; }
}
@media print { .irene { display: none; } }
/* dentro de la aplicación: más discreta, sin ondas, para no tapar los botones de las pantallas */
.irene.irene-app { right: 16px; bottom: 16px; }
.irene-app .irene-boton { width: 58px; height: 58px; animation: none; }
.irene-app .irene-boton::before, .irene-app .irene-boton::after { display: none; }
.irene-app .irene-en-linea { width: 12px; height: 12px; border-width: 2px; right: 1px; top: 2px; }
.irene-app .irene-nombre { font-size: .66rem; padding: 2px 9px; bottom: -8px; }
.irene-app .irene-panel { bottom: 74px; }
.irene-app .irene-bocadillo { right: 72px; bottom: 6px; }
#irene-consumo { display: block; margin-top: 4px; font-weight: 600; }


/* FincaGesTOTAL */
.irene{--marino-2:#1f4d75;--marino-3:#0e2238;--gris-2:#5d6b78}
.irene .irene-panel header{position:relative;top:auto;height:auto;z-index:auto;border-bottom:0;backdrop-filter:none}
.irene button{margin-top:0}
