/* AutoNews24 v5.0.0 — Public CSS (TTS Player + Chatbot Widget) */

/* ── Variables ──────────────────────────────────────────────── */
:root {
    --an24-red:    #c0392b;
    --an24-dark:   #1d2327;
    --an24-white:  #ffffff;
    --an24-gray:   #f0f0f1;
    --an24-border: #e0e0e0;
    --an24-radius: 12px;
}

/* ════════════════════════════════════════════════════════════
   TTS PLAYER
═══════════════════════════════════════════════════════════════ */
.an24-tts-player-public {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: var(--an24-white);
    border: 1px solid var(--an24-border);
    border-radius: var(--an24-radius);
    margin: 0 0 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.an24-tts-btn {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--an24-red);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
    transition: background .2s, transform .15s;
    position: relative;
}

.an24-tts-btn:hover  { background: #a93226; transform: scale(1.05); }
.an24-tts-btn:active { transform: scale(.97); }

.an24-tts-icon-loading {
    animation: an24-spin 1s linear infinite;
}

@keyframes an24-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.an24-tts-info { flex: 1; min-width: 0; }

.an24-tts-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--an24-dark);
    margin-bottom: 2px;
}

.an24-tts-meta {
    display: block;
    font-size: 11px;
    color: #888;
    margin-bottom: 7px;
}

.an24-tts-progress-bar {
    height: 4px;
    background: var(--an24-border);
    border-radius: 2px;
    overflow: hidden;
}

.an24-tts-progress-fill {
    height: 100%;
    width: 0;
    background: var(--an24-red);
    border-radius: 2px;
    transition: width .5s linear;
}

/* ════════════════════════════════════════════════════════════
   CHATBOT WIDGET
═══════════════════════════════════════════════════════════════ */
.an24-chatbot {
    position: fixed;
    z-index: 99999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
}

.an24-chatbot--bottom-right { bottom: 24px; right: 24px; }
.an24-chatbot--bottom-left  { bottom: 24px; left: 24px; }

/* FAB Button */
.an24-chatbot__fab {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: var(--an24-red);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 4px 16px rgba(192,57,43,.45);
    transition: transform .2s, box-shadow .2s;
    position: relative;
}

.an24-chatbot__fab:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(192,57,43,.55);
}

.an24-chatbot__fab .an24-fab-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 14px;
    height: 14px;
    background: #00a32a;
    border-radius: 50%;
    border: 2px solid #fff;
}

/* Chat window */
.an24-chatbot__window {
    display: none;
    position: absolute;
    bottom: 66px;
    right: 0;
    width: 320px;
    max-height: 460px;
    background: var(--an24-white);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,.18);
    overflow: hidden;
    flex-direction: column;
    border: 1px solid var(--an24-border);
}

.an24-chatbot--bottom-left .an24-chatbot__window {
    right: auto;
    left: 0;
}

.an24-chatbot__window.is-open {
    display: flex;
    animation: an24-slide-up .25s ease;
}

@keyframes an24-slide-up {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Header */
.an24-chatbot__header {
    background: var(--an24-red);
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.an24-chatbot__header-info {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #fff;
}

.an24-chatbot__avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.an24-chatbot__header-info strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    line-height: 1.2;
}

.an24-chatbot__status {
    display: block;
    font-size: 11px;
    color: rgba(255,255,255,.8);
    display: flex;
    align-items: center;
    gap: 4px;
}

.an24-chatbot__status::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #5fe07a;
}

.an24-chatbot__close {
    background: none;
    border: none;
    color: rgba(255,255,255,.8);
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
    padding: 2px 4px;
    border-radius: 4px;
    transition: background .15s;
}

.an24-chatbot__close:hover { background: rgba(255,255,255,.2); color: #fff; }

/* Messages */
.an24-chatbot__messages {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #f8f8f8;
    scroll-behavior: smooth;
}

.an24-chatbot__bubble {
    padding: 9px 13px;
    border-radius: 14px;
    font-size: 13px;
    line-height: 1.5;
    max-width: 88%;
    word-break: break-word;
}

.an24-chatbot__bubble--bot {
    background: var(--an24-white);
    color: var(--an24-dark);
    align-self: flex-start;
    border-radius: 14px 14px 14px 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,.07);
}

.an24-chatbot__bubble--user {
    background: var(--an24-red);
    color: #fff;
    align-self: flex-end;
    border-radius: 14px 14px 4px 14px;
}

.an24-chatbot__bubble--typing {
    background: var(--an24-white);
    align-self: flex-start;
    border-radius: 14px 14px 14px 4px;
    padding: 12px 16px;
}

.an24-chatbot__typing-dots {
    display: flex;
    gap: 4px;
    align-items: center;
}

.an24-chatbot__typing-dots span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #bbb;
    animation: an24-dot-bounce .9s infinite ease-in-out;
}

.an24-chatbot__typing-dots span:nth-child(2) { animation-delay: .15s; }
.an24-chatbot__typing-dots span:nth-child(3) { animation-delay: .3s; }

@keyframes an24-dot-bounce {
    0%, 60%, 100% { transform: translateY(0); }
    30%            { transform: translateY(-5px); }
}

/* Input area */
.an24-chatbot__input-area {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-top: 1px solid var(--an24-border);
    background: var(--an24-white);
    flex-shrink: 0;
}

.an24-chatbot__input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--an24-border);
    border-radius: 20px;
    font-size: 13px;
    font-family: inherit;
    color: var(--an24-dark);
    background: #f8f8f8;
    outline: none;
    transition: border-color .15s;
}

.an24-chatbot__input:focus {
    border-color: var(--an24-red);
    background: var(--an24-white);
}

.an24-chatbot__send {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--an24-red);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
    transition: background .15s, transform .1s;
}

.an24-chatbot__send:hover  { background: #a93226; }
.an24-chatbot__send:active { transform: scale(.93); }
.an24-chatbot__send:disabled { background: #ccc; cursor: not-allowed; }

.an24-chatbot__footer-note {
    text-align: center;
    font-size: 10px;
    color: #bbb;
    padding: 4px 12px 8px;
    margin: 0;
    background: var(--an24-white);
    flex-shrink: 0;
}

/* Scrollbar personalizado */
.an24-chatbot__messages::-webkit-scrollbar { width: 4px; }
.an24-chatbot__messages::-webkit-scrollbar-track { background: transparent; }
.an24-chatbot__messages::-webkit-scrollbar-thumb { background: #ddd; border-radius: 2px; }

.entry-content p,.post-content p{text-align:justify!important;line-height:1.8!important;}
.an24-fuente{font-size:12px;color:#888;border-top:1px solid #eee;padding-top:8px;margin-top:16px;}
