/* ══════════════════════════════════════════════════════════════════════
   Chatbot — Chat overlay + Login + Cookies + Citations + Leídos

   Extraído de credentials.css (Anti-Monolith Sección XIV). Concentra:
     - Mini-FAB en header del chat
     - Markdown dentro de burbujas del bot
     - Chat Insights Bar (top de mensajes — temas activos)
     - Micro-copy para anónimos + Login Overlay + Hint
     - Session Badge + Welcome message + toast bienvenida
     - Follow-up Question Chips
     - Cookie Consent Banner (GDPR)
     - Cited Article Cards (citas en respuestas del bot)
     - Botón "Leídos" en feed + Modal Leídos
     - CTA inline post-respuesta para anónimos
   ══════════════════════════════════════════════════════════════════════ */

/* ── Markdown dentro de burbujas del bot ── */
.message-bot.markdown-body { max-width: 92%; }
.message-bot.markdown-body p { margin: 0 0 1.4em; line-height: 1.75; }
.message-bot.markdown-body p:last-child { margin-bottom: 0; }
.message-bot.markdown-body strong { color: #c4b5fd; font-weight: 700; }
/* Streaming cursor — blinking caret while LLM generates */
.message-bot.streaming::after {
    content: '';
    display: inline-block;
    width: 2px;
    height: 1em;
    background: var(--accent, #7c3aed);
    margin-left: 2px;
    animation: streamCursorBlink 0.7s infinite;
    vertical-align: text-bottom;
}
@keyframes streamCursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}
.message-bot.markdown-body em { color: rgba(255,255,255,0.7); font-style: italic; }
.message-bot.markdown-body h1,
.message-bot.markdown-body h2,
.message-bot.markdown-body h3 {
    color: var(--accent);
    font-weight: 700;
    margin: 0.9em 0 0.35em;
    line-height: 1.3;
}
.message-bot.markdown-body h1 { font-size: 1.05rem; }
.message-bot.markdown-body h2 { font-size: 0.98rem; }
.message-bot.markdown-body h3 { font-size: 0.92rem; color: #a78bfa; }
.message-bot.markdown-body ul,
.message-bot.markdown-body ol {
    margin: 0.5em 0 1em 1.2em;
    padding: 0;
}
.message-bot.markdown-body li {
    margin-bottom: 1.2em;
    line-height: 1.75;
    padding-bottom: 0.5em;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.message-bot.markdown-body li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.message-bot.markdown-body hr {
    border: none;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin: 0.8em 0;
}
.message-bot.markdown-body code {
    background: rgba(124,77,255,0.15);
    border: 1px solid rgba(124,77,255,0.25);
    border-radius: 4px;
    padding: 1px 5px;
    font-size: 0.85em;
    font-family: 'JetBrains Mono', monospace;
    color: #c4b5fd;
}
/* Referencias inline tipo [[1]](url) */
.message-bot.markdown-body a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    text-decoration: none;
    font-size: 0.72em;
    vertical-align: baseline;
    line-height: 1;
    font-weight: 700;
    background: rgba(124,77,255,0.12);
    border: 1px solid rgba(124,77,255,0.30);
    border-radius: 4px;
    padding: 2px 5px;
    margin: 0 1px;
    transition: background 0.15s;
    white-space: nowrap;
    position: relative;
    top: -1px;
}
.message-bot.markdown-body a:hover {
    background: rgba(124,77,255,0.28);
    color: #c4b5fd;
}
.message-bot.markdown-body blockquote {
    border-left: 3px solid var(--accent);
    margin: 0.5em 0;
    padding: 0.3em 0.8em;
    background: rgba(124,77,255,0.06);
    border-radius: 0 6px 6px 0;
    color: rgba(255,255,255,0.7);
    font-style: italic;
}

.chat-input-area {
    padding: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.2);
}

/* Botón toggle de filtros (solo visible tras primera pregunta) */
.chat-filters-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 14px;
    margin-bottom: 12px;
    background: rgba(124, 77, 255, 0.08);
    border: 1px solid rgba(124, 77, 255, 0.15);
    border-radius: 10px;
    color: #c4b5fd;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-filters-toggle i {
    width: 16px;
    height: 16px;
}

.chat-filters-toggle .toggle-icon {
    margin-left: auto;
    transition: transform 0.3s ease;
}

.chat-filters-toggle:hover {
    background: rgba(124, 77, 255, 0.12);
    border-color: rgba(124, 77, 255, 0.3);
}

.chat-filters-toggle:not(.collapsed) .toggle-icon {
    transform: rotate(180deg);
}

/* Sección expandible (filtros + quick queries) */
.chat-expandable-section {
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-context-controls {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.chat-control-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.chat-control-group label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding-left: 4px;
}

.chat-control-group .input-glass {
    width: 100%;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-suggestions-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.chat-suggestion-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(124, 77, 255, 0.08);
    border: 1px solid rgba(124, 77, 255, 0.2);
    border-radius: 12px;
    color: #c4b5fd;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
}

.chat-suggestion-btn i {
    width: 18px;
    height: 18px;
    color: var(--accent);
}

/* ─── Chat Insights Bar ─────────────────────────────────────────── */
.chat-insights-bar {
    background: var(--surface, #0e1117);
    padding: 8px 12px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    overflow: hidden;
    transition: max-height 200ms ease-in-out, opacity 200ms ease-in-out, padding 200ms ease-in-out;
}
.chat-insights-bar.insights-hidden {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
}
.chat-insights-bar.insights-reappearing {
    border-left: 2px solid var(--accent, #7c3aed);
}
.insights-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}
.insights-label {
    color: #475569;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}
.insights-timer {
    display: flex;
    align-items: center;
    gap: 4px;
}
.insights-timer-bar {
    width: 36px;
    height: 3px;
    background: #1e2337;
    border-radius: 2px;
    overflow: hidden;
}
.insights-timer-fill {
    height: 100%;
    background: #6366f1;
    border-radius: 2px;
    width: 100%;
}
.insights-timer-count {
    color: #334155;
    font-size: 0.7rem;
}
.insights-chips {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}
.insight-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.82rem;
    cursor: pointer;
    white-space: nowrap;
    border: 1px solid;
    background: transparent;
    transition: border-color 150ms, color 150ms, opacity 150ms;
    font-family: inherit;
}
.insight-chip--news {
    color: #60a5fa;
    background: #0f1e30;
    border-color: #1e3a5f;
}
.insight-chip--news:hover {
    border-color: #3b82f6;
    color: #93c5fd;
}
.insight-chip--trend {
    color: #4ade80;
    background: #0a1f0e;
    border-color: #14532d;
}
.insight-chip--trend:hover {
    border-color: #22c55e;
    color: #86efac;
}
.insight-chip--used {
    opacity: 0.5;
    cursor: default;
    pointer-events: none;
}

.chat-suggestion-btn:hover {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(124, 77, 255, 0.2);
}

.chat-suggestion-btn:active {
    transform: translateY(0);
}

/* ── Micro-copy para anónimos ── */
.chat-anon-microcopy {
    text-align: center;
    font-size: 0.74rem;
    color: #a78bfa;
    padding: 6px 0 2px;
    font-weight: 500;
}

/* Textarea row */
.chat-textarea-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    margin-top: 12px;
}

.chat-textarea {
    flex: 1;
    resize: none;
    min-height: 40px;
    max-height: 120px;
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 0.875rem;
    line-height: 1.4;
    overflow-y: hidden;
}

.chat-send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
    transition: transform 0.15s, opacity 0.15s;
}
.chat-send-btn:hover { transform: scale(1.08); }
.chat-send-btn i { width: 18px; height: 18px; }

/* Typing indicator */
.typing-indicator {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 12px 16px !important;
    background: rgba(124,77,255,0.06) !important;
    border: 1px solid rgba(124,77,255,0.18) !important;
}
.typing-dots { display: flex; gap: 5px; align-items: center; }
.typing-dots span {
    width: 7px; height: 7px;
    background: var(--accent);
    border-radius: 50%;
    animation: typingBounce 1.3s infinite ease-in-out;
    box-shadow: 0 0 6px rgba(124,77,255,0.5);
}
.typing-dots span:nth-child(2) { animation-delay: 0.22s; }
.typing-dots span:nth-child(3) { animation-delay: 0.44s; }
.typing-label {
    font-size: 0.75rem;
    color: var(--accent);
    font-weight: 600;
    letter-spacing: 0.03em;
    animation: typingFade 1.6s infinite ease-in-out;
}
@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.35; }
    30% { transform: translateY(-5px); opacity: 1; }
}
@keyframes typingFade {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Entry animations */
@keyframes msgPop {
    from { opacity: 0; transform: translateY(10px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.chat-message {
    animation: msgPop 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* ── Chat Login Overlay ── */
.chat-login-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 14, 0.92);
    backdrop-filter: blur(12px);
    z-index: 10;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: msgPop 0.25s ease forwards;
}
.chat-login-card {
    background: #16161e;
    border: 1px solid rgba(124, 77, 255, 0.25);
    border-radius: 20px;
    padding: 32px 28px;
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}
.chat-login-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(124, 77, 255, 0.12);
    border: 1px solid rgba(124, 77, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
}
.chat-login-icon i { width: 26px; height: 26px; }
.chat-login-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
    text-align: center;
}
.chat-login-desc {
    font-size: 0.875rem;
    color: var(--text-dim);
    text-align: center;
    margin: 0;
    line-height: 1.6;
}
.chat-login-demo-user {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 12px 16px;
    width: 100%;
}
.chat-login-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}
.chat-login-user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.chat-login-user-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
}
.chat-login-user-email {
    font-size: 0.78rem;
    color: var(--text-dim);
}
.chat-login-btn {
    width: 100%;
    padding: 12px 20px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}
.chat-login-btn:hover { background: #6d28d9; transform: translateY(-1px); }
.chat-login-btn i { width: 16px; height: 16px; }
.chat-login-notice {
    font-size: 0.73rem;
    color: var(--text-dim);
    text-align: center;
    margin: 0;
    line-height: 1.5;
    opacity: 0.7;
}
.chat-login-notice a { color: var(--accent); text-decoration: none; }

/* ── Chat Login Hint (debajo del textarea) ── */
.chat-login-hint {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    color: var(--text-dim);
    padding: 4px 2px 0;
    opacity: 0.7;
}
.chat-login-hint a { color: var(--accent); text-decoration: none; }
.chat-login-hint a:hover { text-decoration: underline; }

/* ── Chat Session Badge (header) ── */
.chat-session-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(124, 77, 255, 0.12);
    border: 1px solid rgba(124, 77, 255, 0.25);
    border-radius: 20px;
    padding: 4px 10px 4px 4px;
    font-size: 0.75rem;
    color: var(--accent);
}
.chat-session-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.chat-session-name { font-weight: 600; }

/* ── Chat Session Welcome message ── */
.chat-session-welcome {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    background: rgba(124, 77, 255, 0.07);
    border-color: rgba(124, 77, 255, 0.2);
    max-width: 100%;
}
.chat-session-welcome strong { color: var(--accent); }

/* ── Toast temporal de bienvenida (animaciones desde abajo) ── */
@keyframes toastSlideIn {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes toastSlideOut {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(100%);
        opacity: 0;
    }
}

.chat-welcome-toast {
    position: relative;
    animation: toastSlideIn 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.chat-welcome-toast.exiting {
    animation: toastSlideOut 2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* ── Follow-up Question Chips ── */
.chat-follow-up-strip {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-self: flex-start;
    width: 100%;
    max-width: 92%;
    animation: msgPop 0.3s ease forwards;
}
.chat-follow-up-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    color: var(--text-dim);
    padding: 0 2px;
    opacity: 0.7;
}
.chat-follow-up-chip {
    display: flex;
    flex-direction: column;
    gap: 3px;
    align-items: flex-start;
    background: rgba(124, 77, 255, 0.06);
    border: 1px solid rgba(124, 77, 255, 0.2);
    border-radius: 12px;
    padding: 10px 14px;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s;
    width: 100%;
}
.chat-follow-up-chip:hover {
    background: rgba(124, 77, 255, 0.14);
    border-color: rgba(124, 77, 255, 0.45);
    transform: translateX(2px);
}
.chat-follow-up-q {
    font-size: 0.875rem;
    color: var(--text-main);
    font-weight: 500;
    line-height: 1.4;
}
.chat-follow-up-ctx {
    font-size: 0.72rem;
    color: var(--accent);
    opacity: 0.75;
    font-weight: 500;
    letter-spacing: 0.01em;
}

/* ── Cookie Consent Banner (GDPR) ── */
#cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    padding: 1rem 1.5rem;
    background: rgba(18, 18, 23, 0.95);
    border-top: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    animation: slideUpConsent 0.3s ease-out;
}
@keyframes slideUpConsent {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.cookie-consent-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: nowrap;
}
.cookie-consent-inner p {
    font-size: 0.95rem;
    color: var(--text-main);
    line-height: 1.6;
    white-space: nowrap;
}
.cookie-consent-inner a {
    color: var(--accent);
    text-decoration: underline;
}
.cookie-consent-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}
.cookie-btn {
    padding: 0.65rem 1.6rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--glass-border);
    transition: all 0.2s;
}
.cookie-btn-accept {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.cookie-btn-accept:hover { filter: brightness(1.15); }
.cookie-btn-reject {
    background: transparent;
    color: var(--text-dim);
}
.cookie-btn-reject:hover { background: var(--glass-hover); color: var(--text-main); }

@media (max-width: 767px) {
    .cookie-consent-inner {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    .cookie-consent-inner p {
        white-space: normal;
        font-size: 0.85rem;
    }
    .cookie-btn {
        padding: 0.55rem 1.2rem;
        font-size: 0.85rem;
    }
}

/* ── Chat: Cited Article Cards ───────────────────────────────── */
.chat-cited-section {
    margin: 10px 0 4px;
}
.chat-cited-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.28);
    margin-bottom: 8px;
}
.chat-cited-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent, #8b5cf6);
    box-shadow: 0 0 6px var(--accent, #8b5cf6);
    flex-shrink: 0;
}
.chat-cited-cards {
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.chat-cited-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    padding: 8px;
    transition: background 0.2s ease, transform 0.15s ease, border-color 0.2s ease;
    animation: citedCardIn 0.35s ease both;
}
.chat-cited-card:hover {
    background: rgba(139,92,246,0.1);
    border-color: rgba(139,92,246,0.3);
    transform: translateX(3px);
}
@keyframes citedCardIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.cited-card-img-wrap {
    width: 64px;
    height: 52px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(255,255,255,0.05);
}
.cited-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.cited-card-img-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(139,92,246,0.25), rgba(59,130,246,0.15));
    font-size: 20px;
    font-weight: 700;
    color: rgba(255,255,255,0.45);
}
.cited-card-img-skeleton {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,rgba(255,255,255,0.04) 25%,rgba(255,255,255,0.09) 50%,rgba(255,255,255,0.04) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
}
.cited-card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.cited-card-titulo {
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    color: rgba(255,255,255,0.82);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.cited-card-title-skeleton {
    height: 10px;
    width: 80%;
    border-radius: 4px;
    background: linear-gradient(90deg,rgba(255,255,255,0.04) 25%,rgba(255,255,255,0.09) 50%,rgba(255,255,255,0.04) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
}
.cited-card-temas {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.cited-card-tema {
    font-size: 9.5px;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: rgba(139,92,246,0.9);
    background: rgba(139,92,246,0.1);
    border: 1px solid rgba(139,92,246,0.2);
    border-radius: 4px;
    padding: 1px 5px;
    text-transform: lowercase;
}

/* ── Botón Leídos en feed ── */
.feed-read-history-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(124, 58, 237, 0.08);
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: 10px;
  color: var(--accent, #7c3aed);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.feed-read-history-btn:hover:not(.disabled) {
  background: rgba(124, 58, 237, 0.15);
  border-color: rgba(124, 58, 237, 0.4);
  transform: translateY(-1px);
}

.feed-read-history-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.feed-read-count {
  background: var(--accent, #7c3aed);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 8px;
  min-width: 20px;
  text-align: center;
}

.feed-read-history-btn.disabled .feed-read-count {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-dim);
}

/* ── Modal Leídos ── */
.read-history-overlay {
  position: fixed;
  inset: 0;
  z-index: 9990;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(20px);
  overflow-y: auto;
  padding: 32px;
}

.read-history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1400px;
  margin: 0 auto 24px;
}

.read-history-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.read-history-scope-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 6px;
  background: rgba(124, 58, 237, 0.15);
  color: var(--accent, #7c3aed);
  letter-spacing: 0.3px;
}

.read-history-close {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #8b949e;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.read-history-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.read-history-grid {
  max-width: 1400px;
  margin: 0 auto;
}

/* ── CTA inline post-respuesta (anónimos) ── */
.chat-anon-cta {
    background: rgba(124, 58, 237, 0.08);
    border: 1px solid rgba(124, 58, 237, 0.15);
    border-radius: 10px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.chat-anon-exhausted {
    background: rgba(124, 58, 237, 0.12);
    border: 1px solid rgba(124, 58, 237, 0.3);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    margin-top: 8px;
}

.chat-anon-blocked {
    margin-top: 8px;
}

