/* ═══════════════════════════════════════════════════════════════
   VFA Attività — MEP activity timeline (page-attivita.php)
   ═══════════════════════════════════════════════════════════════ */

.vfa-timeline-page [hidden] { display: none !important; }

/* ─── Header ─── */

.vfa-timeline-page__head {
    max-width: 760px;
    margin: 0 auto 40px;
    text-align: center;
}
.vfa-timeline-page__title {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 800;
    text-transform: uppercase;
    color: var(--vfa-orange);
    margin-bottom: 16px;
}
.vfa-timeline-page__intro {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--vfa-text);
    max-width: 62ch;
    margin: 0 auto;
}

/* ─── Filters (same look as /eletti) ─── */

.vfa-timeline-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    max-width: 960px;
    margin: 0 auto 24px;
    padding: 24px 28px;
    background: var(--vfa-white);
    border-radius: var(--vfa-radius);
    box-shadow: 0 1px 3px rgba(60, 40, 20, .05), 0 4px 16px rgba(60, 40, 20, .04);
    border-top: 3px solid var(--vfa-orange);
}
.vfa-timeline-filters__field label {
    display: block;
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 6px;
    color: var(--vfa-text-secondary);
}
.vfa-timeline-filters select,
.vfa-timeline-filters input {
    width: 100%;
    padding: 10px 12px;
    font-family: var(--vfa-font-body);
    font-size: .95rem;
    color: var(--vfa-text);
    background: var(--vfa-cream-light);
    border: 1.5px solid var(--vfa-gray-light);
    border-radius: var(--vfa-radius-sm);
    appearance: none;
    transition: border-color .2s, background-color .2s, box-shadow .2s;
}
.vfa-timeline-filters select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23999' stroke-width='1.5'%3E%3Cpolyline points='1 1 6 6 11 1'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}
.vfa-timeline-filters select:focus,
.vfa-timeline-filters input:focus {
    outline: none;
    border-color: var(--vfa-orange);
    background-color: var(--vfa-white);
    box-shadow: 0 0 0 3px rgba(241, 143, 89, .18);
}
.vfa-timeline-filters input::placeholder { color: #8a8a8a; }

.vfa-timeline-page__bar {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    max-width: 960px;
    margin: 0 auto 32px;
}
.vfa-timeline-page__rss {
    font-size: .85rem;
    font-weight: 600;
    color: var(--vfa-dark);
    text-decoration: underline;
    text-decoration-color: var(--vfa-orange);
    text-underline-offset: 3px;
}
.vfa-timeline-page__counter {
    margin: 0;
    font-size: .95rem;
    color: var(--vfa-text-secondary);
}
.vfa-timeline-page__counter strong {
    color: var(--vfa-dark);
    font-weight: 800;
}

/* ─── Timeline ─── */

.vfa-timeline {
    max-width: 960px;
    margin: 0 auto;
}
.vfa-timeline__month + .vfa-timeline__month { margin-top: 48px; }
.vfa-timeline__month-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--vfa-dark);
    margin: 0 0 16px;
}
.vfa-timeline__items {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
}
.vfa-timeline__item {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 20px;
    padding: 20px 24px;
    background: var(--vfa-white);
    border-radius: var(--vfa-radius);
    box-shadow: 0 1px 3px rgba(60, 40, 20, .05);
}
.vfa-timeline__date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 2px;
    border-right: 2px solid var(--vfa-cream);
    padding-right: 16px;
}
.vfa-timeline__day {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1;
    color: var(--vfa-dark);
}
.vfa-timeline__mon {
    margin-top: 4px;
    font-family: var(--vfa-font-button);
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--vfa-text-secondary);
}
.vfa-timeline__body { min-width: 0; }

.vfa-timeline__who {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}
.vfa-timeline__avatars { display: flex; }
.vfa-timeline__avatars img,
.vfa-timeline__avatar-fallback {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--vfa-white);
    background: var(--vfa-cream);
}
.vfa-timeline__avatars > * + * { margin-left: -10px; }
.vfa-timeline__avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    font-weight: 700;
    color: var(--vfa-dark);
}
.vfa-timeline__names {
    margin: 0;
    flex: 1;
    min-width: 0;
    font-size: .95rem;
    font-weight: 700;
    line-height: 1.35;
}
.vfa-timeline__names a { color: var(--vfa-dark); }
.vfa-timeline__names a:hover { color: var(--vfa-orange-deep); }
.vfa-timeline__tag {
    padding: 3px 10px;
    border-radius: var(--vfa-radius-pill);
    background: var(--vfa-cream-light);
    font-family: var(--vfa-font-button);
    font-size: .7rem;
    font-weight: 600;
    color: var(--vfa-text-secondary);
}

.vfa-timeline__text {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--vfa-text);
}
.vfa-timeline__text p { margin: 0 0 .5em; }
.vfa-timeline__text p:last-child { margin-bottom: 0; }
.vfa-timeline__text a,
.vfa-timeline__source {
    color: var(--vfa-dark);
    text-decoration: underline;
    text-decoration-color: var(--vfa-orange);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}
.vfa-timeline__text a:hover,
.vfa-timeline__source:hover { color: var(--vfa-orange-deep); }
.vfa-timeline__item.is-quote .vfa-timeline__text {
    padding-left: 16px;
    border-left: 3px solid var(--vfa-orange);
    font-style: italic;
}
.vfa-timeline__source {
    display: inline-block;
    margin-top: 10px;
    font-size: .85rem;
    font-weight: 600;
}

/* Topic: plain text, no pill, so it never competes with type/outcome tags */
.vfa-timeline__topic {
    font-size: .8rem;
    font-weight: 600;
    color: #b84000; /* darker brand orange: AA contrast on white at this size */
}
.vfa-timeline__names + .vfa-timeline__topic { order: 3; }

/* ─── Plenary votes ─── */

.vfa-timeline__tag--vote {
    background: var(--vfa-dark);
    color: var(--vfa-white);
}
.vfa-timeline__tag--positivo { background: #e6f4e7; color: #23662a; }
.vfa-timeline__tag--negativo { background: #fbe7e5; color: #a3271a; }
.vfa-timeline__vote-title {
    margin: 0 0 14px;
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.3;
}
.vfa-timeline__vote-title a { color: var(--vfa-dark); }
.vfa-timeline__vote-title a:hover { color: var(--vfa-orange-deep); }
.vfa-timeline__vote-rows {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 6px;
}
.vfa-timeline__vote-row {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 12px;
    align-items: baseline;
    padding: 6px 10px;
    border-left: 4px solid var(--vfa-gray);
    border-radius: 0 var(--vfa-radius-sm) var(--vfa-radius-sm) 0;
    font-size: .9rem;
    line-height: 1.45;
    transition: background-color .2s;
}
.vfa-timeline__vote-row--favorevole { border-left-color: var(--vfa-green); }
.vfa-timeline__vote-row--contrario  { border-left-color: var(--vfa-red); }
.vfa-timeline__vote-row--astenuto   { border-left-color: var(--vfa-yellow); }
.vfa-timeline__vote-row.is-match { background: var(--vfa-cream-light); }
.vfa-timeline__vote-label {
    font-weight: 600;
    color: var(--vfa-text-secondary);
}
.vfa-timeline__vote-label strong { color: var(--vfa-dark); }
.vfa-timeline__vote-names { color: var(--vfa-text); }
.vfa-timeline__vote-names a { color: inherit; }
.vfa-timeline__vote-names a:hover { color: var(--vfa-orange-deep); }
.vfa-timeline__vote-names a.is-match {
    font-weight: 800;
    color: var(--vfa-dark);
    text-decoration: underline;
    text-decoration-color: var(--vfa-orange);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}
@media (max-width: 580px) {
    .vfa-timeline__vote-row { grid-template-columns: 1fr; gap: 2px; }
}

/* ─── Empty + back ─── */

.vfa-timeline-page__empty {
    max-width: 960px;
    margin: 0 auto;
    padding: 48px 24px;
    text-align: center;
    background: var(--vfa-white);
    border-radius: var(--vfa-radius);
    color: var(--vfa-text-secondary);
}
.vfa-timeline-page__empty p { margin: 0 0 20px; }
.vfa-timeline-page__back { margin-top: 56px; }

/* ─── Mobile ─── */

@media (max-width: 768px) {
    .vfa-timeline-filters { grid-template-columns: 1fr 1fr; padding: 20px; }
}
@media (max-width: 580px) {
    .vfa-timeline-filters { grid-template-columns: 1fr; }
    .vfa-timeline__item {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 18px;
    }
    .vfa-timeline__date {
        flex-direction: row;
        align-items: baseline;
        gap: 6px;
        border-right: 0;
        padding: 0;
    }
    .vfa-timeline__day { font-size: 1.1rem; }
    .vfa-timeline__mon { margin-top: 0; }
}
