/**
 * Estilos públicos y Visualización de Aviso (Header, Footer y Pop-up) de Hora de Apertura
 *
 * @package HoraDeApertura
 */

:root {
	--hda-banner-bg: #0f172a;
	--hda-banner-text: #ffffff;
	--hda-banner-accent: #f59e0b;
}

/* ==========================================================================
   1. BARRA EN HEADER Y FOOTER
   ========================================================================== */
.hda-banner {
	width: 100%;
	background-color: var(--hda-banner-bg);
	color: var(--hda-banner-text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	font-size: 14px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.hda-position-sticky {
	position: sticky;
	top: 0;
	z-index: 999999;
	animation: hdaSlideDown 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.hda-position-top {
	position: relative;
	z-index: 9999;
	animation: hdaSlideDown 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.hda-position-footer-sticky {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 999999;
	box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.2);
	animation: hdaSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes hdaSlideDown {
	from {
		transform: translateY(-100%);
		opacity: 0;
	}
	to {
		transform: translateY(0);
		opacity: 1;
	}
}

@keyframes hdaSlideUp {
	from {
		transform: translateY(100%);
		opacity: 0;
	}
	to {
		transform: translateY(0);
		opacity: 1;
	}
}

.hda-banner-container {
	max-width: 1240px;
	margin: 0 auto;
	padding: 10px 20px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
}

.hda-banner-left {
	display: flex;
	align-items: center;
	gap: 12px;
	flex: 1 1 500px;
}

.hda-status-pill {
	background: #ef4444;
	color: #ffffff;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.6px;
	padding: 3px 10px;
	border-radius: 20px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	flex-shrink: 0;
}

.hda-pulse-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #ffffff;
	display: inline-block;
	animation: hdaPulse 1.6s infinite ease-in-out;
}

@keyframes hdaPulse {
	0% { transform: scale(0.9); opacity: 0.8; }
	50% { transform: scale(1.4); opacity: 1; }
	100% { transform: scale(0.9); opacity: 0.8; }
}

.hda-banner-message {
	font-weight: 500;
	line-height: 1.4;
	color: var(--hda-banner-text);
}

.hda-banner-message strong {
	color: #ffffff;
	font-weight: 700;
}

.hda-banner-right {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-shrink: 0;
}

.hda-countdown-box {
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.2);
	padding: 4px 12px;
	border-radius: 8px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	font-weight: 600;
	color: var(--hda-banner-accent);
}

.hda-countdown-icon {
	font-size: 14px;
}

.hda-countdown-label {
	color: #cbd5e1;
	font-size: 12px;
}

.hda-countdown-timer {
	font-family: monospace, -apple-system, sans-serif;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.5px;
	color: var(--hda-banner-accent);
}

.hda-banner-dismiss-btn {
	background: transparent;
	border: none;
	color: rgba(255, 255, 255, 0.6);
	cursor: pointer;
	padding: 4px;
	border-radius: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s ease;
}

.hda-banner-dismiss-btn:hover {
	color: #ffffff;
	background: rgba(255, 255, 255, 0.15);
}

/* ==========================================================================
   2. POP-UP MODAL EN PANTALLA
   ========================================================================== */
.hda-popup-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(15, 23, 42, 0.75);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	z-index: 9999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	animation: hdaFadeIn 0.3s ease-out;
}

@keyframes hdaFadeIn {
	from { opacity: 0; }
	to { opacity: 1; }
}

.hda-popup-modal {
	background: var(--hda-banner-bg);
	color: var(--hda-banner-text);
	border: 1px solid rgba(255, 255, 255, 0.15);
	border-radius: 16px;
	width: 100%;
	max-width: 480px;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
	position: relative;
	overflow: hidden;
	animation: hdaPopIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
	text-align: center;
	padding: 32px 28px;
}

@keyframes hdaPopIn {
	from {
		opacity: 0;
		transform: scale(0.9) translateY(20px);
	}
	to {
		opacity: 1;
		transform: scale(1) translateY(0);
	}
}

.hda-popup-close-x {
	position: absolute;
	top: 14px;
	right: 14px;
	background: rgba(255, 255, 255, 0.1);
	border: none;
	color: rgba(255, 255, 255, 0.7);
	width: 32px;
	height: 32px;
	border-radius: 50%;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s ease;
}

.hda-popup-close-x:hover {
	background: rgba(255, 255, 255, 0.2);
	color: #ffffff;
}

.hda-popup-icon-wrapper {
	width: 60px;
	height: 60px;
	background: rgba(239, 68, 68, 0.15);
	border: 1px solid rgba(239, 68, 68, 0.3);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 14px auto;
}

.hda-popup-icon {
	font-size: 28px;
}

.hda-popup-badge-wrapper {
	margin-bottom: 12px;
}

.hda-popup-title {
	font-size: 20px;
	font-weight: 700;
	color: #ffffff;
	margin: 0 0 12px 0;
	line-height: 1.3;
}

.hda-popup-body {
	margin-bottom: 24px;
}

.hda-popup-message {
	font-size: 15px;
	color: #cbd5e1;
	line-height: 1.5;
	margin-bottom: 18px;
}

.hda-popup-countdown-box {
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.15);
	border-radius: 12px;
	padding: 12px 16px;
	display: inline-flex;
	align-items: center;
	gap: 12px;
	margin: 0 auto;
}

.hda-popup-timer-details {
	text-align: left;
}

.hda-popup-timer-details .hda-countdown-label {
	display: block;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #94a3b8;
}

.hda-popup-timer-details .hda-countdown-timer {
	font-size: 18px;
	font-weight: 700;
	color: var(--hda-banner-accent);
}

.hda-popup-footer {
	margin-top: 10px;
}

.hda-popup-btn-dismiss {
	background: var(--hda-banner-accent);
	color: #0f172a;
	border: none;
	border-radius: 10px;
	padding: 12px 28px;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	width: 100%;
	transition: all 0.2s ease;
	box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}

.hda-popup-btn-dismiss:hover {
	filter: brightness(1.1);
	transform: translateY(-1px);
}

/* ==========================================================================
   3. AVISO EN CARRITO CUANDO ESTÁ CERRADO
   ========================================================================== */
.hda-cart-closed-notice {
	background: #fef2f2;
	border: 1px solid #fee2e2;
	border-left: 4px solid #ef4444;
	border-radius: 8px;
	padding: 16px 20px;
	margin: 20px 0;
}

.hda-cart-closed-inner {
	display: flex;
	align-items: center;
	gap: 14px;
}

.hda-cart-closed-icon {
	font-size: 24px;
}

.hda-cart-closed-text strong {
	display: block;
	color: #991b1b;
	font-size: 15px;
	margin-bottom: 2px;
}

.hda-cart-closed-text p {
	margin: 0;
	color: #7f1d1d;
	font-size: 13px;
}

/* ==========================================================================
   4. RESPONSIVE
   ========================================================================== */
@media (max-width: 768px) {
	.hda-banner-container {
		flex-direction: column;
		align-items: flex-start;
		padding: 10px 14px;
		gap: 8px;
	}

	.hda-banner-left {
		width: 100%;
		flex: none;
	}

	.hda-banner-right {
		width: 100%;
		justify-content: space-between;
	}

	.hda-countdown-box {
		width: 100%;
		justify-content: center;
	}

	.hda-popup-modal {
		padding: 24px 18px;
	}
}
