/* ═══════════════════════════════════════════
   Feed Agora — Timeline
   ═══════════════════════════════════════════ */

.tl-container { margin: 0 auto; }

/* Banner de novas atualizações (estilo Twitter) */
.tl-update-banner {
    position: sticky; top: 70px; z-index: 10;
    text-align: center; padding: 10px 20px; margin: -0.5rem 0 1rem;
    background: var(--bs-primary); color: #fff; border-radius: 10px;
    font-size: .85rem; font-weight: 600; cursor: pointer;
    box-shadow: 0 4px 12px rgba(102,126,234,0.3);
    transition: opacity 0.3s, transform 0.3s;
    animation: tl-slide-in 0.3s ease-out;
}
.tl-update-banner:hover { opacity: .9; }

/* Passado colapsável */
.tl-past-section { margin-top: 1.5rem; border-top: 1px dashed var(--bs-border-color); padding-top: 1rem; }
.tl-past-toggle {
    font-size: .78rem; color: var(--bs-secondary-color); cursor: pointer;
    display: flex; align-items: center; gap: 6px; margin-bottom: .75rem;
    background: none; border: none; padding: 0;
}
.tl-past-toggle:hover { color: var(--bs-primary); }
.tl-past-content { display: none; }
.tl-past-content.show { display: block; }

/* ── Header ── (rebrand 2026-05-28: roxo → teal pra unificar com a marca) */
.tl-header {
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
    color: white; padding: 16px 24px; border-radius: 14px;
    margin-bottom: 1.25rem; display: flex; align-items: center;
    justify-content: space-between; gap: 12px;
}
.tl-clock { font-size: 2rem; font-weight: 700; line-height: 1; }
.tl-date { font-size: .85rem; opacity: 0.9; }

/* ── Busca ── */
.tl-search { margin-bottom: 1.25rem; }

/* ── Seletor de dias ── */
.tl-days {
    display: flex; gap: 8px; overflow-x: auto; padding: 4px 0;
    margin-bottom: 1.25rem; scrollbar-width: none;
    max-width: 100%; touch-action: pan-x;
    -webkit-overflow-scrolling: touch; scroll-behavior: smooth;
}
.tl-days::-webkit-scrollbar { display: none; }
.tl-day-btn {
    flex-shrink: 0; padding: 8px 0; border: 2px solid var(--bs-border-color);
    border-radius: 14px; background: var(--bs-body-bg); cursor: pointer;
    text-align: center; transition: all 0.2s; position: relative;
    width: 68px; color: var(--bs-body-color);
}
.tl-day-btn:hover { border-color: var(--bs-primary); color: var(--bs-primary); }
.tl-day-btn.active {
    background: var(--bs-primary); border-color: var(--bs-primary); color: #fff;
    box-shadow: 0 2px 8px rgba(79,70,229,0.3);
}
.tl-day-btn .day-label {
    display: block; font-size: .6rem; text-transform: uppercase; font-weight: 600; opacity: .6;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tl-day-btn .day-num { display: block; font-size: 1.1rem; font-weight: 700; line-height: 1.3; }
.tl-day-btn .day-dot {
    position: absolute; top: 5px; right: 5px; width: 6px; height: 6px;
    border-radius: 50%; background: var(--bs-success);
}
.tl-day-btn.active .day-label { opacity: 1; color: rgba(255,255,255,.85); }
.tl-day-btn.active .day-num { color: #fff; }
.tl-day-btn.empty { opacity: .45; }
.tl-day-btn.today:not(.active) .day-label { color: var(--bs-primary); font-weight: 700; opacity: 1; }

/* ── Botões de contexto ──
   Sprint 2026-05-03 v8 → ajuste 2026-06-01: ANTES era scroll horizontal com
   scrollbar escondida. Funcionava no touch (swipe mobile), mas no desktop — e
   em janela estreita sem touch — não havia barra nem swipe, então os chips que
   passavam da direita ("Comunicação &…") ficavam INACESSÍVEIS. Agora os chips
   QUEBRAM em linhas (flex-wrap) em qualquer largura: todos sempre visíveis, sem
   depender de scroll/affordance. Cada chip mantém-se inteiro (white-space:nowrap
   + flex-shrink:0), só vai pra próxima linha. */
.tl-contexts {
    display: flex; flex-wrap: wrap; gap: 8px;
    margin-bottom: 1.5rem; padding-bottom: 2px;
    max-width: 100%;
}
.tl-ctx-btn {
    padding: 8px 16px; border: 2px solid var(--bs-border-color);
    border-radius: 24px; background: var(--bs-body-bg); cursor: pointer;
    font-weight: 600; font-size: .85rem; transition: all 0.2s;
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--bs-body-color); white-space: nowrap; flex-shrink: 0;
}
.tl-ctx-btn:hover { border-color: var(--bs-primary); color: var(--bs-primary); }
.tl-ctx-btn.active { background: var(--bs-primary); border-color: var(--bs-primary); color: #fff; }
.tl-ctx-btn .ctx-count {
    font-size: .65rem; padding: 1px 6px; border-radius: 10px;
    background: rgba(0,0,0,0.08); font-weight: 700; min-width: 18px; text-align: center;
}
.tl-ctx-btn.active .ctx-count { background: rgba(255,255,255,0.25); }

/* ── Timeline ── */
.tl-timeline { position: relative; padding-left: 72px; min-height: 200px; }

/* Linha vertical */
.tl-timeline::before {
    content: ''; position: absolute; left: 56px; top: 0; bottom: 0;
    width: 3px; background: var(--bs-border-color); border-radius: 2px;
}

/* Grupo de hora */
.tl-hour-group { position: relative; margin-bottom: 2.5rem; }

/* Label de hora */
.tl-hour-label {
    position: absolute; left: -72px; top: 0; width: 52px;
    text-align: right; font-size: .85rem; font-weight: 700;
    color: var(--bs-secondary-color); line-height: 1;
    padding-top: 2px;
}

/* Dot na linha do tempo */
.tl-hour-dot {
    position: absolute; left: -20px; top: 4px;
    width: 11px; height: 11px; border-radius: 50%;
    background: var(--bs-border-color); border: 2px solid var(--bs-body-bg);
    z-index: 1;
}

/* ── NOW marker ── */
.tl-hour-group.tl-now .tl-hour-label {
    color: var(--bs-primary); font-size: .95rem;
}
.tl-hour-group.tl-now .tl-hour-dot {
    background: var(--bs-primary); width: 13px; height: 13px;
    box-shadow: 0 0 0 4px rgba(102,126,234,0.2);
    animation: tl-pulse 2s infinite;
}
/* Sprint 2026-05-03: aumentado top de 20px → 28px pra evitar sobreposição
   visual com tl-hour-label (font .95rem ~15px + 5px gap = legível). */
.tl-hour-group.tl-now::after {
    content: 'AGORA'; position: absolute; left: -72px; top: 28px;
    font-size: .55rem; font-weight: 800; color: var(--bs-primary);
    text-align: right; width: 52px; letter-spacing: .5px;
    background: var(--bs-body-bg); padding: 1px 0;
}

/* Sprint 2026-05-03 v7: action banner contextual ("HORA DO ALMOÇO" → /onde-comer)
   z-index: 2 + position: relative pra ficar ACIMA da timeline-vertical-line
   (que cai por trás senão e cruza visualmente o texto). */
.tl-action-banner {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 18px; margin: 0 0 1.5rem -56px;
    background: linear-gradient(135deg, var(--bs-primary) 0%, #4c5fd5 100%);
    color: #fff; border-radius: 14px; text-decoration: none;
    box-shadow: 0 4px 16px rgba(102,126,234,0.25);
    transition: transform .15s, box-shadow .15s;
    position: relative; z-index: 2;
}
.tl-action-banner:hover {
    transform: translateY(-2px); color: #fff;
    box-shadow: 0 6px 22px rgba(102,126,234,0.35);
}
.tl-action-icon { font-size: 1.8rem; line-height: 1; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; background: rgba(255,255,255,0.18); border-radius: 12px; }
.tl-action-icon .bi { font-size: 1.6rem; }
.tl-action-text { display: flex; flex-direction: column; flex: 1; gap: 3px; }
.tl-action-label {
    font-size: .9rem; font-weight: 700; letter-spacing: .5px;
    text-transform: uppercase;
}
.tl-action-hint { font-size: .75rem; opacity: .85; }

/* ── Sugestão de momento (2026-07-29, dono) ─────────────────────────────────
   Substitui o .tl-action-banner no /feed-agora. O banner era gradiente de
   largura TOTAL com margin-left -56px (entrava na régua da timeline): com o dia
   vazio ele aparecia acima do "nada mais programado" e lia como TÍTULO da seção
   de baixo — "HORA DO JANTAR" seguido de "nada programado" se contradiz.
   Aqui: cartão neutro, largura do conteúdo (cheia no celular), FORA da régua,
   sem sombra colorida. Cores por variável do Bootstrap — tema escuro herda
   sozinho, e cor clara fixa aqui viraria texto ilegível no dark. */
.tl-suggest {
    display: flex;
    align-items: center;
    gap: 10px 12px;
    flex-wrap: wrap;
    /* Largura da COLUNA, não do conteúdo (dono, 07-30: "na largura da
       janela"). fit-content deixava o cartão perdido em tela grande. */
    width: 100%;
    margin: .25rem 0 1.5rem;
    padding: 12px 14px;
    background: var(--bs-tertiary-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 12px;
}
.tl-suggest-eyebrow {
    flex: 0 0 100%;
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .6px;
    text-transform: uppercase;
    color: var(--bs-secondary-color);
}
.tl-suggest-moment {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: .82rem;
    font-weight: 600;
    color: var(--bs-body-color);
}
.tl-suggest-moment .bi { font-size: 1rem; color: #d97706; }
.tl-suggest-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    /* Com o cartão em largura total, o botão ancora na DIREITA — o texto fica
       à esquerda e a ação na ponta, padrão de linha de lista. */
    margin-left: auto;
    padding: 7px 13px;
    border-radius: 999px;
    background: var(--bs-primary);
    color: #fff;
    font-size: .78rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: filter .15s;
}
.tl-suggest-cta:hover,
.tl-suggest-cta:focus-visible { color: #fff; filter: brightness(1.1); }
@media (max-width: 575.98px) {
    /* No celular o botão vira bloco — alvo de toque confortável em vez de
       pílula estreita no canto. */
    .tl-suggest-cta { width: 100%; justify-content: center; padding: 9px 13px; }
}
@media (min-width: 768px) {
    /* Tela grande: tipografia maior (a largura já é a da coluna). */
    .tl-suggest { padding: 16px 20px; gap: 12px 16px; }
    .tl-suggest-eyebrow { font-size: .74rem; }
    .tl-suggest-moment { font-size: .95rem; }
    .tl-suggest-moment .bi { font-size: 1.2rem; }
    .tl-suggest-cta { font-size: .85rem; padding: 9px 18px; }
}

/* Sprint 2026-05-03 v7: seções principais (A SEGUIR + Acontecendo + Promo) */
.tl-period-sep.tl-period-primary span {
    background: var(--bs-primary); color: #fff;
    padding: 6px 14px; border-radius: 999px;
    font-size: .85rem; font-weight: 700;
}
.tl-period-sep.tl-period-secondary span {
    background: #fee2e2; color: #b91c1c;
    padding: 4px 12px; border-radius: 999px;
    font-size: .75rem; font-weight: 700;
}
.tl-upcoming-section, .tl-inprogress-section, .tl-past-section-v2, .tl-promo-section {
    display: flex; flex-direction: column; gap: 12px;
    padding-left: 0;
}
.tl-upcoming-section .tl-item {
    border-left: 3px solid var(--bs-primary);
}
.tl-inprogress-section .tl-item {
    border-left: 3px solid #dc2626;
}
.tl-promo-section .tl-item { opacity: .92; }
.tl-past-section-v2 .tl-item { opacity: .55; }

/* Collapse sections (details/summary nativo, estilizado) */
.tl-collapse {
    margin: 1rem 0;
    border-top: 1px dashed var(--bs-border-color);
    padding-top: .75rem;
}
.tl-collapse summary {
    cursor: pointer; padding: 8px 12px;
    font-size: .85rem; font-weight: 600; color: var(--bs-secondary-color);
    list-style: none; user-select: none;
    border-radius: 8px;
    transition: background .15s;
}
.tl-collapse summary:hover {
    background: var(--bs-tertiary-bg);
}
.tl-collapse summary::-webkit-details-marker { display: none; }
.tl-collapse[open] summary {
    color: var(--bs-body-color); font-weight: 700; margin-bottom: 12px;
}
.tl-promo-collapse { border-top-color: rgba(245,158,11,0.4); }
.tl-promo-collapse summary { color: #b45309; }
.tl-promo-urgent {
    background: #ef4444; color: #fff;
    padding: 1px 8px; border-radius: 999px;
    font-size: .65rem; font-weight: 700; margin-left: 6px;
}

/* Sprint 2026-05-03 v2: NOW divider — separador horizontal claro entre
   passado/presente e futuro. Substitui hour-group vazio "16:00 + AGORA"
   que sobrepunha visualmente o label da próxima hora. */
.tl-now-divider {
    display: flex; align-items: center; justify-content: space-between;
    margin: 1.5rem -16px 1rem -56px; padding: 0 8px;
    position: relative; gap: 12px;
}
.tl-now-divider::before {
    content: ''; position: absolute; left: 16px; right: 16px;
    top: 50%; height: 2px; background: var(--bs-primary); opacity: .3;
    z-index: 0;
}
.tl-now-pill {
    background: var(--bs-primary); color: #fff;
    padding: 4px 12px; border-radius: 999px;
    font-size: .7rem; font-weight: 700; letter-spacing: .3px;
    z-index: 1; position: relative;
}
.tl-now-future-label {
    background: var(--bs-body-bg); padding: 2px 10px;
    color: var(--bs-secondary-color); font-size: .65rem;
    font-weight: 600; text-transform: uppercase; letter-spacing: .5px;
    z-index: 1; position: relative;
}
.tl-now-empty-card {
    display: flex; align-items: center; gap: 14px;
    margin: -.25rem 0 1rem -40px;
    padding: 14px 16px;
    border: 1px solid rgba(14, 165, 233, .22);
    background: color-mix(in srgb, var(--bs-tertiary-bg) 82%, transparent);
    border-radius: 14px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .08);
}
.tl-now-empty-icon {
    width: 38px; height: 38px; flex: 0 0 38px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 12px;
    color: #0891b2;
    background: rgba(14, 165, 233, .14);
}
.tl-now-empty-copy {
    flex: 1; min-width: 0;
    display: flex; flex-direction: column; gap: 2px;
}
.tl-now-empty-copy strong { font-size: .92rem; }
.tl-now-empty-copy span {
    color: var(--bs-secondary-color);
    font-size: .78rem;
    line-height: 1.35;
}
.tl-now-empty-actions {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.tl-now-empty-actions a,
.tl-now-empty-actions button {
    border: 1px solid var(--bs-border-color);
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
    border-radius: 999px;
    padding: 6px 10px;
    font-size: .75rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}
.tl-now-empty-actions a:hover,
.tl-now-empty-actions button:hover {
    border-color: #0ea5e9;
    color: #0284c7;
}

/* Horas passadas */
.tl-hour-group.tl-past .tl-hour-label { opacity: .4; }
.tl-hour-group.tl-past .tl-hour-dot { opacity: .4; }
.tl-hour-group.tl-past .tl-item { opacity: .5; }

/* ── Cards da timeline ── */
.tl-items { display: flex; flex-direction: column; gap: 14px; }

.tl-item {
    display: flex; gap: 14px; padding: 16px 18px;
    border: 1px solid var(--bs-border-color); border-radius: 14px;
    background: var(--bs-body-bg); text-decoration: none; color: inherit;
    transition: all 0.25s; position: relative; overflow: hidden;
    align-items: center;
}
.tl-item:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); border-color: var(--bs-primary); color: inherit; }

/* Ao vivo / aberto agora */
.tl-item.tl-live {
    border-left: 4px solid var(--bs-primary);
    background: linear-gradient(90deg, rgba(102,126,234,.04) 0%, transparent 30%);
}

/* Promoção ativa */
.tl-item.tl-promo {
    border-left: 4px solid var(--bs-success);
    background: linear-gradient(90deg, rgba(25,135,84,.04) 0%, transparent 30%);
}

/* Empresa fechada (item acontecendo hoje mas negócio está fechado agora) */
.tl-item.tl-closed {
    opacity: .7;
    border-left: 4px solid var(--bs-secondary-color);
}
.tl-item.tl-closed .tl-item-title { color: var(--bs-secondary-color); }
.tl-item.tl-closed:hover { opacity: .95; }

/* Item futuro ("Aproveite Amanhã", outros dias) — NÃO é fechado, é programado */
.tl-item.tl-upcoming {
    border-left: 4px solid #0891b2;
    background: linear-gradient(90deg, rgba(8, 145, 178, 0.04) 0%, transparent 30%);
}
[data-bs-theme='dark'] .tl-item.tl-upcoming {
    border-left-color: #22d3ee;
    background: linear-gradient(90deg, rgba(34, 211, 238, 0.06) 0%, transparent 30%);
}

.tl-item-logo {
    width: 44px; height: 44px; border-radius: 10px;
    object-fit: cover; flex-shrink: 0;
}
/* Sprint 2026-05-03 v8: foto da publicação (maior que logo, mais impacto visual). */
.tl-item-img {
    width: 84px; height: 84px; border-radius: 12px;
    object-fit: cover; flex-shrink: 0; background: var(--bs-tertiary-bg);
}
.tl-item-img-broken { display: none; }
.tl-item-placeholder {
    width: 44px; height: 44px; border-radius: 10px;
    flex-shrink: 0; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--bs-primary) 0%, #4c5fd5 100%);
    color: #fff; font-weight: 700; font-size: 1.25rem;
}
@media (max-width: 600px) {
    /* Bug fix 2026-05-11: redesign card timeline em mobile.
       Antes: img esquerda + body meio + meta direita → cramped, título cortava ("Piz..."),
       "Ao vivo" quebrava 2 linhas, badges no canto direito ocupavam coluna inteira.
       Agora: stack mais leve — imagem menor à esquerda, body com 2 linhas no título,
       meta vira inline embaixo em vez de coluna lateral. Badges fluem horizontal. */
    .tl-item {
        padding: 10px 12px;
        gap: 10px;
        flex-wrap: wrap;
        align-items: flex-start;
    }
    .tl-item-img { width: 56px; height: 56px; border-radius: 8px; }
    .tl-item-logo { width: 40px; height: 40px; border-radius: 8px; }
    .tl-item-placeholder { width: 40px; height: 40px; border-radius: 8px; font-size: 1rem; }
    .tl-item-body { flex: 1 1 calc(100% - 70px); min-width: 0; }
    .tl-item-title {
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        font-size: .9rem;
        line-height: 1.25;
    }
    .tl-item-sub {
        font-size: .7rem;
        gap: 4px 8px;
        flex-wrap: wrap;
    }
    /* Meta vira faixa horizontal abaixo do body — não compete por largura lateral */
    .tl-item-meta {
        flex: 1 1 100%;
        text-align: left;
        min-width: 0;
        font-size: .68rem;
        margin-top: 4px;
        padding-top: 6px;
        border-top: 1px dashed var(--bs-border-color);
        display: flex;
        flex-wrap: wrap;
        gap: 6px 10px;
        align-items: center;
    }
    .tl-item-meta > * { display: inline-flex; align-items: center; margin: 0; }
    .tl-item-meta > div { font-size: .7rem; }
    .tl-item-badge { font-size: .58rem; padding: 2px 6px; }
}
.tl-item-body { flex: 1; min-width: 0; }
.tl-item-title {
    font-size: .92rem; font-weight: 600; line-height: 1.3; margin-bottom: 2px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tl-item-sub {
    font-size: .76rem; color: var(--bs-secondary-color);
    display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.tl-item-meta {
    flex-shrink: 0; text-align: right; font-size: .72rem;
    color: var(--bs-secondary-color); min-width: 60px;
}
.tl-item-badge {
    font-size: .6rem; font-weight: 700; padding: 2px 8px;
    border-radius: 4px; display: inline-block; margin-top: 2px;
}
.tl-badge-live { background: var(--bs-primary); color: #fff; animation: tl-pulse 2s infinite; }
.tl-badge-promo { background: var(--bs-success); color: #fff; }
.tl-badge-event { background: #7c3aed; color: #fff; }
/* ⭐ Destaque da cidade (mig 604): selo e card compacto dos eventos que a
   equipe destacou, com a data explícita — nunca misturado com "agora". */
.tl-badge-featured { background: linear-gradient(90deg, #f59e0b, #ef4444); color: #fff; }
.tl-featured-section { display: flex; flex-direction: column; gap: .6rem; margin: .25rem 0 1rem; }
.tl-featured-card {
    display: grid; grid-template-columns: 72px 1fr auto; gap: .75rem; align-items: center;
    padding: .6rem .75rem; border-radius: 14px; text-decoration: none; color: inherit;
    background: var(--bs-body-bg); border: 1px solid var(--bs-border-color);
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.tl-featured-card:hover { border-color: #f59e0b; color: inherit; }
.tl-featured-img { width: 72px; height: 72px; border-radius: 10px; object-fit: cover; background: var(--bs-tertiary-bg); }
.tl-featured-logo { object-fit: contain; padding: 6px; }
.tl-featured-ph { display: flex; align-items: center; justify-content: center; color: #f59e0b; font-size: 1.4rem; }
.tl-featured-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tl-featured-body .tl-item-badge { align-self: flex-start; }
.tl-featured-title { font-size: .95rem; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tl-featured-when { font-size: .82rem; font-weight: 600; color: var(--bs-body-color); }
.tl-featured-when small { font-weight: 500; color: var(--bs-secondary-color); }
.tl-featured-where, .tl-featured-company { font-size: .78rem; color: var(--bs-secondary-color); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-featured-wa { background: #25d366; color: #fff; width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 1.1rem; cursor: pointer; }
@media (max-width: 480px) {
    .tl-featured-card { grid-template-columns: 56px 1fr auto; gap: .55rem; padding: .5rem .6rem; }
    .tl-featured-img { width: 56px; height: 56px; }
}
/* Sprint G8 Fase 6 (2026-05-09): badge discreto pra publicação auto-signal
   gerada pelo cron updateSignals (não-pulsante, lower-case, cinza) */
.tl-badge-update {
    background: var(--bs-secondary-bg); color: var(--bs-secondary-color);
    font-weight: 500; text-transform: lowercase; letter-spacing: .02em;
}
.tl-item.tl-auto-signal { opacity: .82; }
.tl-item.tl-auto-signal .tl-item-title { font-weight: 500; }

.tl-item-price {
    font-size: .82rem; font-weight: 700; color: var(--bs-success); margin-top: 2px;
}

/* ── Separador de período ── */
.tl-period-sep {
    position: relative; text-align: center; margin: 2rem 0 1.5rem -72px;
    padding-left: 72px;
}
.tl-period-sep span {
    background: var(--bs-body-bg); padding: 0 16px; position: relative; z-index: 1;
    font-size: .8rem; font-weight: 700; color: var(--bs-secondary-color);
    text-transform: uppercase; letter-spacing: 1px;
}
.tl-period-sep::after {
    content: ''; position: absolute; left: 72px; right: 0;
    top: 50%; height: 1px; background: var(--bs-border-color);
}

/* ── Contexto temporal (banner) ── */
.tl-time-context {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 16px; border-radius: 12px; margin-bottom: 1.25rem;
    font-size: .85rem; font-weight: 500;
}
.tl-time-context.morning { background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%); color: #92400e; }
.tl-time-context.lunch   { background: linear-gradient(135deg, #fed7aa 0%, #fdba74 100%); color: #9a3412; }
.tl-time-context.afternoon { background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%); color: #1e40af; }
.tl-time-context.evening { background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%); color: #3730a3; }
.tl-time-context.night   { background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%); color: #c7d2fe; }

/* ── Estado vazio ── */
.tl-empty {
    text-align: center; padding: 3rem 1.5rem; margin-left: -72px;
}
.tl-empty-icon { font-size: 2.5rem; margin-bottom: 1rem; opacity: .5; }
.tl-empty-title { font-size: 1.1rem; font-weight: 600; margin-bottom: .5rem; }
.tl-empty-text { font-size: .85rem; color: var(--bs-secondary-color); margin-bottom: 1rem; }
.tl-empty-cta {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 10px 24px; background: var(--bs-primary); color: #fff;
    border-radius: 10px; text-decoration: none; font-weight: 600;
    transition: opacity 0.2s;
}
.tl-empty-cta:hover { opacity: .9; color: #fff; }

/* ── Loading ── */
.tl-loading { text-align: center; padding: 3rem 0; margin-left: -72px; }

/* ── Animações ── */
@keyframes tl-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .6; }
}
.tl-item-enter {
    animation: tl-slide-in 0.4s ease-out;
}
@keyframes tl-slide-in {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Dark mode ── */
[data-bs-theme='dark'] .tl-item { border-color: #333; }
[data-bs-theme='dark'] .tl-item:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.3); }
[data-bs-theme='dark'] .tl-day-btn { border-color: #444; }
[data-bs-theme='dark'] .tl-ctx-btn { border-color: #444; }
[data-bs-theme='dark'] .tl-timeline::before { background: #444; }
[data-bs-theme='dark'] .tl-hour-dot { background: #555; border-color: var(--bs-body-bg); }
[data-bs-theme='dark'] .tl-ctx-btn .ctx-count { background: rgba(255,255,255,0.1); }

/* ── Responsivo ── */
@media (max-width: 600px) {
    .tl-timeline { padding-left: 56px; }
    .tl-timeline::before { left: 40px; }
    .tl-hour-label { left: -56px; width: 36px; font-size: .75rem; }
    .tl-hour-group.tl-now::after { left: -56px; width: 36px; top: 22px; }
    .tl-hour-dot { left: -20px; }
    .tl-clock { font-size: 1.6rem; }
    .tl-ctx-btn { padding: 8px 14px; font-size: .8rem; }
    .tl-item { padding: 10px 12px; gap: 10px; }
    .tl-item-logo { width: 36px; height: 36px; }
    .tl-empty, .tl-loading { margin-left: -56px; }
    .tl-period-sep { margin-left: -56px; padding-left: 56px; }
    .tl-period-sep::after { left: 56px; }
    .tl-now-empty-card {
        margin-left: -56px;
        align-items: flex-start;
        flex-direction: column;
    }
    .tl-now-empty-actions { width: 100%; }
}
@media (max-width: 375px) {
    .tl-timeline { padding-left: 44px; }
    .tl-timeline::before { left: 28px; }
    .tl-hour-label { left: -44px; width: 28px; font-size: .65rem; }
    .tl-hour-group.tl-now::after { left: -44px; width: 28px; font-size: .5rem; top: 18px; }
    .tl-hour-dot { left: -20px; width: 9px; height: 9px; }
    .tl-header { padding: 12px 14px; }
    .tl-clock { font-size: 1.3rem; }
    .tl-item-title { font-size: .82rem; }
    .tl-item-sub { font-size: .68rem; }
    .tl-empty, .tl-loading { margin-left: -44px; }
    .tl-period-sep { margin-left: -44px; padding-left: 44px; }
    .tl-period-sep::after { left: 44px; }
    .tl-now-empty-card { margin-left: -44px; }
}

/* ── Grupo de blocos da cidade (#tlAside) ─────────────────────────────────
   2026-08-04: plantão, "atendem fora do horário", "chegou agora", "hoje na
   cidade" e "movimento" agora moram num grupo só, que o JS posiciona ABAIXO
   da agenda quando o dia tem evento. Com 2+ blocos, as pílulas mostram um
   por vez em vez de empilhar tudo. */
.tl-aside { margin-top: 1.5rem; }
.tl-aside-pills {
    display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px;
    max-width: 100%;
}
.tl-aside-pill {
    padding: 7px 14px; border: 2px solid var(--bs-border-color);
    border-radius: 24px; background: var(--bs-body-bg); cursor: pointer;
    font-weight: 600; font-size: .82rem; transition: all 0.2s;
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--bs-body-color); white-space: nowrap; flex-shrink: 0;
}
.tl-aside-pill:hover { border-color: var(--bs-primary); color: var(--bs-primary); }
.tl-aside-pill.active {
    background: var(--bs-primary); border-color: var(--bs-primary); color: #fff;
}
[data-bs-theme='dark'] .tl-aside-pill { border-color: #444; }

@media (max-width: 600px) {
    .tl-aside-pill { padding: 7px 12px; font-size: .78rem; }
}

/* ── Zap do card (2026-08-04) ─────────────────────────────────────────────
   O card inteiro é um link, então o botão é um <span role="button"> com
   delegação de clique. Verde da marca com texto verde-escuro: o branco sobre
   #25D366 dá 1,98:1 (ilegível) — mesma correção já feita no "atendem fora do
   horário". Botão preenchido, não depende do tema da página. */
.tl-item-wa {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; margin-top: 4px;
    border-radius: 50%; background: #25D366; color: #06301A;
    font-size: .95rem; line-height: 1; cursor: pointer; flex: 0 0 auto;
    transition: transform .15s, filter .15s;
}
.tl-item-wa:hover { filter: brightness(1.06); transform: scale(1.06); }
.tl-item-wa:focus-visible { outline: 2px solid var(--bs-primary); outline-offset: 2px; }

/* ── Estado vazio do Agora (2026-08-14) ───────────────────────────────────
   Dia sem agenda passa a mostrar dois blocos: quem está aberto no MOMENTO
   (comida, pelo horário) e quantas empresas estão abertas agora. */
.tl-suggest-places {
    flex: 0 0 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 2px;
}
.tl-suggest-place {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px 6px 6px;
    border-radius: 999px;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    text-decoration: none;
    color: var(--bs-body-color);
    max-width: 100%;
}
.tl-suggest-place:hover { border-color: var(--bs-primary); }
.tl-suggest-place-logo {
    width: 26px; height: 26px; border-radius: 50%;
    object-fit: cover; flex: 0 0 auto;
    background: var(--bs-tertiary-bg);
}
.tl-suggest-place-initial {
    display: flex; align-items: center; justify-content: center;
    background: var(--brand, #02AA8D); color: #fff;
    font-weight: 800; font-size: .72rem;
}
.tl-suggest-place-name {
    font-size: .82rem; font-weight: 600;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tl-suggest-place-open {
    font-size: .66rem; font-weight: 700; white-space: nowrap;
    color: var(--bs-success-text-emphasis, #0a3622);
    background: var(--bs-success-bg-subtle, #d1e7dd);
    border-radius: 999px; padding: 1px 7px;
}
[data-bs-theme='dark'] .tl-suggest-place-open {
    color: #75b798; background: rgba(25,135,84,.18);
}

.tl-open-now {
    margin: 0 0 1.25rem;
    padding: 14px;
    border: 1px solid var(--bs-border-color);
    border-radius: 14px;
    background: var(--bs-body-bg);
}
.tl-open-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.tl-open-title {
    font-size: .78rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .04em; color: var(--bs-secondary-color);
    display: inline-flex; align-items: center; gap: 6px;
}
.tl-open-count {
    font-size: .7rem; font-weight: 700; padding: 1px 8px; border-radius: 999px;
    background: var(--bs-success-bg-subtle, #d1e7dd);
    color: var(--bs-success-text-emphasis, #0a3622);
}
[data-bs-theme='dark'] .tl-open-count { color: #75b798; background: rgba(25,135,84,.18); }
.tl-open-grid {
    display: grid; gap: 8px;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}
.tl-open-card {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px; border-radius: 12px;
    border: 1px solid var(--bs-border-color);
    background: var(--bs-tertiary-bg);
    text-decoration: none; color: var(--bs-body-color); min-width: 0;
}
.tl-open-card:hover { border-color: var(--bs-primary); }
.tl-open-logo {
    width: 34px; height: 34px; border-radius: 9px; object-fit: cover;
    flex: 0 0 auto; background: var(--bs-body-bg);
}
.tl-open-initial {
    display: flex; align-items: center; justify-content: center;
    background: var(--brand, #02AA8D); color: #fff; font-weight: 800; font-size: .82rem;
}
.tl-open-body { display: flex; flex-direction: column; min-width: 0; }
.tl-open-body strong {
    font-size: .84rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tl-open-cat {
    font-size: .7rem; color: var(--bs-secondary-color);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tl-open-more {
    margin-top: 8px; font-size: .76rem; color: var(--bs-secondary-color);
}

/* "Ver amanhã" deixou de ser o herói do vazio — vira ação de saída. */
.tl-empty-after { display: flex; justify-content: center; margin-bottom: 1rem; }
.tl-empty-cta-soft {
    background: transparent;
    border: 1px solid var(--bs-border-color);
    color: var(--bs-body-color);
}
.tl-empty-cta-soft:hover { border-color: var(--bs-primary); color: var(--bs-primary); }

/* O estado da agenda é uma NOTA, não o bloco principal da tela (2026-08-14). */
.tl-empty-note {
    display: flex; align-items: center; gap: 8px;
    margin: 0 0 1rem;
    font-size: .84rem;
    color: var(--bs-secondary-color);
}
.tl-empty-note span[aria-hidden] { font-size: 1rem; line-height: 1; }
.tl-empty-after { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-bottom: 1rem; }
.tl-empty-cta-soft { text-decoration: none; }

/* Sem itens não existe linha do tempo: a régua (padding + trilho) só empurra o
   conteúdo pra direita e aperta o texto no celular. Os deslocamentos negativos
   de .tl-empty/.tl-loading existem PARA compensar a régua — com ela zerada,
   eles também precisam sair, senão o conteúdo sai da tela pela esquerda. */
.tl-timeline.tl-empty-mode { padding-left: 0; min-height: 0; }
.tl-timeline.tl-empty-mode::before { display: none; }
.tl-timeline.tl-empty-mode .tl-empty,
.tl-timeline.tl-empty-mode .tl-loading,
.tl-timeline.tl-empty-mode .tl-period-sep,
.tl-timeline.tl-empty-mode .tl-now-empty-card { margin-left: 0; padding-left: 0; }

/* Nome da agenda ("Agenda de aulas presenciais") no card da timeline: legenda
   discreta, nunca competindo com o nome da atividade nem com o da empresa. */
.tl-grade-tag {
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: var(--bs-secondary-color);
    background: var(--bs-tertiary-bg);
    border-radius: 999px;
    padding: 1px 7px;
    max-width: 14rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
