/* ==========================================
   TIMELINE / TWEET CARD (compartilhado entre feed, perfil, telausuario)
   ========================================== */
.timeline { margin-bottom: 36px; }

.timeline-container .tweet:first-child { padding-top: 20px; }

.tweet {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    padding: 20px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    transition: background 0.15s;
    cursor: pointer;
}
.tweet:hover { background: rgba(255,255,255,0.01); }

.tweet-avatar-wrap {
    flex-shrink: 0;
    cursor: pointer;
}

.tweet-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-ink, var(--accent, #c8a84b));
    font-size: 1.2rem;
    background: rgba(200,168,75,0.1);
    transition: opacity 0.2s;
}
.tweet-avatar-wrap:hover .tweet-avatar { opacity: 0.8; }

img.tweet-avatar {
    display: block;
}

.tweet-body { flex: 1; min-width: 0; }

.tweet-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
    flex-wrap: wrap;
}
.tweet-name { font-weight: 700; font-size: 0.88rem; cursor: pointer; color: var(--text, #e2e8f0); }
.tweet-name:hover { text-decoration: underline; }
.tweet-handle { font-size: 0.8rem; color: var(--muted, #64748b); }
.tweet-time { font-size: 0.8rem; color: var(--muted, #64748b); }
.tweet-dot { color: var(--muted, #64748b); font-size: 0.6rem; }

.tweet-text {
    font-size: 0.9rem;
    line-height: 1.55;
    margin-bottom: 10px;
    color: #cbd5e1;
}

.tweet-repost-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #22c55e;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    flex-basis: 100%;
    padding-left: 56px;
}
.tweet-repost-label i { font-size: 0.85rem; }

.tweet-media {
    display: flex;
    gap: 12px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    padding: 12px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: border-color 0.2s;
}
.tweet-media:hover { border-color: rgba(200,168,75,0.2); }

.tm-poster {
    width: 72px;
    height: 108px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--surface2, #111722);
}
.tm-poster-fallback {
    display: grid;
    place-items: center;
    color: var(--muted, #64748b);
    font-size: 1.4rem;
}
.tm-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.tm-title { font-size: 0.92rem; font-weight: 700; margin-bottom: 3px; color: var(--text, #e2e8f0); }
.tm-sub { font-size: 0.75rem; color: var(--muted, #64748b); margin-bottom: 6px; }
.tm-stars { display: flex; align-items: center; gap: 2px; }
.tm-stars .star-svg-inline { width: 0.95rem; height: 0.95rem; display: block; filter: drop-shadow(0 0 4px rgba(200,168,75,0.3)); }
.tm-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.68rem;
    font-weight: 600;
    margin-top: 6px;
    width: fit-content;
}
.badge-movie { background: rgba(59,130,246,0.12); color: #60a5fa; }
.badge-tv    { background: rgba(139,92,246,0.12); color: #a78bfa; }
.badge-game  { background: rgba(34,197,94,0.12);  color: #4ade80; }
.badge-book  { background: rgba(245,158,11,0.12); color: #fbbf24; }
.badge-music { background: rgba(236,72,153,0.12); color: #f472b6; }

.tweet-actions { display: flex; gap: 0; margin-left: -8px; }
.tw-action {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 50px;
    color: var(--muted, #64748b);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.15s;
    background: none;
    border: none;
    font-family: inherit;
}
.tw-action:hover { color: var(--accent-ink, var(--accent, #c8a84b)); background: rgba(200,168,75,0.08); }
.tw-action.liked { color: #ef4444; }
.tw-action.liked:hover { background: rgba(239,68,68,0.08); color: #ef4444; }
.tw-action.reposted { color: #22c55e; }
.tw-action:disabled { opacity: 0.4; cursor: default; }
.tw-action:disabled:hover { background: none; color: var(--muted, #64748b); }
.tw-action i { font-size: 0.9rem; }

/* Light theme */
.light-theme .tweet,
.light-theme-early .tweet { border-bottom-color: rgba(0,0,0,0.06); }
.light-theme .tweet-text,
.light-theme-early .tweet-text { color: #1a1a2e; }
.light-theme .tweet-media,
.light-theme-early .tweet-media {
    background: rgba(0,0,0,0.02);
    border-color: rgba(0,0,0,0.06);
}


/* Tema claro: ações e categorias fora de imagens usam cores de texto mais escuras. */
:is(html.light-theme-early, body.light-theme) .tweet:hover { background: var(--surface2); }
:is(html.light-theme-early, body.light-theme) .badge-movie { color: #1d4ed8; }
:is(html.light-theme-early, body.light-theme) .badge-tv { color: #6d28d9; }
:is(html.light-theme-early, body.light-theme) :is(.badge-game, .tweet-repost-label, .tw-action.reposted) { color: #047857; }
:is(html.light-theme-early, body.light-theme) .badge-book { color: #806117; }
:is(html.light-theme-early, body.light-theme) .badge-music { color: #be185d; }
