/* Retiroweb – Subte en tiempo real */
.rws .rwx-ag-cab { display: flex; align-items: center; justify-content: space-between; }
.rws-vivo { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: .05em; color: #c8102e; }
.rws-vivo i { width: 8px; height: 8px; border-radius: 50%; background: #e2001a; animation: rwsLive 1.6s ease-out infinite; }
.rws-vivo b { font-weight: 600; color: #777; letter-spacing: 0; }

.rws-card { position: relative; overflow: hidden; border-radius: 12px; padding: 26px 18px 22px;
	background: radial-gradient(120% 140% at 50% 0%, #ffffff 0%, #f6f7f9 100%);
	box-shadow: 0 1px 3px rgba(0, 0, 0, .06), 0 8px 24px rgba(0, 0, 0, .04); }

/* Vía con durmientes en movimiento y un tren que pasa por detrás de las estaciones */
.rws-via { position: absolute; left: 5%; right: 5%; top: 55px; height: 8px; border-radius: 4px;
	background: repeating-linear-gradient(90deg, #d5d9e0 0 14px, #eceef2 14px 22px); background-size: 44px 8px;
	animation: rwsVia 2.8s linear infinite; }
.rws-tren { position: absolute; top: 50%; left: -70px; width: 58px; height: 16px; margin-top: -8px; border-radius: 8px 12px 12px 8px;
	background: linear-gradient(90deg, #a10d22, #e2001a 60%, #ff5a6a); box-shadow: 0 0 14px rgba(226, 0, 26, .55);
	animation: rwsTren 18s cubic-bezier(.45, 0, .55, 1) infinite; }
.rws-tren::after { content: ""; position: absolute; top: 4px; bottom: 4px; left: 7px; right: 12px; border-radius: 2px;
	background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .9) 0 6px, transparent 6px 10px); }

.rws-lineas { position: relative; z-index: 1; list-style: none; margin: 0; padding: 0;
	display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.rws-l { display: flex; flex-direction: column; align-items: center; text-align: center; margin: 0;
	opacity: 0; animation: rwsIn .65s cubic-bezier(.2, .8, .3, 1.25) forwards; animation-delay: calc(var(--i) * 90ms); }
.rws-listo .rws-l { opacity: 1; animation: none; }

.rws-flota { display: inline-block; animation: rwsBob 3.4s ease-in-out infinite; animation-delay: calc(var(--i) * -.45s); }
.rws-circ { position: relative; display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%;
	background: var(--c); color: var(--tc); font-size: 30px; font-weight: 800; line-height: 1;
	box-shadow: 0 0 0 5px #fff, 0 6px 14px rgba(0, 0, 0, .18); transition: transform .3s cubic-bezier(.2, .8, .3, 1.4); }
.rws-circ::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 3px solid var(--c); opacity: 0;
	animation: rwsRing 2.8s ease-out infinite; animation-delay: calc(var(--i) * .4s); }
.rws-l:hover .rws-circ { transform: scale(1.12) rotate(-8deg); }

.rws-info { display: flex; flex-direction: column; align-items: center; }
.rws-pill { margin-top: 14px; display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
	font-size: 12px; font-weight: 700; white-space: nowrap; }
.rws-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: rwsBlink 1.4s ease-in-out infinite; }
.rws-txt { margin-top: 8px; max-width: 170px; font-size: 12.5px; line-height: 1.35; color: #555; }
.rws-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.rws-t-ok .rws-pill { background: #e6f6ed; color: #0a7d43; }
.rws-t-info .rws-pill { background: #e8f1fd; color: #1b5fbf; }
.rws-t-aviso .rws-pill { background: #fff3d9; color: #9a5b00; }
.rws-t-alerta .rws-pill { background: #fde8ea; color: #c8102e; }
.rws-t-ok .rws-circ::after { animation-duration: 3.6s; }
.rws-t-aviso .rws-circ::after { border-color: #f0a400; animation-duration: 2s; }
.rws-t-alerta .rws-circ::after { border-color: #e2001a; animation-duration: 1.2s; }
.rws-cambio .rws-pill { animation: rwsFlash .8s ease-in-out 4; }

@keyframes rwsIn { from { opacity: 0; transform: translateY(16px) scale(.8); } to { opacity: 1; transform: none; } }
@keyframes rwsBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes rwsRing { 0% { transform: scale(1); opacity: .75; } 100% { transform: scale(1.5); opacity: 0; } }
@keyframes rwsBlink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@keyframes rwsLive { 0% { box-shadow: 0 0 0 0 rgba(226, 0, 26, .6); } 70% { box-shadow: 0 0 0 8px rgba(226, 0, 26, 0); } 100% { box-shadow: 0 0 0 0 rgba(226, 0, 26, 0); } }
@keyframes rwsFlash { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.15); } }
@keyframes rwsVia { to { background-position: 44px 0; } }
@keyframes rwsTren { 0% { left: -70px; } 100% { left: calc(100% + 20px); } }
@keyframes rwsTrenV { 0% { top: -50px; } 100% { top: calc(100% + 10px); } }

/* Modo Emova: panel oficial dentro de un marco animado con los colores de las líneas */
.rws-em .rws-marco { position: relative; padding: 3px; border-radius: 14px;
	background: linear-gradient(90deg, #18a0d8, #e2001a, #0067b1, #00875a, #6c2c8c, #ffd200, #f7a600, #18a0d8);
	background-size: 300% 100%; animation: rwsArco 10s linear infinite;
	box-shadow: 0 6px 22px rgba(0, 0, 0, .08); transition: transform .35s ease, box-shadow .35s ease; }
.rws-em .rws-marco:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(0, 0, 0, .14); }
.rws-em .rws-marco::after { content: ""; position: absolute; inset: 3px; border-radius: 11px; pointer-events: none;
	background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, .22) 50%, transparent 60%);
	background-size: 250% 100%; animation: rwsBrillo 6s ease-in-out infinite; }
.rws-em .rws-interior { position: relative; overflow: hidden; border-radius: 11px; background: #fff; }
.rws-em .rws-banda { position: relative; height: 18px; overflow: hidden; background: #f4f5f7; }
.rws-em .rws-via { left: 0; right: 0; top: 5px; }
.rws-em .rws-tren { animation-duration: 20s; }
.rws-pista { display: flex; align-items: center; gap: 8px; margin: 10px 2px 0; padding: 8px 12px; border-radius: 10px;
	background: #fff4f5; border: 1px solid #f6c9cf; color: #444; font-size: 13px; line-height: 1.35; }
.rws-pista b { color: #c8102e; }
.rws-pista .rws-dedo { flex: none; font-size: 18px; animation: rwsToque 1.6s ease-in-out infinite; }
@keyframes rwsToque { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }

/* Adornos laterales: mini mapa de la red (izq.) y reloj de andén con semáforo (der.) */
.rws-deco { display: none; position: absolute; top: 18px; bottom: 0; width: 96px; z-index: 2; pointer-events: none;
	flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.rws-ancho .rws-deco { display: flex; }
.rws-deco-izq { left: 10px; }
.rws-deco-der { right: 10px; }
.rws-deco-txt { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #8a8f98; }
.rws-deco svg { display: block; overflow: visible; }
.rws-combi { transform-box: fill-box; transform-origin: center; animation: rwsCombi 3s ease-in-out infinite; }
.rws-reloj-caja { border-radius: 50%; box-shadow: 0 4px 12px rgba(0, 0, 0, .12); animation: rwsBob 5s ease-in-out infinite; }
.rws-semaforo { display: flex; gap: 5px; padding: 5px 7px; border-radius: 10px; background: #2f3237; box-shadow: inset 0 1px 2px rgba(0, 0, 0, .5); }
.rws-semaforo i { width: 10px; height: 10px; border-radius: 50%; background: #4a4e55; animation: rwsLuz 9s steps(1) infinite; }
.rws-semaforo .rws-luz-r { --on: #ff3b3b; animation-delay: -3s; }
.rws-semaforo .rws-luz-a { --on: #ffc21a; animation-delay: -6s; }
.rws-semaforo .rws-luz-v { --on: #2ee06b; animation-delay: 0s; }
@keyframes rwsCombi { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.25); } }
@keyframes rwsLuz { 0% { background: var(--on); box-shadow: 0 0 8px var(--on); } 33.34%, 100% { background: #4a4e55; box-shadow: none; } }
.rws-em-frame { display: block; width: 100%; border: 0; background: #fff;
	opacity: 0; transform: translateY(12px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .3, 1.2); }
.rws-em-frame.rws-ok { opacity: 1; transform: none; }
@keyframes rwsArco { to { background-position: 300% 0; } }
@keyframes rwsBrillo { 0%, 60% { background-position: 150% 0; } 100% { background-position: -100% 0; } }

/* Celular: lista vertical con la vía al costado */
@media (max-width: 767px) {
	.rws-card { padding: 16px 14px; }
	.rws-lineas { grid-template-columns: 1fr; gap: 14px; }
	.rws-l { flex-direction: row; align-items: center; text-align: left; gap: 14px; }
	.rws-circ { width: 44px; height: 44px; font-size: 22px; box-shadow: 0 0 0 4px #fff, 0 4px 10px rgba(0, 0, 0, .16); }
	.rws-info { align-items: flex-start; }
	.rws-pill { margin-top: 0; }
	.rws-txt { max-width: none; margin-top: 4px; }
	.rws-card .rws-via { left: 32px; right: auto; top: 18px; bottom: 18px; width: 8px; height: auto;
		background: repeating-linear-gradient(180deg, #d5d9e0 0 14px, #eceef2 14px 22px); background-size: 8px 44px; animation-name: rwsViaV; }
	.rws-card .rws-tren { left: 50%; top: -50px; width: 16px; height: 40px; margin: 0 0 0 -8px; border-radius: 8px;
		background: linear-gradient(180deg, #a10d22, #e2001a 60%, #ff5a6a); animation-name: rwsTrenV; }
	.rws-card .rws-tren::after { top: 6px; bottom: 10px; left: 4px; right: 4px;
		background: repeating-linear-gradient(180deg, rgba(255, 255, 255, .9) 0 6px, transparent 6px 10px); }
	@keyframes rwsViaV { to { background-position: 0 44px; } }

	/* Líneas con novedades: se tocan para ver el motivo */
	.rws .rws-btn { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 14px; width: 100%;
		cursor: pointer; text-align: left; -webkit-tap-highlight-color: transparent; }
	.rws .rws-btn:focus-visible { outline: 2px solid #0067b1; outline-offset: 4px; border-radius: 10px; }
	.rws-toca .rws-info { display: flex; flex-flow: row wrap; align-items: center; gap: 4px 8px; }
	.rws-ver { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: #0067b1; }
	.rws-ver::before { content: "Ver motivo"; }
	.rws-ver::after { content: ""; width: 6px; height: 6px; margin-top: -3px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
		transform: rotate(45deg); transition: transform .25s ease; }
	.rws-abierta .rws-ver::before { content: "Ocultar"; }
	.rws-abierta .rws-ver::after { margin-top: 3px; transform: rotate(-135deg); }
	.rws-toca .rws-txt { display: none; flex-basis: 100%; margin-top: 2px; padding: 8px 10px; border-radius: 8px;
		background: #f3f4f6; border-left: 3px solid var(--c); color: #333; font-size: 13px; }
	.rws-abierta .rws-txt { display: block; animation: rwsAbre .25s ease-out; }
	@keyframes rwsAbre { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
}

@media (prefers-reduced-motion: reduce) {
	.rws *, .rws *::before, .rws *::after { animation: none !important; transition: none !important; }
	.rws-l { opacity: 1; }
	.rws-tren { display: none; }
	.rws-em-frame { opacity: 1; transform: none; }
}
