/**
 * Leopard Opening Hours — front styles
 */

/* -------------------------------------------------------------------------
 * Main widget (shortcode custom_opening_hours, nobutton, *_custom)
 * ------------------------------------------------------------------------- */
.opening-status-box {
	font-family: inherit;
	font-size: 14px;
	max-width: 320px;
	position: absolute;
	top: 0;
	left: 0;
	z-index: 999;
	margin: 0;
	padding: 0;
}

.opening-status-line {
	display: flex;
	align-items: flex-start;
	gap: 12px;
}

.opening-status-icon {
	width: 40px;
	height: auto;
	margin-top: 2px;
}

.opening-status-content {
	display: flex;
	flex-direction: column;
	flex: 1;
}

.oh-time {
	font-size: 16px;
	margin-top: 2px;
	font-family: inherit;
}

.opening-status-toggle {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: #85322c;
	font-size: 16px;
	font-weight: 500;
	margin-top: 10px;
	margin-left: 20px;
	cursor: pointer;
}

.opening-status-box.no-toggle-style {
	padding-left: 0;
	margin-left: 0;
	position: relative;
	text-align: left;
}

.opening-hours-detail {
	display: none;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 12px;
	padding: 20px;
	max-width: 400px;
}

.day-row {
	display: flex;
	justify-content: space-between;
	margin-bottom: 5px;
	font-size: 16px;
	font-family: inherit;
}

.day-row strong {
	font-weight: bold;
}

/* Status text colors (replaces inline styles) */
.leopard-oh-status-text {
	font-size: 14px;
	font-family: inherit;
	font-weight: 500;
	color: #000;
}

.leopard-oh-status-text--alert {
	color: #c00;
}

.leopard-oh-status-text--info {
	color: #03224c;
}

@media screen and (max-width: 768px) {
	.opening-status-box {
		position: relative !important;
		max-width: 100% !important;
		padding: 10px;
	}

	.opening-status-toggle {
		margin-left: 0 !important;
		font-size: 15px;
		padding: 10px 0;
		display: block;
	}

	.opening-hours-detail {
		position: relative !important;
		left: 0 !important;
		max-width: 100% !important;
		width: 100%;
		box-sizing: border-box;
		margin-top: 12px;
	}

	.opening-status-line {
		flex-wrap: wrap;
		gap: 8px;
	}

	.opening-status-icon {
		width: 32px;
	}

	.opening-status-content {
		width: 100%;
	}
}

/* -------------------------------------------------------------------------
 * Custom typography (shortcodes *_custom) — set vars on .leopard-oh--custom
 * ------------------------------------------------------------------------- */
@media screen and (min-width: 769px) {
	.leopard-oh--custom .opening-status-box,
	.leopard-oh--custom .opening-status-box .oh-time,
	.leopard-oh--custom .opening-status-box .status-text,
	.leopard-oh--custom .opening-status-toggle {
		font-size: var(--leopard-oh-font-pc, 16px) !important;
	}

	.leopard-oh--custom .opening-status-icon {
		width: var(--leopard-oh-icon-pc, 40px) !important;
	}
}

@media screen and (max-width: 768px) {
	.leopard-oh--custom .opening-status-box,
	.leopard-oh--custom .opening-status-box .oh-time,
	.leopard-oh--custom .opening-status-box .status-text,
	.leopard-oh--custom .opening-status-toggle {
		font-size: var(--leopard-oh-font-mobile, 14px) !important;
	}

	.leopard-oh--custom .opening-status-icon {
		width: var(--leopard-oh-icon-mobile, 32px) !important;
	}

	.leopard-oh--custom-nobutton-mobile .fusion-custom-shortcode {
		max-width: 100vw !important;
		overflow-x: hidden !important;
		box-sizing: border-box !important;
		padding: 0 12px !important;
	}

	.leopard-oh--custom-nobutton-mobile .opening-hours-detail {
		max-width: 100% !important;
		width: 100% !important;
		padding: 16px !important;
		box-sizing: border-box !important;
		overflow-x: hidden !important;
		background: #fff;
		border-radius: 12px;
		border: 1px solid #ddd;
	}

	.leopard-oh--custom-nobutton-mobile .day-row {
		display: flex !important;
		justify-content: space-between !important;
		align-items: center !important;
		font-size: 15px !important;
		font-family: inherit !important;
		padding: 6px 0 !important;
		gap: 10px !important;
		white-space: nowrap !important;
	}

	.leopard-oh--custom-nobutton-mobile .day-row div {
		flex: 0 0 auto !important;
		white-space: nowrap !important;
		overflow: hidden !important;
		text-overflow: ellipsis !important;
	}

	.leopard-oh--custom-nobutton-mobile .day-row strong {
		font-weight: bold !important;
	}
}

/* -------------------------------------------------------------------------
 * Button-only variant
 * ------------------------------------------------------------------------- */
.opening-hours-widget-button-only .opening-hours-detail {
	display: none;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 12px;
	padding: 20px;
	max-width: 500px;
	margin-top: 0;
	position: relative;
	top: 0;
	width: 100%;
	box-sizing: border-box;
}

.opening-hours-widget-button-only .day-row {
	display: grid;
	grid-template-columns: 150px auto;
	align-items: center;
	padding: 6px 0;
	font-size: 16px;
	font-family: inherit;
}

.opening-hours-widget-button-only .day-row strong {
	font-weight: bold;
}

.opening-hours-widget-button-only .opening-status-toggle {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: #85322c;
	font-size: 16px;
	font-weight: 600;
	margin: 0;
	padding: 0;
	line-height: 1.2;
	position: relative;
	top: 0;
}

@media screen and (max-width: 768px) {
	.opening-hours-widget-button-only .opening-hours-detail {
		width: 100% !important;
		max-width: 100% !important;
		padding: 16px !important;
		box-sizing: border-box;
		position: relative !important;
		top: 0 !important;
		margin-top: 0 !important;
	}

	.opening-hours-widget-button-only .day-row {
		grid-template-columns: 120px auto !important;
		font-size: 15px !important;
	}

	.opening-hours-widget-button-only .opening-status-toggle {
		font-size: 16px !important;
		margin-bottom: 10px !important;
		margin-top: 0 !important;
	}
}

/* -------------------------------------------------------------------------
 * Always-open variant
 * ------------------------------------------------------------------------- */
.opening-hours-always-open {
	padding: 0;
	margin-top: 0;
	width: 100%;
	box-sizing: border-box;
	border: none;
	background: none;
}

.opening-hours-always-open .day-row {
	display: grid;
	grid-template-columns: 150px auto;
	align-items: center;
	padding: 6px 0;
	font-size: 18px;
	font-family: inherit;
	border: none;
}

.opening-hours-always-open .day-row strong {
	font-weight: bold;
}

.opening-status-button-fixed {
	display: none;
}

@media screen and (max-width: 768px) {
	.opening-hours-always-open .day-row {
		grid-template-columns: 120px auto;
		font-size: 15px;
	}
}
