/**
 * GB Hours Widget Styles
 *
 * CSS Variables for easy customization
 *
 * @package GB_Hours
 */

.gbh-hours-widget {
	/* CSS Variables - Colors */
	--gbh-status-open-color: #10b981;
	--gbh-status-closed-color: #ef4444;
	--gbh-status-soon-color: #f59e0b;
	--gbh-border-color: #e5e7eb;
	--gbh-bg-color: #ffffff;
	--gbh-text-color: #1f2937;
	--gbh-text-secondary: #6b7280;
	--gbh-current-day-bg: #f3f4f6;

	/* CSS Variables - Typography */
	--gbh-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
	--gbh-font-size-base: 14px;
	--gbh-font-size-status: 16px;
	--gbh-font-size-day: 13px;
	--gbh-font-weight-normal: 400;
	--gbh-font-weight-medium: 500;
	--gbh-font-weight-bold: 600;

	/* CSS Variables - Spacing */
	--gbh-spacing-xs: 4px;
	--gbh-spacing-sm: 8px;
	--gbh-spacing-md: 16px;
	--gbh-spacing-lg: 24px;

	/* CSS Variables - Container */
	--gbh-border-radius: 8px;
	--gbh-border-width: 1px;
	--gbh-box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);

	/* Apply base styles */
	font-family: var(--gbh-font-family);
	font-size: var(--gbh-font-size-base);
	color: var(--gbh-text-color);
	background: var(--gbh-bg-color);
	border: var(--gbh-border-width) solid var(--gbh-border-color);
	border-radius: var(--gbh-border-radius);
	box-shadow: var(--gbh-box-shadow);
	padding: var(--gbh-spacing-lg);
	max-width: 400px;
}

/* Status Indicator */
.gbh-status {
	display: flex;
	align-items: center;
	gap: var(--gbh-spacing-sm);
	padding-bottom: var(--gbh-spacing-md);
	margin-bottom: var(--gbh-spacing-md);
	border-bottom: var(--gbh-border-width) solid var(--gbh-border-color);
}

.gbh-status-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	flex-shrink: 0;
}

.gbh-status-open .gbh-status-dot {
	background-color: var(--gbh-status-open-color);
}

.gbh-status-closed .gbh-status-dot {
	background-color: var(--gbh-status-closed-color);
}

.gbh-status-opening_soon .gbh-status-dot {
	background-color: var(--gbh-status-soon-color);
}

.gbh-status-text {
	font-size: var(--gbh-font-size-status);
	font-weight: var(--gbh-font-weight-medium);
	line-height: 1.4;
}

/* Regular Hours */
.gbh-regular-hours {
	display: flex;
	flex-direction: column;
	gap: var(--gbh-spacing-xs);
}

.gbh-day-row {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	padding: var(--gbh-spacing-sm);
	border-radius: 4px;
	transition: background-color 0.2s ease;
}


.gbh-current-day {
	background-color: var(--gbh-current-day-bg);
	font-weight: var(--gbh-font-weight-medium);
}

.gbh-day-label {
	font-size: var(--gbh-font-size-day);
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: var(--gbh-text-secondary);
	flex-shrink: 0;
	min-width: 40px;
}

.gbh-day-hours {
	text-align: right;
	flex-grow: 1;
	word-wrap: break-word;
	overflow-wrap: break-word;
	/* Support for split hours - allow wrapping if needed */
	hyphens: auto;
}

.gbh-day-hours.gbh-closed {
	color: var(--gbh-text-secondary);
	font-style: italic;
}

/* Special Hours */
.gbh-special-hours {
	margin-top: var(--gbh-spacing-md);
	padding-top: var(--gbh-spacing-md);
	border-top: var(--gbh-border-width) solid var(--gbh-border-color);
}

.gbh-special-title {
	font-size: var(--gbh-font-size-day);
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: var(--gbh-text-secondary);
	margin-bottom: var(--gbh-spacing-sm);
	font-weight: var(--gbh-font-weight-medium);
}

.gbh-special-day {
	display: flex;
	align-items: center;
	gap: var(--gbh-spacing-sm);
	padding: var(--gbh-spacing-sm);
	margin-bottom: var(--gbh-spacing-xs);
}

.gbh-special-icon {
	font-size: 18px;
	line-height: 1;
	flex-shrink: 0;
}

.gbh-special-label {
	font-size: var(--gbh-font-size-day);
	font-weight: var(--gbh-font-weight-medium);
	min-width: 60px;
}

.gbh-special-time {
	flex-grow: 1;
	text-align: right;
	font-size: var(--gbh-font-size-base);
}

/* Responsive Design */
@media (max-width: 480px) {
	.gbh-hours-widget {
		padding: var(--gbh-spacing-md);
		font-size: 13px;
	}

	.gbh-status-text {
		font-size: 15px;
	}

	.gbh-day-hours {
		font-size: 13px;
	}
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
	.gbh-hours-widget {
		--gbh-border-color: #000000;
		--gbh-border-width: 2px;
	}

	.gbh-status-dot {
		border: 2px solid currentColor;
	}
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
	.gbh-day-row {
		transition: none;
	}
}
