/* Redteca Comparador · tabla de comparación. Variables para adaptarla al tema. */
.rtc {
	--rtc-acento: #0b6bcb;
	--rtc-acento-txt: #fff;
	--rtc-borde: #dfe3e8;
	--rtc-fondo: #fff;
	--rtc-fondo-alt: #f6f8fa;
	--rtc-texto: #1d2327;
	--rtc-suave: #5f6b76;
	--rtc-ok: #137333;
	--rtc-ko: #b3261e;
	--rtc-destacado: #fff8e1;
	--rtc-radio: 10px;
	color: var(--rtc-texto);
	font-size: 15px;
	line-height: 1.45;
	margin: 1.5em 0;
}
.rtc *, .rtc *::before, .rtc *::after { box-sizing: border-box; }
.rtc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Filtros */
.rtc-filtros { display: flex; flex-wrap: wrap; gap: .6em 1em; align-items: flex-end; padding: .9em 1em; background: var(--rtc-fondo-alt); border: 1px solid var(--rtc-borde); border-radius: var(--rtc-radio); margin-bottom: .8em; }
.rtc-f { display: flex; flex-direction: column; gap: .2em; font-size: .85em; color: var(--rtc-suave); margin: 0; }
.rtc-f select { font-size: 1rem; padding: .35em .5em; border: 1px solid var(--rtc-borde); border-radius: 6px; background: var(--rtc-fondo); color: var(--rtc-texto); min-width: 8.5em; }
.rtc-f-check { flex-direction: row; align-items: center; gap: .4em; color: var(--rtc-texto); font-size: .95em; padding-bottom: .4em; }
.rtc-limpiar { background: none; border: 0; color: var(--rtc-acento); text-decoration: underline; cursor: pointer; font-size: .9em; padding: .4em 0; }
.rtc-cuenta { font-size: .85em; color: var(--rtc-suave); margin: 0 0 .4em; }

/* Tabla */
.rtc-scroll { overflow-x: auto; border: 1px solid var(--rtc-borde); border-radius: var(--rtc-radio); background: var(--rtc-fondo); }
.rtc-tabla { width: 100%; border-collapse: collapse; margin: 0; border: 0; }
.rtc-tabla th, .rtc-tabla td { padding: .7em .8em; border: 0; border-bottom: 1px solid var(--rtc-borde); text-align: center; vertical-align: middle; }
.rtc-tabla thead th { background: var(--rtc-fondo-alt); font-size: .8em; text-transform: uppercase; letter-spacing: .03em; color: var(--rtc-suave); white-space: nowrap; font-weight: 600; }
.rtc-tabla thead th button { all: unset; cursor: pointer; }
.rtc-tabla thead th button::after { content: " ↕"; opacity: .35; }
.rtc-tabla thead th[aria-sort="ascending"] button::after { content: " ↑"; opacity: 1; }
.rtc-tabla thead th[aria-sort="descending"] button::after { content: " ↓"; opacity: 1; }
.rtc-tabla thead th button:focus-visible { outline: 2px solid var(--rtc-acento); outline-offset: 2px; }
.rtc-tabla tbody tr:last-child > * { border-bottom: 0; }
.rtc-tabla tbody tr:hover { background: var(--rtc-fondo-alt); }
.rtc-c-plan { text-align: left !important; font-weight: normal; min-width: 14em; }
.rtc-tabla tbody .rtc-c-plan { display: flex; align-items: center; gap: .6em; flex-wrap: wrap; }
.rtc-logo { max-width: 96px; max-height: 32px; width: auto; height: auto; object-fit: contain; }
.rtc-nombre { display: flex; flex-direction: column; line-height: 1.25; }
.rtc-prov { font-weight: 700; }
.rtc-plan { color: var(--rtc-suave); font-size: .92em; }
.rtc-etiqueta { background: var(--rtc-acento); color: var(--rtc-acento-txt); font-size: .72em; font-weight: 700; padding: .2em .55em; border-radius: 99px; text-transform: uppercase; letter-spacing: .03em; }
.rtc-destacado { background: var(--rtc-destacado); }
.rtc-nota { display: inline-block; min-width: 2.6em; padding: .25em .4em; border-radius: 6px; background: var(--rtc-acento); color: var(--rtc-acento-txt); font-weight: 700; }
.rtc-precio { font-size: 1.2em; font-weight: 700; white-space: nowrap; }
.rtc-precio small { font-size: .65em; font-weight: 400; color: var(--rtc-suave); }
.rtc-detalle { display: block; font-size: .78em; color: var(--rtc-suave); white-space: nowrap; }
.rtc-si { color: var(--rtc-ok); font-weight: 700; }
.rtc-no { color: var(--rtc-ko); }
.rtc-sin-dato { color: var(--rtc-suave); }
.rtc-boton { display: inline-block; background: var(--rtc-acento); color: var(--rtc-acento-txt) !important; text-decoration: none !important; font-weight: 700; padding: .6em 1em; border-radius: 8px; border: 0; cursor: pointer; white-space: nowrap; font-size: .95em; }
.rtc-boton:hover, .rtc-boton:focus-visible { filter: brightness(1.1); }
.rtc-marcar { display: inline-flex; cursor: pointer; }
.rtc-marcar input { width: 1.1em; height: 1.1em; margin: 0; cursor: pointer; }
.rtc-vacio { padding: 1em; text-align: center; color: var(--rtc-suave); }
.rtc-pie { font-size: .8em; color: var(--rtc-suave); margin: .7em 0 0; }
.rtc-aviso-admin { padding: .8em; border: 1px dashed #c00; color: #c00; }

/* Barra de comparar y diálogo */
.rtc-barra { position: sticky; bottom: 0; z-index: 20; display: flex; gap: 1em; align-items: center; justify-content: center; flex-wrap: wrap; padding: .7em 1em; margin-top: .8em; background: var(--rtc-fondo); border: 1px solid var(--rtc-borde); border-radius: var(--rtc-radio); box-shadow: 0 -4px 16px rgba(0,0,0,.08); }
.rtc-barra[hidden], .rtc-vacio[hidden], .rtc-tabla tr[hidden] { display: none !important; }
.rtc-dialogo { border: 0; border-radius: var(--rtc-radio); padding: 1.2em; max-width: min(960px, 96vw); width: 100%; max-height: 90vh; color: var(--rtc-texto); background: var(--rtc-fondo); }
.rtc-dialogo::backdrop { background: rgba(0,0,0,.45); }
.rtc-dialogo form { text-align: right; margin-top: 1em; }
.rtc-lado { width: 100%; border-collapse: collapse; }
.rtc-lado th, .rtc-lado td { padding: .55em .7em; border-bottom: 1px solid var(--rtc-borde); text-align: center; }
.rtc-lado tbody th { text-align: left; color: var(--rtc-suave); font-weight: 600; font-size: .9em; }
.rtc-lado thead th { vertical-align: bottom; }

/* Móvil: cada plan es una tarjeta */
@media (max-width: 760px) {
	.rtc-scroll { overflow: visible; border: 0; background: none; }
	.rtc-tabla thead { display: none; }
	.rtc-tabla, .rtc-tabla tbody, .rtc-tabla tr { display: block; width: 100%; }
	.rtc-tabla tbody tr { border: 1px solid var(--rtc-borde); border-radius: var(--rtc-radio); margin-bottom: .8em; background: var(--rtc-fondo); padding: .4em 0; }
	.rtc-tabla tbody tr.rtc-destacado { background: var(--rtc-destacado); }
	.rtc-tabla tbody th, .rtc-tabla tbody td { display: flex; justify-content: space-between; align-items: center; gap: 1em; border-bottom: 1px solid var(--rtc-borde); padding: .5em .9em; text-align: right; }
	.rtc-tabla tbody td::before { content: attr(data-label); color: var(--rtc-suave); font-size: .85em; text-align: left; }
	.rtc-tabla tbody .rtc-c-plan { justify-content: flex-start; border-bottom-width: 2px; }
	.rtc-tabla tbody .rtc-c-precio { flex-wrap: wrap; }
	.rtc-tabla tbody .rtc-c-boton { border-bottom: 0; }
	.rtc-tabla tbody .rtc-c-boton::before { content: none; }
	.rtc-tabla tbody .rtc-c-boton .rtc-boton { width: 100%; text-align: center; }
	.rtc-c-precio > span, .rtc-c-precio > small { margin-left: auto; }
}

@media (prefers-color-scheme: dark) {
	.rtc.rtc-auto-oscuro {
		--rtc-borde: #3a4048; --rtc-fondo: #1c1f23; --rtc-fondo-alt: #24282d; --rtc-texto: #e8eaed; --rtc-suave: #a6adb5; --rtc-destacado: #2e2a1a; --rtc-ok: #6dd58c; --rtc-ko: #f28b82;
	}
}
