/* ------------------------------------------------------------------
   KK Top Utility Bar — sticky announcement / hours / contact bar
   ------------------------------------------------------------------ */

.kk-top-bar {
	position: sticky;
	top: 0;
	z-index: 1100;
	background: var(--tb-bg, #D4B96B);
	color: var(--tb-text, #fff);
	font-size: 0.8rem;
	line-height: 1.4;
	letter-spacing: 0.02em;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	overflow: visible;
}

/* Ensure tooltip can escape all parent containers */
.kk-top-bar__inner,
.kk-top-bar__right {
	overflow: visible;
}

.kk-top-bar a {
	color: var(--tb-text, #fff);
	text-decoration: none;
	transition: color 0.2s, opacity 0.2s;
}

.kk-top-bar a:hover {
	color: var(--tb-accent, #5a4630);
}

.kk-top-bar__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	max-width: 1400px;
	margin: 0 auto;
	padding: 6px 1.5rem;
	min-height: 38px;
	gap: 1rem;
}

/* ----- Icons ----- */
.kk-tb-icon {
	width: 14px;
	height: 14px;
	flex-shrink: 0;
	vertical-align: middle;
}

/* ===== Left: Phone + Socials ===== */
.kk-top-bar__left {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	flex-shrink: 0;
}

.kk-top-bar__phone {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	font-weight: 600;
	white-space: nowrap;
}

.kk-top-bar__phone-label {
	border-bottom: 1px solid transparent;
	transition: border-color 0.2s;
}

.kk-top-bar__phone:hover .kk-top-bar__phone-label {
	border-bottom-color: var(--tb-accent, #5a4630);
}

.kk-top-bar__social {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.08);
	transition: background 0.2s, color 0.2s;
}

.kk-top-bar__social:hover {
	background: rgba(255, 255, 255, 0.18);
}

/* ===== Centre: Ticker ===== */
.kk-top-bar__centre {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	margin: 0 1rem;
}

.kk-top-bar__ticker {
	position: relative;
	overflow: hidden;
	mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
	-webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
}

.kk-top-bar__ticker-track {
	display: inline-flex;
	white-space: nowrap;
	animation: kk-ticker-scroll var(--tb-speed, 30s) linear infinite;
}

.kk-top-bar__ticker-item {
	display: inline-block;
	padding: 0 2.5rem;
	color: var(--tb-accent, #5a4630);
	font-weight: 500;
}

.kk-top-bar__ticker-item::before {
	content: "\2726";
	margin-right: 0.6rem;
	opacity: 0.5;
}

@keyframes kk-ticker-scroll {
	0%   { transform: translateX(0); }
	100% { transform: translateX(-50%); }
}

.kk-top-bar__ticker:hover .kk-top-bar__ticker-track {
	animation-play-state: paused;
}

/* Single announcement — static, centered, no scroll */
.kk-top-bar__ticker--static {
	display: flex;
	justify-content: center;
	align-items: center;
	mask-image: none;
	-webkit-mask-image: none;
}

.kk-top-bar__ticker--static .kk-top-bar__ticker-item {
	white-space: nowrap;
	text-overflow: ellipsis;
	overflow: hidden;
}

/* ===== Right: Hours ===== */
.kk-top-bar__right {
	display: flex;
	align-items: center;
	flex-shrink: 0;
}

.kk-top-bar__hours {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	white-space: nowrap;
	position: relative;
	cursor: default;
}

.kk-top-bar__hours-text strong {
	font-weight: 600;
}

/* ===== Open/Closed pulsing dot ===== */
.kk-top-bar__status {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	flex-shrink: 0;
}

.kk-top-bar__status--open {
	background: #4caf50;
	animation: kk-flash 1s ease-in-out infinite;
}

.kk-top-bar__status--closed {
	background: #f44336;
}

@keyframes kk-flash {
	0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.6); }
	50%      { opacity: 0.3; box-shadow: 0 0 0 4px rgba(76, 175, 80, 0); }
}

/* Special hours tag in top bar */
.kk-top-bar__special-tag {
	display: inline-block;
	font-size: 0.65rem;
	padding: 1px 5px;
	background: rgba(255, 255, 255, 0.15);
	border-radius: 3px;
	margin-left: 0.3rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	vertical-align: middle;
}

/* ===================================================================
   WEEK TOOLTIP / DROPDOWN
   =================================================================== */

.kk-top-bar__week-tooltip {
	display: flex;
	position: absolute;
	top: calc(100% + 12px);
	background: #fff;
	color: #333;
	border-radius: 10px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
	z-index: 1200;
	font-size: 0.82rem;
	/* Hidden by default — use visibility so child transitions still work */
	visibility: hidden;
	pointer-events: none;
	opacity: 0;
	transform: translateY(-8px);
	transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s 0.25s;
}

/* Invisible bridge between trigger and tooltip so hover doesn't break */
.kk-top-bar__week-tooltip::after {
	content: "";
	position: absolute;
	bottom: 100%;
	left: 0;
	right: 0;
	height: 18px; /* covers the 12px gap + extra safety */
}

.kk-top-bar__hours--has-tooltip:hover .kk-top-bar__week-tooltip,
.kk-top-bar__hours--has-tooltip.is-open .kk-top-bar__week-tooltip {
	visibility: visible !important;
	pointer-events: auto !important;
	opacity: 1 !important;
	transform: translateY(0) !important;
	transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s 0s;
}

/* Tooltip positioning */
.kk-top-bar__week-tooltip--right { right: 0; }
.kk-top-bar__week-tooltip--left  { left: 0; }
.kk-top-bar__week-tooltip--center { left: 50%; transform: translateX(-50%) translateY(-8px); }
.kk-top-bar__hours--has-tooltip:hover .kk-top-bar__week-tooltip--center,
.kk-top-bar__hours--has-tooltip.is-open .kk-top-bar__week-tooltip--center { transform: translateX(-50%) translateY(0) !important; }

/* Arrow */
.kk-top-bar__week-tooltip::before {
	content: "";
	position: absolute;
	top: -6px;
	width: 12px;
	height: 12px;
	background: #fff;
	transform: rotate(45deg);
	box-shadow: -2px -2px 4px rgba(0, 0, 0, 0.04);
	z-index: 1;
}

.kk-top-bar__week-tooltip--right::before  { right: 20px; }
.kk-top-bar__week-tooltip--left::before   { left: 20px; }
.kk-top-bar__week-tooltip--center::before { left: calc(50% - 6px); }

/* ----- Layout: flexbox with optional side image ----- */
.kk-top-bar__week-tooltip {
	flex-direction: row;
	min-width: 260px;
}

/* ===== Side Image Panel (slides out from under on hover) ===== */
.kk-top-bar__week-tooltip--card {
	/* Card style has a wider layout to accommodate the image */
	min-width: 260px;
}

.kk-top-bar__week-banner {
	width: 0;
	min-height: 100%;
	background-size: cover;
	background-position: center;
	overflow: hidden;
	transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
	flex-shrink: 0;
	position: relative;
	border-radius: 10px 0 0 10px;
}

/* Slide image/video panel out when hours area is hovered (delayed so tooltip fades in first) */
.kk-top-bar__hours--has-tooltip:hover .kk-top-bar__week-tooltip--card .kk-top-bar__week-banner {
	width: var(--media-width, 180px);
	transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.25s;
}

.kk-top-bar__week-banner-overlay {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	padding: 12px;
	background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 100%);
	color: #fff;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.kk-top-bar__week-banner-name {
	font-weight: 700;
	font-size: 0.9rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.kk-top-bar__week-banner-msg {
	font-size: 0.72rem;
	opacity: 0.85;
}

/* Video support — if using <video> inside banner */
.kk-top-bar__week-banner video {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* ===== Coloured period bar (when no image) ===== */
.kk-top-bar__week-period-bar {
	padding: 10px 16px;
	color: #fff;
	font-size: 0.78rem;
	display: flex;
	flex-direction: column;
	gap: 2px;
	border-radius: 10px 10px 0 0;
}

.kk-top-bar__week-period-bar strong {
	text-transform: uppercase;
	letter-spacing: 0.04em;
	font-size: 0.82rem;
}

/* ===== Hours content area ===== */
.kk-top-bar__week-content {
	flex: 1;
	min-width: 240px;
}

.kk-top-bar__week-title {
	font-weight: 700;
	font-size: 0.85rem;
	color: #5a4630;
	padding: 16px 20px 12px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	border-bottom: 1px solid #eee;
	gap: 10px;
}

/* Open/closed badge in tooltip header */
.kk-top-bar__week-status {
	font-size: 0.68rem;
	padding: 2px 8px;
	border-radius: 10px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.kk-top-bar__week-status--open {
	background: #e8f5e9;
	color: #2e7d32;
}

.kk-top-bar__week-status--closed {
	background: #fce4ec;
	color: #c62828;
}

/* Day rows */
.kk-top-bar__week-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 9px 20px;
	border-bottom: 1px solid #f5f5f5;
	transition: background 0.15s;
}

.kk-top-bar__week-row:last-of-type {
	border-bottom: none;
	padding-bottom: 12px;
}

.kk-top-bar__week-row:hover {
	background: #fafafa;
}

.kk-top-bar__week-row--today {
	font-weight: 700;
	color: #5a4630;
	background: #faf7f0;
}

.kk-top-bar__week-row--today:hover {
	background: #faf7f0;
}

.kk-top-bar__week-row--special {
	background: rgba(197, 163, 85, 0.03);
}

.kk-top-bar__week-row--special .kk-top-bar__week-time {
	color: #9a8a6e;
}

.kk-top-bar__week-day {
	min-width: 100px;
	display: flex;
	align-items: baseline;
	gap: 6px;
}

.kk-top-bar__week-date {
	font-size: 0.72rem;
	font-weight: 400;
	color: #999;
}

.kk-top-bar__week-row--today .kk-top-bar__week-date {
	color: #8B7355;
}

.kk-top-bar__week-time {
	text-align: right;
	color: #666;
}

.kk-top-bar__week-row--today .kk-top-bar__week-time {
	color: #5a4630;
}

.kk-top-bar__week-special {
	color: #e65100;
	font-weight: 700;
}

/* Footer note */
.kk-top-bar__week-footer {
	padding: 10px 20px;
	border-top: 1px solid #eee;
	font-size: 0.72rem;
	color: #999;
}

/* ===== Header overflow prevention ===== */
.kk-top-bar + .kk-centered-header {
	overflow: visible;
}

.kk-top-bar + .kk-centered-header .header-inner {
	position: relative;
	z-index: 0;
}


/* ===== Mobile ===== */
@media (max-width: 767px) {
	.kk-top-bar__inner {
		padding: 4px 0.75rem;
		min-height: 32px;
		gap: 0.5rem;
	}

	.kk-top-bar__social {
		display: none;
	}

	.kk-top-bar__centre {
		margin: 0 0.25rem;
	}

	.kk-top-bar__ticker-item {
		padding: 0 1.5rem;
		font-size: 0.75rem;
	}

	.kk-top-bar__hours-text strong {
		display: none;
	}

	.kk-top-bar__phone-label {
		display: none;
	}

	.kk-tb-icon {
		width: 13px;
		height: 13px;
	}

	.kk-top-bar {
		font-size: 0.75rem;
	}

	/* Tooltip goes full width on mobile */
	.kk-top-bar__week-tooltip {
		position: fixed;
		top: auto;
		bottom: 0;
		left: 0;
		right: 0;
		border-radius: 16px 16px 0 0;
		max-height: 70vh;
		overflow-y: auto;
	}

	.kk-top-bar__week-tooltip::before {
		display: none;
	}

	.kk-top-bar__week-tooltip--card .kk-top-bar__week-banner {
		width: 100% !important;
		min-height: 120px;
		max-height: 160px;
	}

	.kk-top-bar__week-tooltip--card {
		flex-direction: column;
	}
}

@media (min-width: 768px) and (max-width: 991px) {
	.kk-top-bar__ticker-item {
		padding: 0 2rem;
	}
}

/* ===== Admin bar offset ===== */
.admin-bar .kk-top-bar {
	top: 32px;
}

@media (max-width: 782px) {
	.admin-bar .kk-top-bar {
		top: 46px;
	}
}
