/**
 * OpenTime frontend styles.
 * Scoped to .opentime-* classes to avoid any conflict with Directorist CSS.
 */

.opentime-status {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 8px 0;
	font-size: 13px;
	line-height: 1.4;
}

.opentime-status__badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 10px;
	border-radius: 999px;
	background-color: #6c757d;
	color: #fff;
	font-weight: 600;
	letter-spacing: 0.02em;
	white-space: nowrap;
}

.opentime-status--open .opentime-status__badge {
	background-color: #28a745;
}

.opentime-status--closed .opentime-status__badge {
	background-color: #dc3545;
}

.opentime-status--unknown .opentime-status__badge {
	background-color: #6c757d;
}

.opentime-status__dot {
	font-size: 10px;
	line-height: 1;
}

.opentime-status__note,
.opentime-status__reason {
	color: #6c757d;
	font-size: 13px;
}

.opentime-status__reason {
	font-style: italic;
}

.opentime-single {
	margin-bottom: 14px;
}

.opentime-hours {
	margin: 24px 0 8px;
}

.opentime-hours__title {
	margin: 0 0 12px;
	font-size: 18px;
	font-weight: 700;
}

.opentime-hours__table {
	width: 100%;
	max-width: 100%;
	border-collapse: collapse;
	table-layout: fixed;
}

.opentime-hours__table th,
.opentime-hours__table td {
	padding: 10px 12px;
	text-align: left;
	border-bottom: 1px solid rgba(108, 117, 125, 0.2);
	font-size: 14px;
	font-weight: 400;
	vertical-align: top;
	word-break: break-word;
}

.opentime-hours__table th {
	font-weight: 600;
	width: 45%;
}

.opentime-hours__row--today {
	background-color: rgba(40, 167, 69, 0.08);
}

.opentime-hours__row--today th,
.opentime-hours__row--today td {
	font-weight: 700;
}

.opentime-hours__holidays {
	margin-top: 14px;
	font-size: 14px;
}

.opentime-hours__holidays h4 {
	margin: 0 0 6px;
	font-size: 15px;
}

.opentime-hours__holidays ul {
	margin: 0;
	padding-left: 18px;
}

/* Responsive */
@media (max-width: 575px) {
	.opentime-hours__table th,
	.opentime-hours__table td {
		padding: 8px;
		font-size: 13px;
	}

	.opentime-status {
		font-size: 12px;
	}
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
	.opentime-hours__table th,
	.opentime-hours__table td {
		border-bottom-color: rgba(255, 255, 255, 0.14);
	}

	.opentime-status__note,
	.opentime-status__reason {
		color: #adb5bd;
	}

	.opentime-hours__row--today {
		background-color: rgba(40, 167, 69, 0.18);
	}
}

body.dark .opentime-hours__row--today,
body.directorist-dark .opentime-hours__row--today,
.directorist-dark-mode .opentime-hours__row--today {
	background-color: rgba(40, 167, 69, 0.18);
}

/* Accessibility */
.opentime-status__badge:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}
