/**
 * Live Bottom Sheet — Floating live player
 * Abierto por defecto, sin overlay, sin empujar body.
 * Card centrada (ancho poco menor al body), header EN VIVO | cerrar, body video 16:9 | título.
 */

/* Ocultar hasta que JS decida el estado (evita parpadeo) */
.inf-live-bottom-sheet[data-init="pending"] {
	display: none !important;
}

/* Overlay y barra: ocultos */
.inf-live-bottom-sheet__overlay,
.inf-live-bottom-sheet__bar {
	display: none !important;
}

/* ============================================================
   ROOT — fixed, transparent, pointer-events solo en panel
   ============================================================ */
.inf-live-bottom-sheet {
	--live-primary: var(--color-primary, #ff5920);
	--live-card-max: calc(1320px - 40px);
	--live-card-margin: 18px;
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 10000;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	visibility: visible;
	opacity: 1;
	pointer-events: none;
	font-family: inherit;
	background: transparent;
	padding: 0 20px var(--live-card-margin) 20px;
}
.inf-live-bottom-sheet * {
	box-sizing: border-box;
}
.inf-live-bottom-sheet__panel {
	pointer-events: auto;
}

.inf-live-bottom-sheet--closed {
	display: none !important;
}

/* ============================================================
   PANEL — Card centrada, fondo negro
   ============================================================ */
.inf-live-bottom-sheet__panel {
	position: relative;
	width: 100%;
	max-width: var(--live-card-max);
	background: rgba(0, 0, 0, 0.92);
	border-radius: 14px;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
	overflow: hidden;
	color: #fff;
	transform: none !important;
	display: flex;
	flex-direction: column;
	padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* ============================================================
   CARD INNER — Header + Body
   ============================================================ */
.inf-live-bottom-sheet__inner--panel {
	flex: 1;
	min-height: 0;
	display: flex;
	flex-direction: column;
	padding: 0;
}

.inf-live-bottom-sheet__grid {
	display: block;
	flex: 1;
	min-height: 0;
	position: relative;
}

/* Col actions (close): absoluto arriba derecha */
.inf-live-bottom-sheet__col--actions {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 2;
}

/* Col content: grid 2 columnas en desktop */
.inf-live-bottom-sheet__col--content {
	display: grid;
	grid-template-columns: 1fr 1fr;
	grid-template-rows: auto 1fr;
	gap: 16px;
	min-width: 0;
	padding: 16px 160px 16px 160px; /* escritorio: espacio amplio */
}
.inf-live-bottom-sheet__col--content .inf-live-bottom-sheet__video {
	grid-column: 1;
	grid-row: 1 / 3; /* Span ambas filas */
}
.inf-live-bottom-sheet__col--content .inf-live-bottom-sheet__badge {
	grid-column: 2;
	grid-row: 1;
	align-self: end;
	justify-self: start;
	display: inline-flex !important;
	width: auto !important;
}
.inf-live-bottom-sheet__col--content .inf-live-bottom-sheet__title--block {
	grid-column: 2;
	grid-row: 2;
	align-self: start;
	justify-self: start;
	text-align: left;
	display: block !important;
	min-width: 0;
}

/* ============================================================
   BADGE, TITLE, BTN
   ============================================================ */
.inf-live-bottom-sheet__badge {
	display: inline-flex !important;
	width: auto !important;
	background: #dc2626;
	color: #fff;
	font-weight: 700;
	font-size: 10px;
	padding: 4px 8px;
	letter-spacing: 0.06em;
	flex-shrink: 0;
}
.inf-live-bottom-sheet__title {
	font-size: 14px;
	font-weight: 600;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	color: #fff;
}
.inf-live-bottom-sheet__title--block {
	display: block !important;
	white-space: normal;
	overflow-y: auto;
	text-overflow: unset;
	font-size: 18px;
	line-height: 1.4;
	color: #fff;
}
@media (min-width: 1024px) {
	.inf-live-bottom-sheet__title--block {
		font-size: 22px;
	}
}
.inf-live-bottom-sheet__actions {
	display: flex;
	gap: 6px;
	flex-shrink: 0;
}
.inf-live-bottom-sheet__btn {
	background: rgba(255, 255, 255, 0.12);
	border: none;
	color: var(--live-primary);
	width: 36px;
	height: 36px;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s, color 0.2s;
}
.inf-live-bottom-sheet__btn:hover {
	background: rgba(255, 255, 255, 0.2);
	color: var(--live-primary);
}

/* ============================================================
   VIDEO — 16:9
   ============================================================ */
.inf-live-bottom-sheet__video {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	min-height: 0;
	background: #000;
	border-radius: 8px;
	overflow: hidden;
}
.inf-live-bottom-sheet__video iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

/* ============================================================
   RESPONSIVE — 640–1023px: Tablet, 2 columnas, card más ancha
   ============================================================ */
@media (max-width: 1023px) {
	.inf-live-bottom-sheet {
		padding-bottom: 10px !important;
	}
	.inf-live-bottom-sheet__panel {
		width: calc(100% - 20px) !important;
		max-width: calc(100% - 20px) !important;
		bottom: 10px !important;
		border-radius: 14px 14px 0 0;
	}
	.inf-live-bottom-sheet__col--content {
		grid-template-columns: 1fr 1fr !important;
		grid-template-rows: auto 1fr !important;
		padding: 12px 52px 12px 12px !important;
	}
	.inf-live-bottom-sheet__col--content .inf-live-bottom-sheet__video {
		grid-column: 1 !important;
		grid-row: 1 / 3 !important; /* Span ambas filas */
		max-height: 240px !important;
	}
	.inf-live-bottom-sheet__col--content .inf-live-bottom-sheet__badge {
		grid-column: 2 !important;
		grid-row: 1 !important;
		display: inline-flex !important;
		width: auto !important;
		justify-self: start !important;
		align-self: end !important;
	}
	.inf-live-bottom-sheet__col--content .inf-live-bottom-sheet__title--block {
		grid-column: 2 !important;
		grid-row: 2 !important;
		align-self: start !important;
		justify-self: start !important;
		text-align: left !important;
	}
}

/* ============================================================
   RESPONSIVE — <640px: full-width casi completo
   ============================================================ */
@media (max-width: 639px) {
	.inf-live-bottom-sheet {
		padding-left: 8px;
		padding-right: 8px;
		padding-bottom: 8px;
	}
	.inf-live-bottom-sheet__panel {
		max-width: calc(100% - 16px);
		width: 100%;
		border-radius: 14px 14px 0 0;
	}
	.inf-live-bottom-sheet__col--content {
		grid-template-columns: 1fr;
		grid-template-rows: auto auto auto;
		padding: 12px 52px 12px 12px;
		gap: 12px;
	}
	.inf-live-bottom-sheet__col--actions {
		top: 8px;
		right: 8px;
	}
}
