/* =============================================
   Tablas RTVC — Componente unificado
   Header azul, filas alternas, hover.
   ============================================= */

/* --- Base --- */
.table-rtvc,
.contratacion-results table,
.glosario-results table,
.node-detail-body .datos-abiertos-table,
.detalle-proceso-table,
.node-webform-section .webform-submission-form table,
.ci-tabs__content .table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  background: #fff;
}

/* --- Header --- */
.table-rtvc th,
.contratacion-results table th,
.glosario-results table th,
.node-detail-body .datos-abiertos-table thead th,
.detalle-proceso-table thead th,
.node-webform-section .webform-submission-form table th,
.ci-tabs__content .table th {
  background: #0943b5;
  color: #fff;
  padding: 0.85rem 1.25rem;
  font-weight: 700;
  text-align: left;
  border: none;
}

.table-rtvc th a,
.contratacion-results table th a,
.glosario-results table th a {
  color: #fff;
  text-decoration: none;
}

/* --- Celdas --- */
.table-rtvc td,
.contratacion-results table td,
.glosario-results table td,
.node-detail-body .datos-abiertos-table tbody td,
.detalle-proceso-table tbody td,
.node-webform-section .webform-submission-form table td {
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid #dde3ef;
  vertical-align: top;
  color: #4b4b4b;
}

/* --- Filas alternas --- */
.table-rtvc tr:nth-child(even) td,
.contratacion-results table tr:nth-child(even) td,
.glosario-results table tr:nth-child(even) td {
  background: #edf3fd;
}

/* --- Hover --- */
.table-rtvc tbody tr:hover,
.contratacion-results table tr:hover td,
.node-detail-body .datos-abiertos-table tbody tr:hover,
.detalle-proceso-table tbody tr:hover {
  background-color: #f5f7fc;
}

/* --- Links en celdas --- */
.table-rtvc td a,
.node-detail-body .datos-abiertos-table tbody td a,
.glosario-results table td a {
  color: #0943b5;
  text-decoration: underline;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .table-rtvc,
  .contratacion-results table,
  .glosario-results table,
  .detalle-proceso-table {
    font-size: 0.8rem;
  }

  .table-rtvc th,
  .table-rtvc td,
  .contratacion-results table th,
  .contratacion-results table td,
  .glosario-results table th,
  .glosario-results table td,
  .detalle-proceso-table thead th,
  .detalle-proceso-table tbody td {
    padding: 0.45rem 0.5rem;
  }
}

/* --- Overrides específicos --- */

/* Contratación: header más claro, bordes blancos entre th */
.contratacion-results table th {
  background: #4672C8;
  border: 1px solid #fff;
  white-space: nowrap;
}

.contratacion-results table th.active a {
  color: #ffdd00;
}

/* Glosario: primera columna 50% */
.glosario-results table td:first-child {
  width: 50%;
}

.glosario-results table td:first-child a {
  color: #4672c8;
}

.glosario-results table td:first-child a:hover {
  color: #0943b5;
}

/* Detalle proceso: borde inferior header, última columna centrada */
.detalle-proceso-table thead th {
  border-bottom: 2px solid #072d7a;
  padding: 0.65rem 0.75rem;
  font-weight: 600;
}

.detalle-proceso-table tbody td {
  padding: 0.6rem 0.75rem;
}

.detalle-proceso-table tbody td:last-child {
  text-align: center;
  width: 80px;
}

.detalle-proceso-table tbody td a {
  color: #c7013d;
  text-decoration: none;
}

.detalle-proceso-table tbody td a:hover {
  color: #b50036;
}

/* Datos abiertos: header diferente */
.node-detail-body .datos-abiertos-table thead tr {
  background-color: #4f6fbb;
}

.node-detail-body .datos-abiertos-table tbody td.text-center {
  text-align: center;
}

/* Webform: bordes en celdas */
.node-webform-section .webform-submission-form table td {
  padding: 8px 12px;
  border: 1px solid #ccc;
}

/* Control interno: font-size */
.ci-tabs__content .table {
  font-size: 14px;
}
