/*
* live-polls.css
 * Estilos del foro en vivo y del panel de encuestas (shortcode [chat_plugin_auth]).
 * se cargan con wp_enqueue_style.
 */

.live-forum-root {
    --lf-blue: #0b2e9e;
    --lf-ink: #1f2433;
    --lf-muted: #6b7280;
    --lf-green: #4f8a3c;
    --lf-red: #f2262c;
    --lf-card-top: #f3f5fc;
    --lf-card-bottom: #e4e9f7;
    --lf-border: #d6dcef;
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
    color: var(--lf-ink);
}
.live-forum-root *, .live-forum-root *::before, .live-forum-root *::after { box-sizing: border-box; }

/* Neutraliza estilos globales de botones del tema / Elementor */
.live-forum-root button {
    font-family: inherit;
    text-transform: none;
    letter-spacing: normal;
    line-height: 1.2;
    box-shadow: none;
    min-height: 0;
    margin: 0;
}

.lf-card {
    background: linear-gradient(180deg, var(--lf-card-top), var(--lf-card-bottom));
    border: 1px solid var(--lf-border);
    border-radius: 20px;
    padding: 18px 20px;
}

/* ===== Panel moderador ===== */
.lf-panel { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 640px) { .lf-panel { grid-template-columns: 1fr; } }

.lf-card-title {
    margin: 0 0 14px;
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    color: var(--lf-blue);
    text-transform: uppercase;
}
/* ===== encuestas ===== */
.lf-preset-group { margin: 0 0 6px; font-size: 11px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase; color: var(--lf-muted); } /* Botones con las preguntas preparadas en WordPress */
.lf-preset-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 12px; }
.live-forum-root .lf-btn-preset,
.live-forum-root .lf-btn-preset:hover,
.live-forum-root .lf-btn-preset:focus {
    background: #ffffff;
    color: #374151;
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 11px 10px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;                
    white-space: normal;             /*las preguntas largas bajan de línea dentro del botón */
    text-align: center;             
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .06);
    transition: border-color .15s, color .15s;
}
.live-forum-root .lf-btn-preset:hover { color: var(--lf-blue); border-color: #b9c4ea; }
/* Pregunta seleccionada */
.live-forum-root .lf-btn-preset.is-selected,
.live-forum-root .lf-btn-preset.is-selected:hover { color: var(--lf-blue); border-color: var(--lf-blue); background: #eef2ff; }
/* Pregunta que está en vivo */
.live-forum-root .lf-btn-preset.is-live,
.live-forum-root .lf-btn-preset.is-live:hover { color: #1f4d14; border-color: var(--lf-green); background: #eef7ea; }
/* Pregunta ya realizada (sus resultados están guardados en WordPress) */
.live-forum-root .lf-btn-preset.is-done::before { content: '✓ '; color: var(--lf-green); }



.lf-actions { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.live-forum-root .lf-btn-launch,
.live-forum-root .lf-btn-close,
.live-forum-root .lf-btn-launch:hover,
.live-forum-root .lf-btn-close:hover,
.live-forum-root .lf-btn-launch:focus,
.live-forum-root .lf-btn-close:focus {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    border-radius: 999px;
    padding: 9px 20px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}
.live-forum-root .lf-btn-launch, .live-forum-root .lf-btn-launch:hover, .live-forum-root .lf-btn-launch:focus { background: var(--lf-green); }
.live-forum-root .lf-btn-close,  .live-forum-root .lf-btn-close:hover,  .live-forum-root .lf-btn-close:focus  { background: var(--lf-red); }
.live-forum-root .lf-btn-launch:hover, .live-forum-root .lf-btn-close:hover { filter: brightness(1.08); }
.live-forum-root .lf-btn-launch:disabled, .live-forum-root .lf-btn-close:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.live-forum-root .lf-btn svg { width: 18px; height: 18px; flex-shrink: 0; }

/* Resultados */
.lf-results-title { margin: 0 0 4px; font-size: 16px; font-weight: 500; color: #4b5563; }
.lf-results-q { margin: 0 0 14px; font-size: 13px; color: var(--lf-muted); } /* la pregunta sobre las barras */
.lf-result-row { margin-bottom: 14px; }
.lf-result-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 6px; }
.lf-result-label { min-width: 0; font-size: 14px; font-weight: 600; color: var(--lf-ink); word-break: break-word; }
.lf-result-pct { flex-shrink: 0; font-size: 13px; color: var(--lf-muted); white-space: nowrap; }
.lf-result-track { height: 10px; border-radius: 999px; background: #e9eaf2; overflow: hidden; }
.lf-result-fill { height: 100%; border-radius: 999px; transition: width .4s ease; }
.lf-results-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--lf-border);
}
.lf-results-total { margin: 0; font-size: 12px; color: var(--lf-muted); }
.lf-empty { margin: 12px 0 0; font-size: 13px; color: var(--lf-muted); }
.live-forum-root .lf-btn-soft.lf-btn-download:disabled { cursor: not-allowed; }
.live-forum-root .lf-btn-ver-resultados { margin-top: 10px; }

/*Tarjeta Usuarios bloqueado */
.lf-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.lf-card-head .lf-results-title { margin: 0; }
.live-forum-root .lf-btn-soft,
.live-forum-root .lf-btn-soft:hover,
.live-forum-root .lf-btn-soft:focus {
    background: #ffffff;
    color: var(--lf-blue);
    border: 1px solid #c7d3f5;
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
}
.live-forum-root .lf-btn-soft:hover { background: #eef2ff; }
.live-forum-root .lf-btn-soft:disabled { opacity: .5; cursor: wait; }
.lf-count {
    display: inline-block;
    min-width: 22px;
    padding: 1px 7px;
    margin-left: 4px;
    border-radius: 999px;
    background: #ffffff;
    font-size: 12px;
    text-align: center;
    color: var(--lf-blue);
}
.lf-mini-list { list-style: none; margin: 0; padding: 0; max-height: 230px; overflow-y: auto; scrollbar-width: thin; }
.lf-mini-list li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 7px 0; border-bottom: 1px solid var(--lf-border); font-size: 13px; }
.lf-mini-list li:last-child { border-bottom: none; }
.lf-mini-text { flex: 1; min-width: 0; color: var(--lf-ink); word-break: break-word; }
.lf-mini-meta { font-size: 11px; color: var(--lf-muted); }
.live-forum-root .lf-btn-unblock { margin-left: auto; }
.live-forum-root .lf-empty[hidden] { display: none; }
/* Preguntas del foro en el panel: texto más grande para leerlo en voz alta, y el autor debajo */
.lf-questions-list { max-height: 320px; }
.lf-questions-list li { flex-direction: column; align-items: flex-start; gap: 2px; }
.lf-questions-list .lf-mini-text { font-size: 14px; font-weight: 500; }

/* Charla en curso */
.lf-charla-card { grid-column: 1 / -1; } /* ocupa el ancho completo del panel */
.lf-charla-actual { margin: -6px 0 12px; text-align: center; font-size: 15px; font-weight: 600; color: var(--lf-ink); }
.lf-charla-row { display: flex; align-items: center; gap: 10px; }
.lf-charla-search { position: relative; flex: 1; min-width: 0; }
.live-forum-root input#lf-charla-input {
    width: 100%;
    margin: 0;
    padding: 8px 12px;
    height: auto;
    border: 1px solid var(--lf-border);
    border-radius: 999px;
    background: #ffffff;
    box-shadow: none;
    font-size: 13px;
    color: var(--lf-ink);
}
.live-forum-root input#lf-charla-input:disabled { opacity: .55; cursor: not-allowed; }
/* lista del autocompletado, flotando bajo el buscador */
.lf-charla-results {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    z-index: 20;
    list-style: none;
    margin: 0;
    padding: 4px;
    max-height: 260px;
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid var(--lf-border);
    border-radius: 10px;
    box-shadow: 0 6px 16px rgba(15, 23, 42, .12);
}
.live-forum-root .lf-charla-results[hidden] { display: none; }
.live-forum-root .lf-charla-results button,
.live-forum-root .lf-charla-results button:hover,
.live-forum-root .lf-charla-results button:focus {
    display: block;
    width: 100%;
    text-align: left;
    padding: 8px 10px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--lf-ink);
    font-size: 13px;
    white-space: normal;
    cursor: pointer;
}
.live-forum-root .lf-charla-results button:hover { background: #eef2ff; color: var(--lf-blue); }
.lf-charla-noresult { padding: 8px 10px; font-size: 13px; color: var(--lf-muted); }
.lf-charla-lock { margin: 8px 0 0; font-size: 12px; color: #b45309; }
.live-forum-root .lf-charla-lock[hidden] { display: none; }

/* Foro en vivo */
.lf-forum {
    display: flex;
    flex-direction: column;
    padding: 18px 18px 14px;
}
.lf-forum-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    font-size: 20px;
    font-weight: 500;
    text-transform: uppercase;
    color: var(--lf-ink);
}
.lf-live-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #4f9a46;
    animation: lf-pulse 2s infinite;
}
@keyframes lf-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(79, 154, 70, .45); }
    70%  { box-shadow: 0 0 0 8px rgba(79, 154, 70, 0); }
    100% { box-shadow: 0 0 0 0 rgba(79, 154, 70, 0); }
}
/* Pausa del foro */
.live-forum-root .lf-btn-pause,
.live-forum-root .lf-btn-pause:hover,
.live-forum-root .lf-btn-pause:focus {
    margin-left: auto;
    width: 34px;
    height: 34px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: var(--lf-red);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.live-forum-root .lf-btn-pause svg { width: 18px; height: 18px; fill: currentColor; }
.live-forum-root .lf-btn-pause:disabled { opacity: .55; cursor: wait; }
.lf-icon-play, .lf-paused-label { display: none; }
.lf-paused-label { font-size: 13px; color: #b45309; text-transform: none; }
.lf-forum--paused .lf-live-dot { background: #f59e0b; animation: none; }
.lf-forum--paused .lf-paused-label { display: inline; }
.live-forum-root .lf-forum--paused .lf-btn-pause { background: var(--lf-green); }
.lf-forum--paused .lf-icon-pause { display: none; }
.lf-forum--paused .lf-icon-play { display: block; }
/* Charla en curso sobre el foro y aviso "No hay charla en curso" */
.lf-forum-charla { margin: -4px 0 10px; font-size: 13px; font-weight: 600; color: var(--lf-blue); }
.live-forum-root .lf-forum-charla[hidden] { display: none; }
/* las encuestas de otras charlas se ocultan (sin esto, el display:grid de .lf-preset-grid las seguiría mostrando) */
.live-forum-root .lf-preset-group[hidden],
.live-forum-root .lf-preset-grid[hidden] { display: none; }
.lf-forum-empty { margin: auto; font-size: 14px; color: var(--lf-muted); text-align: center; }

.lf-forum-messages {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 6px 4px 10px 0;
    scrollbar-width: thin;
}
.lf-msg { display: flex; gap: 12px; align-items: flex-start; position: relative; }
.lf-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 17px;
    flex-shrink: 0;
    background: #fde68a;
    color: #92400e;
}
.lf-avatar--sm { width: 36px; height: 36px; font-size: 14px; }
.lf-msg-body { flex: 1; min-width: 0; padding-top: 3px; }
.lf-msg-meta { display: flex; gap: 8px; align-items: baseline; font-size: 12px; }
.lf-msg-user { font-weight: 600; color: var(--lf-ink); }
.lf-msg-time { font-size: 11px; color: var(--lf-muted); }
.lf-msg-text { margin-top: 2px; font-size: 13px; font-weight: 500; line-height: 1.45; color: #111827; word-break: break-word; }

/* Botones del moderador sobre cada mensaje (aparecen al pasar el mouse) */
.lf-msg-actions {
    display: none;
    position: absolute;
    right: 0;
    left: 0;                    /* no más ancha que el mensaje: así no se sale del foro */
    top: 0;
    z-index: 2;                 /* encima del texto del mensaje */
    flex-wrap: wrap;            /* si no caben en una fila, bajan a la siguiente */
    justify-content: flex-end;  /* alineados a la derecha, como antes */
    gap: 4px;
}
.live-forum-root .lf-msg:hover .lf-msg-actions { display: flex; }
.live-forum-root .lf-msg-actions [hidden] { display: none !important; } /* el tema no debe mostrar botones ocultos */
.live-forum-root .forum-btn-reply,
.live-forum-root .forum-btn-reply:hover,
.live-forum-root .forum-btn-reply:focus {
    background: #e6ecfb;
    color: var(--lf-blue);
    border: 1px solid #c7d3f5;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 11px;
    cursor: pointer;
}
/* Cita del mensaje al que se responde */
.lf-msg-quote {
    margin: 3px 0 2px;
    padding: 3px 8px;
    border-left: 3px solid #8fa6e6;
    background: rgba(255, 255, 255, .6);
    border-radius: 0 6px 6px 0;
    font-size: 12px;
    color: var(--lf-muted);
}

/* Pregunta para el expositor: fondo ámbar suave, borde a la izquierda y etiqueta "Pregunta" */
.lf-msg--pregunta {
    background: #fff6e5;
    border-left: 3px solid #e2a03f;
    border-radius: 0 10px 10px 0;
    padding: 6px 8px;
}
.lf-msg-tag {
    padding: 1px 7px;
    border-radius: 999px;
    background: #e2a03f;
    color: #3b2a00;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .3px;
    text-transform: uppercase;
}
.live-forum-root .forum-btn-question,
.live-forum-root .forum-btn-question:hover,
.live-forum-root .forum-btn-question:focus {
    background: #fff6e5;
    color: #8a5a00;
    border: 1px solid #f1d39b;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 11px;
    cursor: pointer;
}

/* Mensaje que ve un usuario bloqueado (reemplaza todo el foro) */
.lf-blocked { margin: auto; font-size: 14px; color: var(--lf-muted); text-align: center; }
.live-forum-root .forum-btn-del,
.live-forum-root .forum-btn-del:hover,
.live-forum-root .forum-btn-del:focus,
.live-forum-root .forum-btn-block,
.live-forum-root .forum-btn-block:hover,
.live-forum-root .forum-btn-block:focus {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 11px;
    cursor: pointer;
}

/* Encuesta fijada en el foro */
.live-forum-root .pinned-poll-chat {
    background: #ffffff;
    border: 2px solid #8fa6e6;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 10px;
}
.live-forum-root .pinned-poll-chat h5 { margin: 0 0 8px; color: var(--lf-blue); font-size: 13px; }
.live-forum-root .pinned-opt-btn,
.live-forum-root .pinned-opt-btn:focus {
    display: block;
    width: 100%;
    text-align: left;
    padding: 8px 10px;
    margin-bottom: 6px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: var(--lf-ink);
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: background .2s;
}
.live-forum-root .pinned-opt-btn:hover { background: #e6ecfb; color: var(--lf-ink); }
.live-forum-root .pinned-opt-btn:disabled { cursor: default; }
.live-forum-root .pinned-opt-btn.voted,
.live-forum-root .pinned-opt-btn.voted:hover { background: var(--lf-blue); color: #fff; border-color: var(--lf-blue); }

/* Caja de envío */
.lf-forum-input {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    padding: 8px 8px 8px 10px;
    background: rgba(255, 255, 255, .8);
    border: 1px solid var(--lf-border);
    border-radius: 12px;
}
.lf-input-wrap { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lf-input-label { font-size: 11px; font-weight: 600; color: #6aa25a; }
.live-forum-root input#forum-chat-input {
    width: 100%;
    margin: 0;
    padding: 2px 0;
    height: auto;
    min-height: 0;
    border: none;
    background: transparent;
    box-shadow: none;
    outline: none;
    font-size: 13px;
    color: var(--lf-ink);
}
.live-forum-root .lf-btn-send,
.live-forum-root .lf-btn-send:hover,
.live-forum-root .lf-btn-send:focus {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #374151;
    cursor: pointer;
}
.live-forum-root .lf-btn-send:hover { background: rgba(15, 23, 42, .06); }
.live-forum-root .lf-btn-send:disabled { opacity: .4; cursor: default; }
.live-forum-root .lf-btn-send svg { width: 22px; height: 22px; }

/* Casilla "Es una pregunta para el expositor" */
.live-forum-root .lf-ask {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin: 3px 0 0;
    font-size: 11px;
    font-weight: 500;
    color: #8a5a00;
    cursor: pointer;
}
.live-forum-root .lf-ask input { width: auto; height: auto; margin: 0; accent-color: #e2a03f; }
.live-forum-root .lf-ask:has(input:disabled) { opacity: .5; cursor: default; }

/* ===== Estilo v1.6: cabecera de charla (tarjeta clara) ===== */
.live-forum-root .lf-charla-hero {
    position: relative;
    overflow: hidden;
    padding: 22px 26px 28px;
    background: #f7f7fc;
    border: 1px solid #e2e2f0;
    border-radius: 14px;
    color: var(--lf-ink);
}
/* línea degradada inferior */
.live-forum-root .lf-charla-hero::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4px;
    background: linear-gradient(90deg, #2a3aa8 0%, #8a80dc 55%, #f2792b 100%);
}
.lf-hero-info { flex: 1 1 320px; min-width: 0; }
.lf-hero-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.lf-hero-tags { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.lf-hero-kicker { font-size: 12px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: #f2792b; }
.lf-hero-pill {
    padding: 3px 9px;
    border-radius: 999px;
    background: #e5e5f6;
    color: #3a378f;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .6px;
    text-transform: uppercase;
}
.lf-hero-sub { font-size: 13px; color: var(--lf-muted); }

/* Badge: gris sin charla, índigo con punto naranja cuando hay charla */
.lf-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    border-radius: 999px;
    border: none;
    background: #e6e6ef;
    color: #6b6b85;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: .5px;
    text-transform: uppercase;
}
.lf-live-badge-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.lf-charla--live .lf-live-badge { background: #2d2a87; color: #ffffff; }
.lf-charla--live .lf-live-badge-dot { background: #f2792b; animation: lf-badge-pulse 1.6s ease-in-out infinite; }
@keyframes lf-badge-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(242, 121, 43, .55); }
    50%      { box-shadow: 0 0 0 5px rgba(242, 121, 43, 0); }
}
.lf-live-on { display: none; }
.lf-charla--live .lf-live-on { display: inline; }
.lf-charla--live .lf-live-off { display: none; }

.live-forum-root .lf-charla-hero .lf-charla-actual {
    margin: 0;
    max-width: 640px;
    text-align: left;
    font-size: 28px;
    font-weight: 800;
    line-height: 1.22;
    color: #1d1b4f;
}

/* ===== Sección buscador (barra "Charla en la sala") ===== */
.live-forum-root .lf-hero-actions {
    position: relative;
    z-index: 5; /* la lista del buscador queda sobre las secciones de abajo */
    padding: 10px 12px 10px 16px;
    background: #ffffff;
    border: 1px solid #d9d9ee;
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(29, 27, 79, .06);
}
.live-forum-root .lf-hero-actions .lf-charla-row { gap: 12px; }
.lf-buscador-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .6px;
    text-transform: uppercase;
    color: #1d1b4f;
}
.lf-buscador-label svg { width: 15px; height: 15px; }
.lf-search-icon {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    color: #1d1b4f;
    pointer-events: none;
    z-index: 1;
}
.live-forum-root .lf-hero-actions input#lf-charla-input {
    height: 34px;
    padding: 0 12px 0 32px;
    border: 1px solid #c8c8de;
    border-radius: 8px;
    background: #ffffff;
    color: #1d1b4f;
    font-size: 13px;
}
.live-forum-root .lf-hero-actions input#lf-charla-input:focus { outline: none; border-color: #2d2a87; box-shadow: 0 0 0 3px rgba(45, 42, 135, .12); }
.live-forum-root .lf-hero-actions #lf-charla-end,
.live-forum-root .lf-hero-actions #lf-charla-end:hover,
.live-forum-root .lf-hero-actions #lf-charla-end:focus {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 18px;
    border: none;
    border-radius: 999px;
    background: #2d2a87;
    color: #ffffff;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
}
.live-forum-root .lf-hero-actions #lf-charla-end:hover:not(:disabled) { background: #1d1b4f; }
.live-forum-root .lf-hero-actions #lf-charla-end:disabled { opacity: .45; cursor: not-allowed; }
.live-forum-root .lf-hero-actions #lf-charla-end svg { width: 14px; height: 14px; }
.live-forum-root .lf-hero-actions .lf-charla-lock { margin: 8px 0 0 4px; }

/* badge y subtítulo apilados a la derecha */
.lf-hero-status { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.lf-hero-status .lf-hero-sub { font-size: 12px; color: var(--lf-muted); text-align: right; }

@media (max-width: 640px) {
    .live-forum-root .lf-charla-hero { padding: 18px 18px 24px; }
    .live-forum-root .lf-charla-hero .lf-charla-actual { font-size: 22px; }
    .live-forum-root .lf-hero-actions .lf-charla-row { flex-wrap: wrap; }
    .lf-buscador-label { width: 100%; }
    .live-forum-root .lf-hero-actions .lf-charla-search { flex: 1 1 100%; }
    .live-forum-root .lf-hero-actions #lf-charla-end { width: 100%; justify-content: center; }
	.lf-hero-status { align-items: flex-start; }
    .lf-hero-status .lf-hero-sub { text-align: left; }
}

/* ===== Estilo foro HEADER ===== */
.live-forum-root .lf-forum {
    padding: 0;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e3e8f2;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
}
.live-forum-root .lf-forum-header {
    padding: 16px 20px;
    background: #f8fafc;
    border-bottom: 1px solid #e3e8f2;
    font-size: 18px;
    font-weight: 700;
    text-transform: none;
}
.lf-forum-icon { width: 22px; height: 22px; flex-shrink: 0; }
.live-forum-root .lf-forum-charla {
    margin: 0;
    padding: 9px 20px;
    background: #eef2f6;
    border-bottom: 1px solid #e3e8f2;
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
}
#attendee-pinned-poll { padding: 12px 16px 0; }
.live-forum-root .lf-forum-messages { padding: 18px 20px 10px; gap: 14px; }
.live-forum-root .lf-forum-input { margin: 0 16px 16px; }

/* botón Pausar / Reanudar con texto */
.live-forum-root .lf-btn-pause,
.live-forum-root .lf-btn-pause:hover,
.live-forum-root .lf-btn-pause:focus {
    width: auto;
    height: auto;
    gap: 6px;
    padding: 7px 14px;
    border: 1px solid #fecaca;
    border-radius: 999px;
    background: #fee2e2;
    color: #dc2626;
    font-size: 14px;
    font-weight: 600;
}
.live-forum-root .lf-btn-pause svg { width: 14px; height: 14px; }
.live-forum-root .lf-forum--paused .lf-btn-pause,
.live-forum-root .lf-forum--paused .lf-btn-pause:hover { background: #dcfce7; border-color: #bbf7d0; color: #15803d; }
.lf-resume-txt { display: none; }
.lf-forum--paused .lf-pause-txt { display: none; }
.lf-forum--paused .lf-resume-txt { display: inline; }

/* mensajes en burbuja */
.live-forum-root .lf-avatar { width: 40px; height: 40px; font-size: 14px; }
.live-forum-root .lf-msg-body {
    padding: 10px 14px;
    background: #f8fafc;
    border: 1px solid #e5e9f2;
    border-radius: 12px;
}
.live-forum-root .lf-msg-meta { align-items: center; flex-wrap: wrap; }
.live-forum-root .lf-msg-user { font-size: 12px; font-weight: 500; }
.live-forum-root .lf-msg-time { font-size: 10px; color: #9aa3b5; }
.live-forum-root .lf-msg-text { margin-top: 4px; font-size: 12px; font-weight: 400; line-height: 1.55; color: #334155; }
.lf-msg-tag--mod { display: inline-block; margin-bottom: 4px; background: #82B8AD; color: #32403E; }

/* pregunta: el color pasa de toda la fila a la burbuja */
.live-forum-root .lf-msg--pregunta { padding: 0; background: none; border: none; }
.live-forum-root .lf-msg--pregunta .lf-msg-body { background: #fff6e5; border-color: #f1d39b; border-left: 3px solid #e2a03f; }

/* Cabecera del foro: "Comentarios" + "en pausa" arriba, botón Pausar/Reanudar abajo */
.live-forum-root .lf-forum-header {
    flex-wrap: wrap;   /* permite que el botón baje a otra línea */
    row-gap: 0;
}
/* salto de línea invisible entre el título y el botón */
.live-forum-root .lf-forum-header::after {
    content: '';
    flex-basis: 100%;
    order: 1;
}
.live-forum-root .lf-btn-pause,
.live-forum-root .lf-btn-pause:hover,
.live-forum-root .lf-btn-pause:focus {
    order: 2;          /* va después del salto de línea */
    margin-left: 0;    /* antes tenía margin-left:auto, que lo empujaba a la derecha */
    margin-top: 10px;
}
/* "en pausa" en una sola línea, al lado de "Comentarios" */
.live-forum-root .lf-paused-label { white-space: nowrap; }

/* =====================================================================
 * live-polls.css · ESTILO 2026
 * Hace que el shortcode [chat_plugin_auth] se vea como
 * preview-single-charla-admin-2026-v2.html.
 *
 * Cómo usarlo: pegar este bloque AL FINAL de live-polls.css
 * (sobrescribe los estilos anteriores) y subir la versión del
 * wp_enqueue_style a '2.0.0' para que el navegador no use el CSS viejo.
 *
 * Los selectores repiten :hover/:focus a propósito: el tema / Elementor
 * le pone fondo y color a todos los botones al pasar el mouse.
 * ===================================================================== */

.live-forum-root {
    /* las variables antiguas pasan a la paleta 2026 */
    --lf-blue: #2a2785;
    --lf-ink: #1f1d4d;
    --lf-muted: #6b6a8f;
    --lf-border: #e6e6ec;
    /* paleta 2026 */
    --ec-navy: #2a2785;
    --ec-ink: #1f1d4d;
    --ec-text: #4a4870;
    --ec-muted: #6b6a8f;
    --ec-orange: #f47920;
    --ec-lilac: #8486ec;
    --ec-soft: #f7f7fc;
    --ec-line: #e6e6ec;
    --ec-line-2: #c9cbe6;
    --ec-chip: #e4e5fb;
    --ec-danger: #b42318;
    --ec-grad: linear-gradient(90deg, #0033a0, #8486ec 50%, #f47920);
    color: var(--ec-ink);
}
/* los campos de texto no heredan la fuente del sitio por defecto */
.live-forum-root input { font-family: inherit; }

@keyframes ec-pulse {
    from { transform: scale(1); opacity: .7; }
    to   { transform: scale(2.8); opacity: 0; }
}


/* =====================================================================
 * 1a. CABECERA DE LA CHARLA (seccion="charla")
 * La base ya está en "Estilo v1.6" de live-polls.css; aquí solo se
 * ajustan medidas y colores para que calcen con la preview.
 * ===================================================================== */
.live-forum-root .lf-charla-hero {
    padding: 24px 32px 28px;
    background: var(--ec-soft);
    border-color: var(--ec-line);
    border-radius: 20px;
}
.live-forum-root .lf-charla-hero::after { background: var(--ec-grad); }
.live-forum-root .lf-hero-top { margin-bottom: 12px; }

/* "Charla" + "Vista moderador" */
.live-forum-root .lf-hero-kicker { font-size: .75rem; letter-spacing: .08em; color: var(--ec-orange); }
.live-forum-root .lf-hero-pill { padding: 4px 10px; font-size: .66rem; letter-spacing: .06em; color: var(--ec-navy); background: var(--ec-chip); }

/* Estado: "Transmisión en vivo" / "Sin charla en curso" */
.live-forum-root .lf-live-badge {
    gap: 8px;
    padding: 6px 14px 6px 12px;
    font-size: .72rem;
    letter-spacing: .05em;
    color: var(--ec-text);
    background: #ececf3;
}
.live-forum-root .lf-charla--live .lf-live-badge { color: #fff; background: var(--ec-navy); }
.live-forum-root .lf-charla--live .lf-live-badge-dot { background: var(--ec-orange); }
.live-forum-root .lf-hero-status .lf-hero-sub { font-size: .78rem; color: var(--ec-muted); }

/* Título */
.live-forum-root .lf-charla-hero .lf-charla-actual {
    max-width: 880px;
    font-size: clamp(1.4rem, 2.6vw, 2rem);
    line-height: 1.25;
    color: var(--ec-ink);
}
.live-forum-root .lf-charla-hero:not(.lf-charla--live) .lf-charla-actual { color: var(--ec-muted); }


/* =====================================================================
 * 1b. BARRA "CHARLA EN LA SALA" (seccion="buscador")
 * ===================================================================== */
.live-forum-root .lf-hero-actions {
    padding: 14px 16px;
    border: 1.5px solid var(--ec-line-2);
    border-radius: 16px;
    box-shadow: 0 10px 24px -20px rgba(42, 39, 133, .6);
}
.live-forum-root .lf-hero-actions .lf-charla-row { gap: 10px 14px; }
.live-forum-root .lf-buscador-label { gap: 8px; font-size: .72rem; letter-spacing: .06em; color: var(--ec-navy); }
.live-forum-root .lf-buscador-label svg { width: 18px; height: 18px; }

.live-forum-root .lf-hero-actions .lf-search-icon { left: 12px; width: 16px; height: 16px; color: var(--ec-navy); }
.live-forum-root .lf-hero-actions input#lf-charla-input {
    height: 42px;
    padding: 0 14px 0 36px;
    font-size: .82rem;
    font-weight: 600;
    color: var(--ec-ink);
    border: 1px solid var(--ec-line-2);
    border-radius: 10px;
    box-shadow: none;
}
.live-forum-root .lf-hero-actions input#lf-charla-input::placeholder { font-weight: 500; color: var(--ec-muted); }
.live-forum-root .lf-hero-actions input#lf-charla-input:focus { border-color: var(--ec-lilac); box-shadow: 0 0 0 3px rgba(132, 134, 236, .25); }

.live-forum-root .lf-hero-actions #lf-charla-end,
.live-forum-root .lf-hero-actions #lf-charla-end:hover,
.live-forum-root .lf-hero-actions #lf-charla-end:focus {
    height: 40px;
    padding: 0 16px;
    font-size: .78rem;
    font-weight: 700;
    background: var(--ec-navy);
}
.live-forum-root .lf-hero-actions #lf-charla-end:hover:not(:disabled) { background: var(--ec-ink); }
.live-forum-root .lf-hero-actions #lf-charla-end:focus-visible { outline: 3px solid var(--ec-lilac); outline-offset: 2px; }
.live-forum-root .lf-hero-actions .lf-charla-lock { font-size: .75rem; font-weight: 600; color: var(--ec-danger); }

/* Lista del autocompletado */
.live-forum-root .lf-charla-results {
    border-color: var(--ec-line-2);
    border-radius: 12px;
    box-shadow: 0 12px 30px -10px rgba(42, 39, 133, .35);
}
.live-forum-root .lf-charla-results button,
.live-forum-root .lf-charla-results button:focus {
    font-size: .82rem;
    font-weight: 600;
    color: var(--ec-ink);
    border-radius: 8px;
}
.live-forum-root .lf-charla-results button:hover { color: var(--ec-navy); background: #f1f1f8; }
.live-forum-root .lf-charla-noresult { font-size: .82rem; color: var(--ec-muted); }


/* =====================================================================
 * 2. FORO / COMENTARIOS (seccion="foro")
 * ===================================================================== */
.live-forum-root .lf-forum {
    background: #fff;
    border: 1px solid var(--ec-line);
    border-radius: 16px;
    box-shadow: 0 12px 30px -24px rgba(42, 39, 133, .5);
}

/* Cabecera: título a la izquierda y Pausar a la derecha, en una sola fila */
.live-forum-root .lf-forum-header {
    flex-wrap: nowrap;
    gap: 8px;
    padding: 12px 14px 12px 18px;
    font-size: 1rem;
    font-weight: 800;
    color: var(--ec-navy);
    background: #fff;
    border-bottom: 1px solid #ececf3;
}
.live-forum-root .lf-forum-header::after { content: none; }
.live-forum-root .lf-forum-icon { width: 18px; height: 18px; }
/* "en pausa" baja a una franja propia bajo el título (en la misma fila no cabe junto a Reanudar) */
.live-forum-root .lf-forum--paused .lf-forum-header { flex-wrap: wrap; row-gap: 10px; }
.live-forum-root .lf-forum--paused .lf-paused-label {
    order: 3;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-basis: 100%;
    padding: 7px 12px;
    font-size: 0; /* se reemplaza el texto " en pausa" por uno más claro */
    white-space: normal;
    background: #f1f1f8;
    border-radius: 10px;
}
.live-forum-root .lf-paused-label::before {
    content: "";
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    background: var(--ec-navy);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M10 9v6M14 9v6'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M10 9v6M14 9v6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.live-forum-root .lf-paused-label::after {
    content: "Comentarios en pausa: los usuarios no pueden escribir.";
    font-size: .75rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--ec-text);
}

.live-forum-root .lf-forum-header .lf-btn-pause,
.live-forum-root .lf-forum-header .lf-btn-pause:hover,
.live-forum-root .lf-forum-header .lf-btn-pause:focus,
.live-forum-root .lf-forum--paused .lf-forum-header .lf-btn-pause,
.live-forum-root .lf-forum--paused .lf-forum-header .lf-btn-pause:hover {
    order: 0;
    flex-shrink: 0;
    gap: 6px;
    height: 32px;
    margin: 0 0 0 auto;
    padding: 0 12px;
    font-size: .72rem;
    font-weight: 700;
    color: var(--ec-navy);
    background: #fff;
    border: 1.5px solid var(--ec-navy);
    border-radius: 999px;
}
.live-forum-root .lf-forum .lf-forum-header .lf-btn-pause:hover:not(:disabled) { color: #fff; background: var(--ec-navy); }
.live-forum-root .lf-btn-pause svg { width: 14px; height: 14px; }

/* Nombre de la charla sobre el foro */
.live-forum-root .lf-forum-charla {
    padding: 8px 18px;
    font-size: .75rem;
    font-weight: 600;
    color: var(--ec-text);
    background: var(--ec-soft);
    border-bottom: 1px solid #ececf3;
}
.live-forum-root .lf-forum-empty,
.live-forum-root .lf-blocked { font-size: .82rem; color: var(--ec-muted); }

/* ----- Encuesta fijada en el chat ----- */
.live-forum-root #attendee-pinned-poll { flex-shrink: 0; max-height: 45%; overflow-y: auto; padding: 12px 14px 0; }
.live-forum-root .pinned-poll-chat {
    margin: 0;
    padding: 12px;
    background: var(--ec-soft);
    border: 1.5px solid var(--ec-lilac);
    border-radius: 12px;
}
.live-forum-root .pinned-poll-chat h5 {
    margin: 0 0 8px;
    font-family: inherit;
    font-size: .85rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--ec-ink);
}
/* Etiqueta "Encuesta en vivo" con punto naranja (ver nota: el JS debería dejar solo la pregunta en el h5) */
.live-forum-root .pinned-poll-chat h5::before {
    content: "Encuesta en vivo";
    display: block;
    margin-bottom: 4px;
    padding-left: 14px;
    font-size: .66rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--ec-navy);
    background: radial-gradient(circle, var(--ec-orange) 3.5px, transparent 4px) left center / 8px 8px no-repeat;
}
.live-forum-root .pinned-opt-btn,
.live-forum-root .pinned-opt-btn:hover,
.live-forum-root .pinned-opt-btn:focus {
    margin: 0 0 6px;
    padding: 7px 10px;
    font-size: .78rem;
    font-weight: 600;
    color: var(--ec-ink);
    background: #fff;
    border: 1px solid var(--ec-line-2);
    border-radius: 10px;
}
.live-forum-root .pinned-opt-btn:last-child { margin-bottom: 0; }
.live-forum-root .pinned-opt-btn:hover:not(:disabled) { border-color: var(--ec-navy); }
.live-forum-root .pinned-opt-btn:disabled:not(.voted) { color: var(--ec-muted); }
/* tras votar solo se marca la opción elegida, sin relleno oscuro */
.live-forum-root .pinned-opt-btn.voted,
.live-forum-root .pinned-opt-btn.voted:hover {
    color: var(--ec-navy);
    background: var(--ec-chip);
    border-color: var(--ec-navy);
}

/* ----- Mensajes: lista plana con separadores (sin burbujas) ----- */
.live-forum-root .lf-forum-messages { gap: 0; padding: 6px 18px 10px; }
.live-forum-root .lf-msg { gap: 10px; padding: 10px 0; }
.live-forum-root .lf-msg + .lf-msg { border-top: 1px solid #f1f1f8; }

/* !important: el JS pinta cada avatar con un color distinto */
.live-forum-root .lf-msg .lf-avatar {
    width: 34px;
    height: 34px;
    font-size: .75rem;
    font-weight: 800;
    color: var(--ec-navy) !important;
    background: var(--ec-chip) !important;
}
.live-forum-root .lf-msg:has(.lf-msg-tag--mod) .lf-avatar {
    color: #fff !important;
    background: linear-gradient(135deg, #0033a0, #8486ec 55%, #f47920) !important;
}

/* Cuerpo: nombre + etiqueta + hora en la primera línea, cita y texto debajo */
.live-forum-root .lf-msg-body,
.live-forum-root .lf-msg--pregunta .lf-msg-body {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 8px;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 0;
}
.live-forum-root .lf-msg-body > * { flex-basis: 100%; }
.live-forum-root .lf-msg-body > .lf-msg-meta { flex-basis: auto; order: -2; }
.live-forum-root .lf-msg-body > .lf-msg-tag { flex-basis: auto; order: -1; }
.live-forum-root .lf-msg-meta { gap: 4px 8px; font-size: .78rem; }
.live-forum-root .lf-msg-user { font-size: .78rem; font-weight: 700; color: var(--ec-ink); }
.live-forum-root .lf-msg-time { font-size: .78rem; font-weight: 500; color: var(--ec-muted); }
.live-forum-root .lf-msg-text { margin-top: 3px; font-size: .85rem; font-weight: 400; line-height: 1.45; color: #3b3966; }

/* Etiquetas: "Pregunta" naranja y "Administrador" lila */
.live-forum-root .lf-msg-tag {
    padding: 2px 8px;
    font-size: .62rem;
    font-weight: 800;
    letter-spacing: .05em;
    color: #fff;
    background: var(--ec-orange);
}
.live-forum-root .lf-msg-tag.lf-msg-tag--mod,
.live-forum-root .lf-msg-tag--mod {
    display: inline-block;
    margin: 0;
    color: var(--ec-navy);
    background: var(--ec-chip);
}

/* Cita del mensaje al que se responde */
.live-forum-root .lf-msg-quote {
    margin: 4px 0 2px;
    padding: 4px 8px;
    font-size: .72rem;
    line-height: 1.35;
    color: var(--ec-text);
    background: #f1f1f8;
    border: 0;
    border-radius: 6px;
}

/* ----- Acciones del moderador: barra de íconos con tooltip ----- */
.live-forum-root .lf-msg-actions {
    left: auto;
    right: 0;
    top: -4px;
    flex-wrap: nowrap;
    gap: 2px;
    padding: 3px;
    background: #fff;
    border: 1px solid #e1e1ec;
    border-radius: 10px;
    box-shadow: 0 8px 18px -10px rgba(42, 39, 133, .45);
}
.live-forum-root .lf-msg:focus-within .lf-msg-actions { display: flex; }
.live-forum-root .lf-msg-actions:not(:has(button:not([hidden]))) { display: none !important; }

/* el texto del botón queda oculto (pero lo leen los lectores de pantalla) y se muestra un ícono */
.live-forum-root :is(.forum-btn-reply, .forum-btn-question, .forum-btn-block, .forum-btn-del):is(*, :hover, :focus) {
    position: relative;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    padding: 0;
    font-size: 0;
    line-height: 0;
    color: var(--ec-navy);
    background: none;
    border: 0;
    border-radius: 7px;
    cursor: pointer;
}
.live-forum-root :is(.forum-btn-reply, .forum-btn-question, .forum-btn-block, .forum-btn-del)::before {
    content: "";
    width: 16px;
    height: 16px;
    background: currentColor;
    -webkit-mask: var(--ec-icon) center / contain no-repeat;
    mask: var(--ec-icon) center / contain no-repeat;
}
.live-forum-root .forum-btn-reply {
    --ec-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 14L4 9l5-5'/%3E%3Cpath d='M4 9h10a6 6 0 0 1 6 6v4'/%3E%3C/svg%3E");
}
.live-forum-root .forum-btn-question {
    --ec-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M9.5 9.5a2.5 2.5 0 1 1 3.5 2.3c-.6.3-1 .9-1 1.6V14'/%3E%3Cpath d='M12 17.5h.01'/%3E%3C/svg%3E");
}
.live-forum-root .forum-btn-block {
    --ec-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M5.6 5.6l12.8 12.8'/%3E%3C/svg%3E");
}
.live-forum-root .forum-btn-del {
    --ec-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16M10 11v6M14 11v6M6 7l1 13h10l1-13M9 7V4h6v3'/%3E%3C/svg%3E");
}
.live-forum-root :is(.forum-btn-reply, .forum-btn-question):hover { background: #f1f1f8; }
.live-forum-root :is(.forum-btn-block, .forum-btn-del):hover { color: var(--ec-danger); background: #fdeceb; }
/* mensaje ya marcado como pregunta: el botón queda encendido en naranja */
.live-forum-root .lf-msg--pregunta .forum-btn-question,
.live-forum-root .lf-msg--pregunta .forum-btn-question:hover { color: #fff; background: var(--ec-orange); }
.live-forum-root :is(.forum-btn-reply, .forum-btn-question, .forum-btn-block, .forum-btn-del):focus-visible { outline: 2px solid var(--ec-lilac); outline-offset: 1px; }

/* Tooltip */
.live-forum-root :is(.forum-btn-reply, .forum-btn-question, .forum-btn-block, .forum-btn-del)::after {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 5;
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    color: #fff;
    background: var(--ec-navy);
    border-radius: 8px;
    box-shadow: 0 8px 18px -8px rgba(22, 18, 79, .5);
    opacity: 0;
    transform: translateY(-3px);
    transition: opacity .15s, transform .15s;
    pointer-events: none;
}
.live-forum-root .forum-btn-reply::after { content: "Responder"; }
.live-forum-root .forum-btn-question::after { content: "Marcar como pregunta"; }
.live-forum-root .lf-msg--pregunta .forum-btn-question::after { content: "Quitar de preguntas"; }
.live-forum-root .forum-btn-block::after { content: "Bloquear usuario"; }
.live-forum-root .forum-btn-del::after { content: "Eliminar mensaje"; }
.live-forum-root :is(.forum-btn-reply, .forum-btn-question, .forum-btn-block, .forum-btn-del):is(:hover, :focus-visible)::after { opacity: 1; transform: none; }

/* ----- Caja para escribir ----- */
.live-forum-root .lf-forum-input {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    grid-template-areas: "as as" "in send" "ask ask";
    align-items: center;
    gap: 0 10px;
    margin: 0;
    padding: 14px 18px 16px;
    background: var(--ec-soft);
    border: 0;
    border-top: 1px solid #ececf3;
    border-radius: 0;
}
.live-forum-root .lf-forum-input > .lf-avatar { display: none; }
.live-forum-root .lf-input-wrap { display: contents; }
.live-forum-root .lf-input-label {
    grid-area: as;
    margin: 0 0 8px;
    font-size: .72rem;
    font-weight: 700;
    color: var(--ec-navy);
}
.live-forum-root .lf-input-label::before { content: "Comentando como "; font-weight: 500; color: var(--ec-muted); }
.live-forum-root input#forum-chat-input {
    grid-area: in;
    height: 44px;
    padding: 0 14px;
    font-size: .85rem;
    font-weight: 500;
    color: var(--ec-ink);
    background: #fff;
    border: 1px solid var(--ec-line-2);
    border-radius: 12px;
    box-shadow: none;
    outline: 0;
}
.live-forum-root input#forum-chat-input::placeholder { color: var(--ec-muted); }
.live-forum-root input#forum-chat-input:focus { border-color: var(--ec-lilac); box-shadow: 0 0 0 3px rgba(132, 134, 236, .25); }
.live-forum-root input#forum-chat-input:disabled { background: #f1f1f5; cursor: not-allowed; }

.live-forum-root .lf-btn-send,
.live-forum-root .lf-btn-send:hover,
.live-forum-root .lf-btn-send:focus {
    grid-area: send;
    width: 44px;
    height: 44px;
    padding: 0;
    color: #fff;
    background: var(--ec-orange);
    border: 0;
    border-radius: 50%;
}
.live-forum-root .lf-btn-send:hover:not(:disabled) { filter: brightness(1.06); }
.live-forum-root .lf-btn-send svg { width: 18px; height: 18px; }
.live-forum-root .lf-btn-send:focus-visible { outline: 3px solid var(--ec-lilac); outline-offset: 2px; }

.live-forum-root .lf-ask {
    grid-area: ask;
    gap: 8px;
    margin: 10px 0 0;
    font-size: .78rem;
    font-weight: 600;
    color: #3b3966;
}
.live-forum-root .lf-ask input { width: 16px; height: 16px; accent-color: var(--ec-navy); }


/* =====================================================================
 * 3. PANEL DEL MODERADOR (seccion="encuesta")
 * ===================================================================== */
.live-forum-root .lf-panel {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 20px;
    align-items: start; /* cada tarjeta mide lo que necesita (antes se estiraban y quedaban vacías) */
}
.live-forum-root .lf-panel > .lf-card {
    padding: 18px 20px 20px;
    background: #fff;
    border: 1px solid var(--ec-line);
    border-radius: 16px;
}

/* Títulos de tarjeta: a la izquierda, sin mayúsculas */
.live-forum-root .lf-card-title,
.live-forum-root .lf-results-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.3;
    text-align: left;
    text-transform: none;
    color: var(--ec-navy);
}
.live-forum-root .lf-card-head { margin-bottom: 14px; }
.live-forum-root .lf-card-head .lf-results-title { margin: 0; }
.live-forum-root .lf-count {
    min-width: 22px;
    margin: 0;
    padding: 2px 7px;
    font-size: .7rem;
    font-weight: 800;
    color: #fff;
    background: var(--ec-navy);
}

/* Mensajes vacíos */
.live-forum-root .lf-empty {
    margin: 0;
    padding: 18px;
    font-size: .82rem;
    text-align: center;
    color: var(--ec-muted);
    background: var(--ec-soft);
    border-radius: 12px;
}
.live-forum-root .lf-empty a { font-weight: 700; color: var(--ec-navy); }
.live-forum-root #lf-encuestas-empty { margin-bottom: 14px; }

/* ----- Encuestas: lista numerada (1, 2, 3…) ----- */
.live-forum-root .lf-preset-group { display: none; } /* el nombre de la charla ya está en la cabecera */
.live-forum-root .lf-preset-grid { grid-template-columns: 1fr; gap: 8px; margin: 0 0 14px; counter-reset: lf-poll; }

.live-forum-root .lf-btn-preset:is(*, :hover, :focus) {
    counter-increment: lf-poll;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    font-size: .82rem;
    font-weight: 700;
    line-height: 1.35;
    text-align: left;
    white-space: normal;
    color: var(--ec-ink);
    background: var(--ec-soft);
    border: 1.5px solid var(--ec-line);
    border-radius: 12px;
    box-shadow: none;
    transition: border-color .15s, background .15s;
}
.live-forum-root .lf-btn-preset::before {
    content: counter(lf-poll);
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    font-size: .72rem;
    font-weight: 800;
    color: var(--ec-navy);
    background: var(--ec-chip);
    border-radius: 50%;
}
.live-forum-root .lf-btn-preset::after {
    margin-left: auto;
    flex-shrink: 0;
    font-size: .66rem;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.live-forum-root .lf-btn-preset:hover:not(.is-selected):not(.is-live) { border-color: var(--ec-line-2); }
.live-forum-root .lf-btn-preset:focus-visible { outline: 3px solid var(--ec-lilac); outline-offset: 2px; }

/* Seleccionada */
.live-forum-root .lf-btn-preset.is-selected:is(*, :hover) { color: var(--ec-ink); background: #fff; border-color: var(--ec-navy); }
.live-forum-root .lf-btn-preset.is-selected::before { color: #fff; background: var(--ec-navy); }

/* Ya lanzada: check, fondo gris y borde punteado */
.live-forum-root .lf-btn-preset.is-done:is(*, :hover) { font-weight: 600; color: var(--ec-muted); background: #f1f1f5; border-style: dashed; border-color: #d6d6e2; }
.live-forum-root .lf-btn-preset.is-done::before { content: "✓"; color: #fff; background: #8a8aa3; }
.live-forum-root .lf-btn-preset.is-done::after { content: "Lanzada"; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--ec-text); }
.live-forum-root .lf-btn-preset.is-done.is-selected:is(*, :hover) { background: #fff; border-style: solid; border-color: #8a8aa3; }
.live-forum-root .lf-btn-preset.is-done.is-selected::before { background: var(--ec-text); }

/* En vivo: naranja */
.live-forum-root .lf-btn-preset.is-live:is(*, :hover) { font-weight: 700; color: var(--ec-ink); background: #fff; border-style: solid; border-color: var(--ec-orange); }
.live-forum-root .lf-btn-preset.is-live::before { content: counter(lf-poll); color: #fff; background: var(--ec-orange); }
.live-forum-root .lf-btn-preset.is-live::after { content: "En vivo"; letter-spacing: .05em; text-transform: uppercase; color: #b4540f; }

/* Lanzar / Cerrar */
.live-forum-root .lf-actions { justify-content: flex-start; gap: 10px; }
.live-forum-root :is(.lf-btn-launch, .lf-btn-close):is(*, :hover, :focus) {
    gap: 6px;
    height: 40px;
    padding: 0 16px;
    font-size: .78rem;
    font-weight: 700;
    border-radius: 999px;
}
.live-forum-root .lf-btn-launch:is(*, :hover, :focus) { color: #fff; background: var(--ec-orange); border: 0; }
.live-forum-root .lf-btn-close:is(*, :hover, :focus) { color: var(--ec-danger); background: #fff; border: 1.5px solid #f4c7c3; }
.live-forum-root .lf-btn-close:hover:not(:disabled) { filter: none; background: #fdeceb; }
.live-forum-root .lf-actions .lf-btn svg { width: 15px; height: 15px; }
.live-forum-root :is(.lf-btn-launch, .lf-btn-close):focus-visible { outline: 3px solid var(--ec-lilac); outline-offset: 2px; }

/* ----- Resultados ----- */
.live-forum-root .lf-results-q { margin: 0 0 12px; font-size: .75rem; color: var(--ec-muted); }
.live-forum-root .lf-result-row { margin-bottom: 12px; }
.live-forum-root .lf-result-head { margin-bottom: 5px; }
.live-forum-root .lf-result-label { font-size: .8rem; font-weight: 700; color: var(--ec-ink); }
.live-forum-root .lf-result-pct { font-size: .8rem; font-weight: 600; color: var(--ec-text); }
.live-forum-root .lf-result-track { height: 12px; background: #ececf3; }
/* !important: el JS pinta cada barra con su color; aquí todas van en azul y la más votada en naranja (clase .is-top) */
.live-forum-root .lf-result-fill { background: var(--ec-navy) !important; }
.live-forum-root .lf-result-row.is-top .lf-result-fill { background: var(--ec-orange) !important; }
.live-forum-root .lf-results-foot { border-top-color: #ececf3; }
.live-forum-root .lf-results-total { font-size: .75rem; color: var(--ec-muted); }

/* Botones secundarios: Descargar, Desbloquear, Actualizar */
.live-forum-root .lf-btn-soft:is(*, :hover, :focus) {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 12px;
    font-size: .72rem;
    font-weight: 700;
    color: var(--ec-navy);
    background: #fff;
    border: 1.5px solid var(--ec-navy);
    border-radius: 999px;
    transition: background .2s, color .2s;
}
.live-forum-root .lf-btn-soft:hover:not(:disabled) { color: #fff; background: var(--ec-navy); }
.live-forum-root .lf-btn-soft:focus-visible { outline: 3px solid var(--ec-lilac); outline-offset: 2px; }

/* ----- Preguntas para el expositor y usuarios bloqueados ----- */
.live-forum-root .lf-mini-list { display: grid; gap: 8px; max-height: 260px; }
.live-forum-root .lf-mini-list li {
    gap: 10px;
    padding: 8px 8px 8px 14px;
    font-size: .85rem;
    font-weight: 600;
    color: var(--ec-ink);
    background: var(--ec-soft);
    border: 0;
    border-radius: 10px;
}
.live-forum-root .lf-mini-text { color: var(--ec-ink); }
.live-forum-root .lf-mini-meta { font-size: .72rem; font-weight: 600; color: var(--ec-muted); }

.live-forum-root .lf-questions-list { max-height: 320px; }
.live-forum-root .lf-questions-list li { padding: 12px 14px; border: 1px solid var(--ec-line); border-radius: 12px; }
.live-forum-root .lf-questions-list .lf-mini-text { font-size: .88rem; font-weight: 500; line-height: 1.45; }


/* =====================================================================
 * 4. RESPONSIVE Y MOVIMIENTO REDUCIDO
 * ===================================================================== */
@media (max-width: 960px) {
    .live-forum-root .lf-panel { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .live-forum-root .lf-charla-hero { padding: 22px 20px 26px; border-radius: 16px; }
    .live-forum-root .lf-charla-hero .lf-charla-actual { font-size: 1.35rem; }
}
@media (prefers-reduced-motion: reduce) {
    .live-forum-root .lf-charla--live .lf-live-badge-dot::before,
    .live-forum-root .lf-charla--live .lf-live-badge-dot::after { animation: none; }
    .live-forum-root .lf-result-fill,
    .live-forum-root .lf-btn-preset,
    .live-forum-root .lf-btn-soft,
    .live-forum-root :is(.forum-btn-reply, .forum-btn-question, .forum-btn-block, .forum-btn-del)::after { transition: none; }
}
