/* ── Cámara Votaciones – Frontend CSS ── */
.cv-wrap { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; max-width: 1100px; }

/* Tarjetas de votación (usadas por [camara_votaciones] y [camara_ultimas_votaciones]) */
.cv-votaciones-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.cv-votacion-card {
	display: flex; flex-direction: column; gap: 8px;
	background: #fff; border: 1px solid #e5e5e5; border-radius: 8px;
	padding: 16px; text-decoration: none; color: inherit;
	transition: box-shadow .15s, border-color .15s;
}
.cv-votacion-card:hover { border-color: #1a3a6b; box-shadow: 0 2px 8px rgba(26,58,107,.12); }
.cv-votacion-fecha { font-size: 12px; color: #888; text-transform: uppercase; letter-spacing: .5px; }
.cv-votacion-titulo { font-size: 15px; font-weight: 600; color: #0f2447; line-height: 1.4; }
.cv-votacion-votos { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12px; font-weight: 600; }
.cv-votacion-votos .si  { color: #1a7a3a; }
.cv-votacion-votos .no  { color: #b01020; }
.cv-votacion-votos .abs { color: #856404; }
.cv-votacion-card .cv-badge { align-self: flex-start; margin-top: 2px; }

/* Selector de cantidad (widget "últimas votaciones") */
.cv-cantidad-selector { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 20px; flex-wrap: wrap; }
.cv-cantidad-label { font-size: 13px; color: #666; margin-right: 4px; }
.cv-cantidad-btn {
	display: inline-flex; align-items: center; justify-content: center;
	width: 28px; height: 28px; padding: 0; line-height: 1;
	border-radius: 50%; border: 1px solid #ccc;
	background: #f8f8f8; color: #555; font-size: 13px; font-weight: 600; cursor: pointer;
	box-sizing: border-box;
}
.cv-cantidad-btn:hover { background: #e8e8e8; }
.cv-cantidad-btn.active { background: #1a3a6b; color: #fff; border-color: #1a3a6b; }

/* Filtros */
.cv-filtros { display: flex; gap: 8px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.cv-tag { padding: 5px 14px; border-radius: 20px; border: 1px solid #ccc; text-decoration: none; font-size: 13px; color: #555; background: #f8f8f8; }
.cv-tag:hover { background: #e8e8e8; }
.cv-tag.active { background: #1a3a6b; color: #fff; border-color: #1a3a6b; }
.cv-tag.aprobado.active { background: #1a7a3a; border-color: #1a7a3a; }
.cv-tag.rechazado.active { background: #b01020; border-color: #b01020; }
.cv-tag-orden { margin-left: auto; }

/* Buscador por Boletín */
.cv-buscador-boletin { display: flex; gap: 8px; align-items: center; margin-bottom: 20px; flex-wrap: wrap; }
.cv-buscador-boletin-input {
	flex: 1; min-width: 220px; max-width: 320px;
	padding: 8px 12px; border: 1px solid #ccc; border-radius: 20px; font-size: 13px;
}
.cv-buscador-boletin-input:focus { outline: none; border-color: #1a3a6b; }
.cv-buscador-boletin-btn {
	padding: 8px 16px; border: none; border-radius: 20px; background: #1a3a6b; color: #fff;
	font-size: 13px; font-weight: 600; cursor: pointer;
}
.cv-buscador-boletin-btn:hover { background: #0f2447; }
.cv-buscador-boletin-limpiar { font-size: 12px; color: #b01020; text-decoration: none; }
.cv-buscador-boletin-limpiar:hover { text-decoration: underline; }

/* Tabla listado */
.cv-tabla { width: 100%; border-collapse: collapse; font-size: 14px; }
.cv-tabla thead th { background: #1a3a6b; color: #fff; padding: 10px 12px; text-align: left; font-weight: 600; }
.cv-tabla tbody tr { border-bottom: 1px solid #e5e5e5; }
.cv-tabla tbody tr:hover { background: #f5f8ff; }
.cv-tabla td { padding: 10px 12px; vertical-align: top; }
.cv-fecha { white-space: nowrap; color: #555; font-size: 13px; }
.cv-boletin { white-space: nowrap; font-family: monospace; font-size: 13px; color: #1a3a6b; font-weight: 600; }
.cv-titulo a { color: #0f2447 !important; text-decoration: none; font-weight: 500; line-height: 1.4; }
.cv-titulo a:hover { color: #081527 !important; text-decoration: underline; }
.cv-votos { white-space: nowrap; font-size: 13px; }
.cv-votos .si { color: #1a7a3a; font-weight: 700; }
.cv-votos .no { color: #b01020; font-weight: 700; }
.cv-votos .abs { color: #888; }

/* Badges resultado */
.cv-badge { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; background: #eee; color: #555; white-space: nowrap; }
.cv-badge.aprobado { background: #d4edda; color: #155724; }
.cv-badge.rechazado { background: #f8d7da; color: #721c24; }

/* Paginación */
.cv-paginacion { display: flex; gap: 6px; margin-top: 20px; flex-wrap: wrap; }
.cv-pag { padding: 6px 12px; border: 1px solid #ccc; border-radius: 4px; text-decoration: none; color: #1a3a6b; font-size: 13px; }
.cv-pag:hover { background: #e8eef8; }
.cv-pag.active { background: #1a3a6b; color: #fff; border-color: #1a3a6b; }
.cv-vacio { color: #888; padding: 20px; text-align: center; }

/* ── Detalle ── */
.cv-volver { color: #1a3a6b; text-decoration: none; font-size: 14px; }
.cv-volver:hover { text-decoration: underline; }
.cv-detalle-titulo { font-size: 18px; font-weight: 700; color: #0f2447 !important; margin: 16px 0; line-height: 1.4; border-left: 4px solid #0f2447; padding-left: 12px; }
.cv-detalle-articulo { font-size: 14px; color: #444; line-height: 1.6; margin: 0 0 16px; padding-left: 16px; border-left: 3px solid #d0daea; }

.cv-detalle-meta { background: #f5f8ff; border: 1px solid #d0daea; border-radius: 6px; padding: 16px; margin-bottom: 20px; }
.cv-meta-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.cv-meta-grid > div { display: flex; flex-direction: column; gap: 2px; }
.cv-meta-grid span { font-size: 11px; text-transform: uppercase; color: #888; letter-spacing: .5px; }
.cv-meta-grid strong { font-size: 14px; color: #222; }
.cv-res-aprobado { color: #1a7a3a !important; }
.cv-res-rechazado { color: #b01020 !important; }

/* Resumen votos */
.cv-votos-resumen { display: flex; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }
.cv-voto-box { flex: 1; min-width: 90px; text-align: center; border-radius: 8px; padding: 16px 10px; }
.cv-voto-box .num { display: block; font-size: 32px; font-weight: 800; line-height: 1; }
.cv-voto-box .lbl { display: block; font-size: 12px; margin-top: 4px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.cv-voto-box.si  { background: #d4edda; color: #155724; }
.cv-voto-box.no  { background: #f8d7da; color: #721c24; }
.cv-voto-box.abs { background: #fff3cd; color: #856404; }
.cv-voto-box.dis { background: #e2e3e5; color: #383d41; }

/* Grupos diputados */
.cv-grupo-titulo { font-size: 15px; font-weight: 700; margin: 20px 0 10px; padding: 8px 12px; border-radius: 4px; }
.cv-grupo-a-favor   { background: #d4edda; color: #155724; }
.cv-grupo-en-contra { background: #f8d7da; color: #721c24; }
.cv-grupo-abstención,.cv-grupo-abstencion { background: #fff3cd; color: #856404; }
.cv-grupo-dispensado { background: #e2e3e5; color: #383d41; }
.cv-grupo-count { font-weight: 400; opacity: .8; }

.cv-diputados-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; margin-bottom: 8px; }
.cv-diputado { background: #fff; border: 1px solid #e5e5e5; border-radius: 4px; padding: 7px 10px; }
.cv-dip-nombre { display: block; font-size: 13px; font-weight: 600; color: #1a3a6b; }

/* Zona completa de color por grupo de votación (no solo el título). */
.cv-diputados-grid:has(.cv-dip-a-favor) { background: #eaf7ee; padding: 10px; border-radius: 6px; }
.cv-diputados-grid:has(.cv-dip-en-contra) { background: #fbebec; padding: 10px; border-radius: 6px; }
.cv-diputados-grid:has(.cv-dip-abstencion) { background: #fff8e8; padding: 10px; border-radius: 6px; }
.cv-diputados-grid:has(.cv-dip-no-vota) { background: #f1f2f3; padding: 10px; border-radius: 6px; }

.cv-dip-a-favor   { background: #d4edda; border-color: #b6dfc0; }
.cv-dip-en-contra { background: #f8d7da; border-color: #eebfc3; }
.cv-dip-abstencion{ background: #fff3cd; border-color: #ffe69c; }
.cv-dip-no-vota   { background: #e2e3e5; border-color: #d3d4d6; }
a.cv-dip-link { text-decoration: none; cursor: pointer; }
a.cv-dip-link:hover { text-decoration: underline; color: #0f2447; }
.cv-dip-partido { display: block; font-size: 11px; color: #888; margin-top: 2px; }
.cv-sin-detalle { color: #888; font-style: italic; }

@media (max-width: 600px) {
    .cv-tabla thead th:nth-child(2), .cv-tabla td:nth-child(2) { display: none; }
    .cv-meta-grid { grid-template-columns: 1fr 1fr; }
    .cv-votos-resumen { gap: 8px; }
    .cv-voto-box .num { font-size: 24px; }
}

/* ──────────────────────────────────────────────────────────
   Ancho completo para la página de detalle de una votación
   (sin franja de sidebar). Ajustado específicamente para el
   tema Sydney (aThemes), que usa grilla tipo Bootstrap con
   #primary/.col-md-8 para el contenido y #secondary/.col-md-4
   para el sidebar. Se agregan también selectores genéricos
   de respaldo por si el tema cambia de versión.
   ────────────────────────────────────────────────────────── */
body.cv-ancho-completo #primary,
body.cv-ancho-completo .content-area,
body.cv-ancho-completo #primary.col-md-8,
body.cv-ancho-completo .content-area.col-md-8,
body.cv-ancho-completo main#main-content,
/* Respaldo genérico para otros temas */
body.cv-ancho-completo .site-content,
body.cv-ancho-completo #primary,
body.cv-ancho-completo .entry-content,
body.cv-ancho-completo .ast-container,
body.cv-ancho-completo .elementor,
body.cv-ancho-completo .site-main {
    width: 100% !important;
    max-width: 1200px !important;
    flex: 0 0 100% !important;
    float: none !important;
}
body.cv-ancho-completo #secondary,
body.cv-ancho-completo .widget-area,
body.cv-ancho-completo aside.sidebar,
body.cv-ancho-completo .sidebar,
/* Sydney: la columna de sidebar suele traer col-md-4 */
body.cv-ancho-completo #secondary.col-md-4,
body.cv-ancho-completo .widget-area.col-md-4 {
    display: none !important;
}
body.cv-ancho-completo .cv-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
