/**
 * Bella Pizza Hours — frontend notice styles.
 * Uses the theme's font stack via `inherit` so it sits naturally inside Blocksy.
 */

.bph-notice {
	--bph-red:        #c8102e;
	--bph-red-deep:   #9a0a23;
	--bph-amber:      #d97706;
	--bph-amber-deep: #92400e;
	--bph-cream:      #fff8f0;
	--bph-ink:        #1f2937;
	--bph-ink-soft:   #4b5563;

	position: fixed;
	z-index: 9999;
	font-family: inherit;
	font-size: 15px;
	line-height: 1.5;
	color: var(--bph-ink);
	box-sizing: border-box;
}

.bph-notice * { box-sizing: border-box; }

/* ---------------------------------------------------------------------------
 * CLOSED — full-width top banner. Calm, authoritative, hard to miss.
 * ------------------------------------------------------------------------ */
.bph-notice--closed {
	top: 0;
	left: 0;
	right: 0;
	background:
		linear-gradient(135deg, var(--bph-red) 0%, var(--bph-red-deep) 100%);
	color: #fff8f0;
	box-shadow: 0 4px 24px rgba(154, 10, 35, 0.25);
	padding: 14px 20px;
	transform: translateY(-100%);
	animation: bph-slide-down 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
}

.bph-notice--closed .bph-notice__inner {
	max-width: 1100px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	gap: 14px;
}

.bph-notice--closed .bph-notice__icon {
	flex: 0 0 28px;
	width: 28px;
	height: 28px;
	color: rgba(255, 248, 240, 0.95);
}

.bph-notice--closed .bph-notice__text {
	margin: 0;
	font-weight: 500;
	letter-spacing: 0.005em;
}

/* ---------------------------------------------------------------------------
 * CLOSING SOON — bottom-right toast. Friendly nudge, not a panic.
 * ------------------------------------------------------------------------ */
.bph-notice--closing {
	bottom: 24px;
	right: 24px;
	max-width: 380px;
	background: var(--bph-cream);
	color: var(--bph-ink);
	border-left: 4px solid var(--bph-amber);
	border-radius: 10px;
	box-shadow:
		0 10px 25px -5px rgba(0, 0, 0, 0.15),
		0 4px 10px -3px rgba(0, 0, 0, 0.08);
	padding: 14px 16px;
	opacity: 0;
	transform: translateY(20px);
	animation: bph-slide-up 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
}

.bph-notice--closing[hidden] { display: none !important; }

.bph-notice--closing .bph-notice__inner {
	display: flex;
	align-items: flex-start;
	gap: 12px;
}

.bph-notice--closing .bph-notice__icon {
	flex: 0 0 22px;
	width: 22px;
	height: 22px;
	color: var(--bph-amber-deep);
	margin-top: 1px;
}

.bph-notice--closing .bph-notice__text {
	margin: 0;
	flex: 1;
	font-weight: 500;
	color: var(--bph-ink);
}

.bph-notice--closing .bph-notice__close {
	background: transparent;
	border: 0;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	padding: 0 4px;
	color: var(--bph-ink-soft);
	transition: color 0.2s ease;
	align-self: flex-start;
	margin-top: -2px;
}

.bph-notice--closing .bph-notice__close:hover {
	color: var(--bph-red);
}

/* ---------------------------------------------------------------------------
 * Open / Closed inline status badge (shortcode).
 * ------------------------------------------------------------------------ */
.bph-status {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-family: inherit;
	font-size: 0.95em;
	font-weight: 500;
	padding: 4px 10px;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.04);
	color: #1f2937;
}

.bph-status--open    { background: rgba( 22, 163, 74, 0.10); color: #15803d; }
.bph-status--closed  { background: rgba(200, 16, 46, 0.10);  color: #c8102e; }

.bph-status__dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: currentColor;
	box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.4);
}

.bph-status--open .bph-status__dot {
	animation: bph-pulse 2.5s ease-in-out infinite;
}

/* ---------------------------------------------------------------------------
 * WooCommerce error-notice tint, so the cart/checkout error matches the brand.
 * Scoped tightly so we don't touch other plugins' notices.
 * ------------------------------------------------------------------------ */
.woocommerce-error,
.woocommerce-notices-wrapper .woocommerce-error {
	border-top-color: var(--bph-red, #c8102e) !important;
}

/* ---------------------------------------------------------------------------
 * Animations
 * ------------------------------------------------------------------------ */
@keyframes bph-slide-down {
	to { transform: translateY(0); }
}

@keyframes bph-slide-up {
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes bph-pulse {
	0%, 100% { opacity: 1; }
	50%      { opacity: 0.4; }
}

/* ---------------------------------------------------------------------------
 * Responsive
 * ------------------------------------------------------------------------ */
@media (max-width: 600px) {
	.bph-notice--closed {
		padding: 12px 14px;
		font-size: 14px;
	}
	.bph-notice--closed .bph-notice__icon {
		flex-basis: 22px;
		width: 22px;
		height: 22px;
	}
	.bph-notice--closing {
		bottom: 12px;
		right: 12px;
		left: 12px;
		max-width: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.bph-notice--closed,
	.bph-notice--closing,
	.bph-status--open .bph-status__dot {
		animation: none;
		transform: none;
		opacity: 1;
	}
}
