/* Plenos-specific styles — does not modify main.css */

/* ── Layout ── */
.plenos-body {
    max-width: none;
    padding: 0;
    margin: 0;
}

.plenos-nav {
    background: var(--primary);
    color: white;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.plenos-nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
    height: 50px;
}

.plenos-nav a {
    color: white;
    text-decoration: none;
}

.plenos-nav a:hover {
    text-decoration: underline;
}

.plenos-nav-logo {
    font-weight: bold;
    font-size: 18px;
}

.plenos-nav-sep {
    opacity: 0.6;
}

.plenos-nav-geo {
    font-weight: 600;
}

.plenos-nav-links {
    display: flex;
    gap: 16px;
    margin-left: 24px;
}

.plenos-nav-links a {
    font-size: 14px;
    opacity: 0.9;
}

.plenos-nav-search {
    margin-left: auto;
}

.plenos-nav-search input {
    padding: 4px 10px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    width: 180px;
}

.plenos-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ── Landing ── */
.plenos-landing {
    text-align: center;
    padding-top: 40px;
}

.plenos-landing h1 {
    color: var(--primary);
    font-size: 32px;
}

.plenos-subtitle {
    color: #666;
    font-size: 18px;
    margin-bottom: 30px;
}

.plenos-search-form {
    display: flex;
    gap: 8px;
    max-width: 500px;
    margin: 0 auto 40px;
}

.plenos-search-input {
    flex: 1;
    padding: 10px 14px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
}

.plenos-search-input:focus {
    border-color: var(--primary);
    outline: none;
}

.plenos-search-btn {
    padding: 10px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
}

.plenos-search-btn:hover {
    opacity: 0.9;
}

.plenos-link {
    color: var(--primary);
    font-weight: 600;
}

/* ── Meeting list ── */
.meeting-list {
    list-style: none;
    padding: 0;
}

.meeting-card {
    border-bottom: 1px solid #eee;
}

.meeting-card a {
    display: flex;
    gap: 16px;
    padding: 14px 0;
    text-decoration: none;
    color: var(--text);
    align-items: baseline;
}

.meeting-card a:hover {
    color: var(--primary);
}

.meeting-date {
    font-size: 14px;
    color: #888;
    white-space: nowrap;
    min-width: 100px;
}

.meeting-title {
    font-weight: 500;
}

.meeting-meta {
    color: #666;
    font-size: 14px;
}

.meeting-header h1 {
    margin-bottom: 4px;
}

/* ── 3-column grid (meeting detail) ── */
.meeting-grid {
    display: grid;
    grid-template-columns: 250px 1fr 250px;
    gap: 20px;
    align-items: start;
}

/* ── Agenda sidebar ── */
.agenda-sidebar {
    position: sticky;
    top: 70px;
    max-height: calc(100vh - 90px);
    overflow-y: auto;
    font-size: 13px;
}

.agenda-sidebar h2 {
    font-size: 15px;
    margin-bottom: 8px;
    color: var(--primary);
}

.agenda-sidebar h3 {
    font-size: 13px;
    margin-top: 16px;
}

.agenda-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.agenda-item {
    margin-bottom: 4px;
}

.agenda-item a {
    display: block;
    padding: 4px 8px;
    border-radius: 4px;
    text-decoration: none;
    color: var(--text);
    line-height: 1.3;
}

.agenda-item a:hover,
.agenda-item.active a {
    background: #f0e0e0;
    color: var(--primary);
}

.agenda-children {
    list-style: none;
    padding-left: 16px;
    margin: 2px 0 0;
}

.agenda-children li a {
    font-size: 12px;
    padding: 2px 8px;
}

.agenda-type {
    display: inline-block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 1px 5px;
    border-radius: 3px;
    background: #eee;
    color: #555;
    margin-right: 4px;
}

.agenda-type--punto { background: #e3f2fd; color: #1565c0; }
.agenda-type--proposicion { background: #fce4ec; color: #c62828; }
.agenda-type--preguntas, .agenda-type--pregunta { background: #fff3e0; color: #e65100; }
.agenda-type--ruegos, .agenda-type--ruego { background: #e8f5e9; color: #2e7d32; }

.timeline-list {
    list-style: none;
    padding: 0;
}

.timeline-block {
    padding: 4px 8px;
    font-size: 12px;
    color: #666;
}

.timeline-block--recess {
    font-style: italic;
}

/* ── Transcript panel ── */
.transcript-panel {
    min-width: 0;
}

.agenda-section {
    margin-bottom: 8px;
}

.agenda-section-title {
    font-size: 18px;
    border-bottom: 2px solid #eee;
    padding-bottom: 6px;
    margin-top: 24px;
}

.agenda-child h3 {
    font-size: 15px;
    color: #555;
    margin-top: 12px;
}

/* ── Turn cards ── */
.turns-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.turn-card {
    padding: 10px 14px;
    border-left: 3px solid var(--speaker-color, #ccc);
    background: #fafafa;
    border-radius: 0 6px 6px 0;
}

.turn-card:target {
    background: #fffde7;
}

.turn-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.speaker-badge {
    font-weight: 600;
    font-size: 13px;
    color: var(--speaker-color, #333);
}

.speaker-badge .speaker-group {
    font-weight: normal;
    opacity: 0.7;
}

.turn-time {
    font-size: 12px;
    color: #999;
    font-family: monospace;
}

.turn-share {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    opacity: 0.4;
    padding: 0 4px;
}

.turn-share:hover {
    opacity: 1;
}

.turn-text {
    font-size: 14px;
    line-height: 1.5;
}

.turn-agenda-link {
    font-size: 12px;
    color: var(--primary);
}

/* ── Votes sidebar ── */
.votes-sidebar {
    position: sticky;
    top: 70px;
    max-height: calc(100vh - 90px);
    overflow-y: auto;
    font-size: 13px;
}

.votes-sidebar h2 {
    font-size: 15px;
    margin-bottom: 8px;
    color: var(--primary);
}

.vote-card {
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 10px;
    border: 1px solid #eee;
}

.vote-approved { background: #e8f5e9; border-color: #a5d6a7; }
.vote-rejected { background: #ffebee; border-color: #ef9a9a; }
.vote-tie { background: #fff3e0; border-color: #ffcc80; }
.vote-unknown { background: #f5f5f5; border-color: #e0e0e0; }

.vote-result {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 4px;
}

.vote-subpoint {
    font-size: 12px;
    color: #666;
    margin-bottom: 2px;
}

.vote-item {
    font-size: 12px;
    margin-bottom: 4px;
}

.vote-confidence {
    font-size: 11px;
    color: #999;
}

.vote-notes {
    margin-top: 4px;
}

.vote-note {
    display: inline-block;
    font-size: 11px;
    background: #fff9c4;
    padding: 1px 6px;
    border-radius: 3px;
    margin-right: 4px;
}

.vote-tally {
    font-size: 12px;
    margin-top: 4px;
}

/* ── Search ── */
.search-form {
    margin-bottom: 20px;
}

.search-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.search-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.search-filters input {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.search-summary {
    color: #666;
    margin-bottom: 16px;
}

.search-results {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.search-result {
    padding: 12px;
    border: 1px solid #eee;
    border-radius: 6px;
}

.search-result-meta {
    font-size: 13px;
    color: #666;
    margin-bottom: 6px;
}

.search-result-meta a {
    color: var(--primary);
    font-weight: 500;
}

.search-result-text {
    font-size: 14px;
    line-height: 1.5;
}

.search-result-text mark {
    background: #fff176;
    padding: 0 2px;
    border-radius: 2px;
}

/* ── Speaker list ── */
.speaker-list {
    list-style: none;
    padding: 0;
}

.speaker-card a {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 10px 0;
    text-decoration: none;
    color: var(--text);
    border-bottom: 1px solid #eee;
}

.speaker-card a:hover {
    color: var(--primary);
}

.speaker-name {
    font-weight: 500;
}

.speaker-group-tag {
    display: inline-block;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    background: #eee;
    color: white;
}

.speaker-meta {
    font-size: 13px;
    color: #999;
    margin-left: auto;
}

/* ── Breadcrumb ── */
.breadcrumb {
    font-size: 14px;
    color: #888;
    margin-bottom: 12px;
}

.breadcrumb a {
    color: var(--primary);
}

/* ── Agenda item detail children ── */
.agenda-children-detail {
    padding-left: 20px;
}

.agenda-children-detail a {
    color: var(--primary);
}

/* ── Pagination ── */
.pagination {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
    font-size: 14px;
}

.pagination a {
    color: var(--primary);
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .meeting-grid {
        grid-template-columns: 1fr;
    }

    .agenda-sidebar,
    .votes-sidebar {
        position: static;
        max-height: none;
    }

    .agenda-sidebar {
        border-bottom: 1px solid #eee;
        padding-bottom: 16px;
        margin-bottom: 16px;
    }

    .agenda-sidebar.collapsed .agenda-list,
    .agenda-sidebar.collapsed .timeline-list {
        display: none;
    }

    .sidebar-toggle {
        display: block;
        background: none;
        border: 1px solid #ddd;
        padding: 6px 12px;
        border-radius: 4px;
        cursor: pointer;
        font-size: 13px;
        margin-bottom: 8px;
    }

    .plenos-nav-inner {
        flex-wrap: wrap;
        height: auto;
        padding: 8px 0;
    }

    .plenos-nav-search {
        width: 100%;
    }

    .plenos-nav-search input {
        width: 100%;
    }

    .search-filters {
        flex-direction: column;
    }
}

@media (min-width: 769px) {
    .sidebar-toggle {
        display: none;
    }
}
