/* ==========================================================================
   ROCO · Panel lateral del asistente ROMO (KUBYKA 26/09/2026)
   Mismo patrón que LEIRE en lidiare.com. CSS propio (Tailwind purgado).
   Tema: sigue html.dark como el resto de la web.
   ========================================================================== */

.romo-panel-overlay {
    position: fixed; inset: 0; z-index: 99998;
    background: rgba(23, 36, 48, .55);
    opacity: 0; visibility: hidden;
    transition: opacity .3s ease, visibility .3s ease;
}
.romo-panel-overlay.is-open { opacity: 1; visibility: visible; }

.romo-panel {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 99999;
    width: 440px; max-width: 100%;
    background: #FFFFFF;
    box-shadow: -12px 0 40px rgba(0, 0, 0, .18);
    transform: translateX(100%);
    transition: transform .3s ease;
    display: flex; flex-direction: column;
}
html.dark .romo-panel { background: #172430; }
.romo-panel.is-open { transform: translateX(0); }

.romo-panel-close {
    position: absolute; top: 12px; right: 12px; z-index: 3;
    width: 38px; height: 38px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: #FFFFFF; color: #172430;
    border: 1px solid rgba(23, 36, 48, .18);
    cursor: pointer;
    opacity: 0; transition: opacity .2s ease .15s, transform .2s ease;
}
html.dark .romo-panel-close { background: #172430; color: #F2F0EC; border-color: rgba(242, 240, 236, .25); }
.romo-panel.is-open .romo-panel-close { opacity: 1; }
.romo-panel-close:hover { transform: scale(1.08); }
.romo-panel-close:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

.romo-panel-loading {
    position: absolute; inset: 0; z-index: 2;
    display: flex; align-items: center; justify-content: center; gap: 12px;
    font: 500 15px/1.3 'Manrope', system-ui, sans-serif; color: #5F6B73;
    background: inherit;
}
.romo-panel-loading[hidden] { display: none; }
.romo-panel-loading span {
    width: 18px; height: 18px; border-radius: 50%;
    border: 2px solid rgba(23, 36, 48, .2); border-top-color: #172430;
    animation: romo-spin .8s linear infinite;
}
html.dark .romo-panel-loading { color: #A9B4BC; }
html.dark .romo-panel-loading span { border-color: rgba(242, 240, 236, .2); border-top-color: #F2F0EC; }
@keyframes romo-spin { to { transform: rotate(360deg); } }

.romo-iframe { flex: 1; width: 100%; height: 100%; border: 0; background: transparent; }

/* Evita el scroll de la página mientras el panel está abierto */
html.romo-panel-open, html.romo-panel-open body { overflow: hidden; }

@media (max-width: 520px) {
    .romo-panel { width: 100%; }
    .romo-panel-close { top: 10px; right: 10px; }
}
@media (prefers-reduced-motion: reduce) {
    .romo-panel, .romo-panel-overlay, .romo-panel-close { transition: none; }
    .romo-panel-loading span { animation: none; }
}
