/**
 * OpenWulf front-end styles.
 *
 * State is always conveyed by text; colour and the status icon are supplementary
 * only (see the accessibility notes in the README). The current-day row is
 * emphasised with weight and a border in addition to colour. Colours use CSS
 * variables so themes can override them without touching markup.
 */

.openwulf-status,
.openwulf-table,
.openwulf-line {
	--openwulf-open: #1a7f37;
	--openwulf-break: #9a6700;
	--openwulf-closed: #b42318;
}

/* --- Live status --------------------------------------------------------- */

.openwulf-status {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	font-weight: 600;
}

.openwulf-status__icon {
	display: inline-block;
	width: 0.7em;
	height: 0.7em;
	border-radius: 50%;
	background: currentColor;
	flex: 0 0 auto;
}

.openwulf-status__sep {
	opacity: 0.5;
}

.openwulf-status--open {
	color: var(--openwulf-open);
}

.openwulf-status--break {
	color: var(--openwulf-break);
}

.openwulf-status--closed {
	color: var(--openwulf-closed);
}

.openwulf-status__detail {
	font-weight: 400;
}

/* --- Opening-hours table ------------------------------------------------- */

.openwulf-table {
	width: 100%;
	max-width: 32rem;
	border-collapse: collapse;
}

.openwulf-table th,
.openwulf-table td {
	padding: 0.4em 0.75em;
	text-align: left;
	vertical-align: top;
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.openwulf-table thead th {
	font-weight: 700;
}

.openwulf-table__day {
	font-weight: 500;
}

.openwulf-table__hours {
	text-align: right;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.openwulf-table__row--today {
	font-weight: 700;
	box-shadow: inset 0.2em 0 0 0 currentColor;
}

.openwulf-table__row--today .openwulf-table__day {
	padding-left: 0.55em;
}

.openwulf-table__closed {
	opacity: 0.75;
	font-style: italic;
}

/* --- One-line ------------------------------------------------------------ */

.openwulf-line__day {
	font-weight: 600;
}

.openwulf-line__sep {
	opacity: 0.5;
}

.openwulf-line__closed {
	opacity: 0.75;
	font-style: italic;
}

/* Screen-reader-only utility, in case the active theme does not provide it. */
.openwulf-status .screen-reader-text,
.openwulf-table .screen-reader-text,
.openwulf-line .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* --- Emergency service (Notdienst) -------------------------------------- */

.openwulf-emergency__banner {
	margin: 0 0 1rem;
}

.openwulf-emergency__banner--own {
	background: #f0f5f1;
	border-left: 4px solid #2d5a3d;
	border-radius: 6px;
	padding: 1rem 1.25rem;
	font-weight: 600;
}

.openwulf-emergency__subhead {
	margin: 1.5rem 0 0.75rem;
}

.openwulf-emergency__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.openwulf-emergency__item {
	display: grid;
	gap: 0.15rem;
	padding: 1rem 1.25rem;
	margin-bottom: 0.75rem;
	background: #fafafa;
	border: 1px solid #d8d2c8;
	border-left: 4px solid #93584c;
	border-radius: 6px;
}

.openwulf-emergency__item--own {
	border-left-color: #2d5a3d;
	background: #f0f5f1;
}

.openwulf-emergency__name {
	font-weight: 600;
}

.openwulf-emergency__phone {
	font-weight: 600;
	text-decoration: none;
}

.openwulf-emergency__phone:hover {
	text-decoration: underline;
}

.openwulf-emergency__time {
	font-size: 0.9em;
	opacity: 0.8;
}

.openwulf-emergency__source {
	font-size: 0.8em;
	opacity: 0.7;
	margin-top: 0.75rem;
}
