/* NORTe TV Wall - botones cruzados radio <-> TV */
.ntwx { --ntwx-color: #7c3aed; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.ntwx *, .ntwx *::before, .ntwx *::after { box-sizing: border-box; }
.ntwx.is-hidden .ntwx-cta, .ntwx.is-hidden .ntwx-dismiss, .ntwx.is-hidden .ntwx-bar { display: none !important; }

/* Botón flotante: el envoltorio .ntwx-float se ubica (posición elegida en el panel) y lleva botón + × juntos */
.ntwx { --ntwx-adminbar: 0px; }
body.admin-bar .ntwx { --ntwx-adminbar: 32px; }
@media (max-width: 782px) { body.admin-bar .ntwx { --ntwx-adminbar: 46px; } }
.ntwx-float { position: fixed; z-index: 99990; touch-action: none; }
.ntwx-float.is-dragging { transition: none; cursor: grabbing; }
.ntwx-float.is-dragging .ntwx-cta { cursor: grabbing; transform: scale(1.05); }
.ntwx-cta {
	position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 20px 10px 10px;
	border: 0; border-radius: 40px; background: #fff; color: #111827; cursor: pointer;
	font: inherit; text-align: left; box-shadow: 0 10px 30px rgba(0,0,0,.3);
	transition: transform .2s;
}
.ntwx-cta:hover { transform: translateY(-3px); }
.ntwx-cta:focus-visible, .ntwx button:focus-visible, .ntwx a:focus-visible { outline: 3px solid var(--ntwx-color); outline-offset: 2px; }
.ntwx.is-open .ntwx-float { display: none; }
.ntwx-ico { flex: 0 0 52px; width: 52px; height: 52px; border-radius: 50%; background: var(--ntwx-color); color: #fff; display: flex; align-items: center; justify-content: center; }
.ntwx-ico img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.ntwx-txt { display: flex; flex-direction: column; gap: 2px; }
.ntwx-top { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 15px; letter-spacing: .5px; }
.ntwx-online { display: inline-flex; align-items: center; gap: 5px; color: #b91c1c; font-size: 12px; letter-spacing: 1px; }
.ntwx-sub { font-size: 13px; color: #4b5563; max-width: 230px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ntwx-pulse { width: 9px; height: 9px; border-radius: 50%; background: #dc2626; display: inline-block; animation: ntwx-pulse 1.6s infinite; }
.ntwx-pulse-w { background: #fff; }
@keyframes ntwx-pulse { 0% { box-shadow: 0 0 0 0 rgba(220,38,38,.6); } 70% { box-shadow: 0 0 0 9px rgba(220,38,38,0); } 100% { box-shadow: 0 0 0 0 rgba(220,38,38,0); } }
.ntwx-dismiss {
	position: absolute; top: -8px; right: -8px; z-index: 1; width: 24px; height: 24px; border-radius: 50%;
	border: 2px solid #fff; background: #374151; color: #fff; font-size: 14px; line-height: 1; cursor: pointer; padding: 0;
}
.ntwx-side-left .ntwx-dismiss { right: auto; left: -8px; }
.ntwx[data-drag="1"] .ntwx-cta { cursor: grab; }

/* Punto "en vivo" sobre el ícono (se ve en el modo solo ícono) */
.ntwx-ico { position: relative; }
.ntwx-ico-dot { display: none; position: absolute; top: 2px; right: 2px; width: 14px; height: 14px; border-radius: 50%; background: #dc2626; border: 2px solid #fff; animation: ntwx-pulse 1.6s infinite; }

/* Modo "solo ícono": la pequeña radio / la pequeña TV */
.ntwx-style-icon .ntwx-cta { padding: 6px; border-radius: 50%; }
.ntwx-style-icon .ntwx-txt { display: none; }
.ntwx-style-icon .ntwx-ico-dot { display: block; }
.ntwx-style-icon .ntwx-cta::after {
	content: attr(data-tip); position: absolute; right: calc(100% + 10px); top: 50%; transform: translateY(-50%);
	background: #111827; color: #fff; font-size: 12px; font-weight: 700; padding: 5px 9px; border-radius: 6px; white-space: nowrap;
	opacity: 0; pointer-events: none; transition: opacity .15s;
}
.ntwx-style-icon .ntwx-cta:hover::after, .ntwx-style-icon .ntwx-cta:focus-visible::after { opacity: 1; }

/* Botón a la izquierda: tooltip y pestaña del lado izquierdo */
.ntwx-side-left.ntwx-style-icon .ntwx-cta::after { right: auto; left: calc(100% + 10px); }
.ntwx-side-left .ntwx-panel { right: auto; left: 0; box-shadow: 12px 0 40px rgba(0,0,0,.3); }

/* Pestaña lateral */
.ntwx-panel {
	position: fixed; top: 0; right: 0; bottom: 0; z-index: 99995; width: 400px; max-width: 100%;
	background: #fff; color: #111827; display: flex; flex-direction: column; overflow-y: auto;
	box-shadow: -12px 0 40px rgba(0,0,0,.3); animation: ntwx-in .25s ease;
}
.ntwx-panel[hidden] { display: none; }
@keyframes ntwx-in { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.ntwx-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: var(--ntwx-color); color: #fff; position: sticky; top: 0; z-index: 1; }
.ntwx-head-name { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; letter-spacing: 1px; font-size: 14px; }
.ntwx-head-name img { height: 28px; width: auto; border-radius: 4px; background: #fff; padding: 2px; }
.ntwx-close { width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255,255,255,.18); color: #fff; font-size: 24px; line-height: 1; cursor: pointer; }
.ntwx-sec { padding: 18px 16px; display: flex; flex-direction: column; gap: 12px; border-bottom: 1px solid #e5e7eb; }
.ntwx-live { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; color: #b91c1c; letter-spacing: 1px; }
.ntwx-label { font-size: 12px; font-weight: 800; color: #4b5563; letter-spacing: 1px; }
.ntwx-cover { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 10px; }
.ntwx-cover-logo { display: flex; align-items: center; justify-content: center; background: linear-gradient(145deg, var(--ntwx-color), #111827); }
.ntwx-cover-logo img { max-width: 60%; max-height: 60%; object-fit: contain; }
.ntwx-title { font-size: 22px; font-weight: 800; line-height: 1.15; }
.ntwx-meta { font-size: 14px; color: #4b5563; }
.ntwx-player { display: flex; align-items: center; gap: 12px; }
.ntwx-player span { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.ntwx-player small { font-size: 12px; color: #4b5563; }
.ntwx-play { flex: 0 0 56px; width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--ntwx-color); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.ntwx-i-play { width: 0; height: 0; border-left: 16px solid currentColor; border-top: 10px solid transparent; border-bottom: 10px solid transparent; margin-left: 4px; }
.is-playing .ntwx-i-play { width: 16px; height: 18px; border: 0; margin: 0; border-left: 5px solid currentColor; border-right: 5px solid currentColor; }
.ntwx-next { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.ntwx-next span:first-child { font-weight: 600; }
.ntwx-next span:last-child { color: #4b5563; white-space: nowrap; }
.ntwx-actions { border-bottom: 0; }
.ntwx-btn { display: flex; align-items: center; justify-content: center; min-height: 48px; border-radius: 8px; background: #111827; color: #fff !important; text-decoration: none !important; font-weight: 700; font-size: 15px; }
.ntwx-btn-line { background: transparent; border: 2px solid #111827; color: #111827 !important; }
.ntwx-btn-light { background: #fff; color: #0f172a !important; font-weight: 800; }

/* Contenido del shortcode dentro de la pestaña (versión reducida) */
.ntwx-body { flex: 1 1 auto; padding: 14px; overflow-y: auto; }
.ntwx-body > :first-child { margin-top: 0; }
.ntwx-body img, .ntwx-body iframe, .ntwx-body video { max-width: 100%; }
.ntwx-tv .ntwx-panel { width: 520px; background: #0f172a; color: #fff; }
.ntwx-tv .ntwx-body { padding: 0; }
.ntwx-tv .ntwx-body .ntw-wall { --ntw-gap: 10px; background: transparent; }
.ntwx-tv .ntwx-body .ntw-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
.ntwx-tv .ntwx-foot .ntwx-btn { background: #fff; color: #0f172a !important; font-weight: 800; }

/* Pestaña de TV (oscura) */
.ntwx-panel-dark { width: 440px; background: #0f172a; color: #fff; }
.ntwx-note { margin: 0; padding: 12px 16px; font-size: 13px; color: #cbd5e1; background: #111c33; }
.ntwx-tiles { flex: 1 1 auto; padding: 14px 16px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-content: start; }
.ntwx-tiles .ntwx-note { grid-column: 1 / -1; background: transparent; padding: 0; }
.ntwx-tile { position: relative; aspect-ratio: 16 / 9; border: 0; padding: 0; border-radius: 6px; overflow: hidden; background: #1e293b; cursor: pointer; color: #fff; font: inherit; }
.ntwx-tile > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(.6); }
.ntwx-tile > img.ntwx-tile-logo { inset: 20% 25%; width: 50%; height: 60%; object-fit: contain; filter: none; opacity: .8; }
.ntwx-tile-name { position: absolute; left: 6px; top: 6px; display: flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; text-shadow: 0 1px 2px rgba(0,0,0,.8); }
.ntwx-tile-name b { background: #dc2626; padding: 1px 5px; border-radius: 3px; font-size: 9px; text-shadow: none; }
.ntwx-tile-play { position: absolute; left: 50%; top: 50%; width: 38px; height: 38px; margin: -19px 0 0 -19px; border-radius: 50%; background: rgba(0,0,0,.55); }
.ntwx-tile-play::after { content: ""; position: absolute; left: 15px; top: 11px; border-left: 12px solid #fff; border-top: 8px solid transparent; border-bottom: 8px solid transparent; }
.ntwx-tile:hover .ntwx-tile-play { background: var(--ntwx-color); }
.ntwx-foot { padding: 14px 16px; border-top: 1px solid #1e293b; position: sticky; bottom: 0; background: #0f172a; }

@media (max-width: 760px) {
	/* En celular, márgenes más chicos manteniendo la posición elegida */
	.ntwx:not(.ntwx-pos-manual) .ntwx-float { margin: -12px; }
	.ntwx-pos-mr .ntwx-float, .ntwx-pos-ml .ntwx-float { margin-top: 0; margin-bottom: 0; }
	.ntwx-cta { padding: 8px 16px 8px 8px; }
	.ntwx-ico { flex-basis: 44px; width: 44px; height: 44px; }
	.ntwx-style-icon .ntwx-cta { padding: 5px; }
	.ntwx-panel, .ntwx-tv .ntwx-panel { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
	.ntwx-pulse { animation: none; }
	.ntwx-panel { animation: none; }
	.ntwx-cta { transition: none; }
}
