/**
 * 2010-2025 PrestaShop
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License (AFL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/afl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future. If you wish to customize PrestaShop for your
 * needs please refer to http://www.prestashop.com for more information.
 *
 *  @author    Difadi.com <contacto@difadi.com>
 *  @author    Hernán De Vicente
 *  @copyright 20010-2025 PrestaShop SA
 *  @license   http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 *  International Registered Trademark & Property of PrestaShop SA
 */

/* TopBar principal */
#dfdtopbar {
	padding: 2px 0;
	/* Espaciado vertical */
	text-align: center;
	/* Centra el texto horizontalmente */
	display: grid;
	/* Utiliza grid para distribuir elementos */
	grid-template-columns: auto 16px;
	/* Dos columnas: contenido + botón de cierre */
	top: 0;
	width: 100%;
	/* Ocupa todo el ancho */
	z-index: 1000;
	/* Prioridad sobre otros elementos */
}

/* Aplica cursor tipo puntero en enlaces */
.dfdlinkpointer {
	cursor: pointer;
}

/* Cuando la barra está fija en la parte superior */
#dfdtopbar.fixed {
	position: fixed;
}

/* Oculta la barra cuando está en modo hidden */
#dfdtopbar.hidden {
	display: none;
}

/* Botón de cierre de la TopBar */
#dfdtopbar #closeDfdTopBar {
	font-weight: bold;
	/* Texto en negrita */
	cursor: pointer;
	/* Cursor tipo mano */
	justify-self: flex-end;
	/* Alineado al final de su celda */
	align-self: flex-start;
	/* Alineado arriba */
	padding-right: 5px;
}

/* Estilo del texto de la barra */
.topbar_text {
	padding: 10px;
}

/* Elimina márgenes por defecto en pre y párrafos */
pre,
p {
	margin: 0px;
}

/* Distribución del contenido de la barra en tres columnas */
.topbar_content_grid {
	display: grid;
	grid-template-columns: 1fr 4fr 1fr;
	/* Texto centrado, espacio y otros elementos */
}

/* Centrado del texto */
.topbar_text {
	justify-self: center;
	align-self: center;
}

/* Campo oculto para fecha del contador */
#topbar_countdown_date {
	display: none;
}

/* Contenedor del contador, alineado a la derecha */
.topbar_countdown {
	justify-self: end;
}

/* Grid del contenido del contador */
.topbar_countdown_content {
	margin: 10px;
	display: grid;
	grid-template-areas:
		"d h m s"
		"df hf mf sf";
	/* d=días, h=horas, m=minutos, s=segundos */
}

/* Áreas del contador */
.topbar_days {
	grid-area: d;
}

.topbar_days_foot {
	grid-area: df;
}

.topbar_hours {
	grid-area: h;
}

.topbar_hours_foot {
	grid-area: hf;
}

.topbar_minutes {
	grid-area: m;
}

.topbar_minutes_foot {
	grid-area: mf;
}

.topbar_seconds {
	grid-area: s;
}

.topbar_seconds_foot {
	grid-area: sf;
}

/* Estilos comunes para elementos del contador */
.topbar_countdown_content * {
	padding: 10px;
	margin: 2px;
	width: 50px;
	display: flex;
	text-align: center;
	justify-content: center;
	align-items: center;
}

/* Elemento individual del contador */
.topbar_date_item {
	border: outset grey 0.5px;
	border-radius: 8px;
	/* Bordes redondeados */
}

/* Ajuste de padding en los pies del contador */
.topbar_date_foot {
	padding-top: 0px;
	padding-bottom: 0px;
}

/* Responsive: pantallas menores a 949px */
@media screen and (max-width: 949px) {

	#dfdtopbar {
		top: 50px;
		/* Ajusta posición */
		z-index: 1000;
		position: fixed;
		width: 100%;
	}

	#dfdtopbar #closeDfdTopBar {
		padding: 10px;
		font-size: 50px;
		/* Botón más grande */
	}

	/* Grid pasa a una sola columna */
	.topbar_content_grid {
		display: grid;
		grid-template-columns: 1fr;
	}

	.topbar_countdown {
		justify-self: center;
	}

	/* Ajustes en contador */
	.topbar_countdown_content * {
		margin: 5px;
	}

	.topbar_date_item {
		border: outset grey 0.5px;
		border-radius: 8px;
	}

	.topbar_date_foot {
		padding-top: 0px;
		padding-bottom: 0px !important;
		padding-left: 0px !important;
		margin-left: 0px;
		margin-right: 0px;
		display: flex;
		justify-content: left;
	}

	.topbar_date_foot span {
		width: auto;
		height: 100%;
	}

	.topbar_countdown_content * {
		padding: 5px;
		width: 35px;
	}

	.topbar_date_foot * {
		padding: 0px;
		margin: 0px;
		width: 35px;
		text-align: left;
	}

	.topbar_countdown_content {
		display: grid;
		grid-template-areas:
			"d df h hf m mf s sf";
		/* Todo en una sola fila */
	}

	#dfdtopbar {
		position: relative;
	}

	.topbar_countdown {
		position: relative;
		/* Estilos generales del contador */
	}

	.topbar_countdown.countdown-text {
		/* Por defecto, si el contador está junto al texto */
	}

	.topbar_countdown.countdown-bottom-right {
		position: absolute;
		bottom: 10px;
		right: 10px;
		z-index: 999;
	}

	.topbar_countdown.countdown-top-right {
		position: absolute;
		top: 10px;
		right: 10px;
		z-index: 999;
	}

	.topbar_countdown.countdown-bottom-left {
		position: absolute;
		bottom: 10px;
		left: 10px;
		z-index: 999;
	}

	.topbar_countdown.countdown-top-left {
		position: absolute;
		top: 10px;
		left: 10px;
		z-index: 999;
	}
}