/**
 * Frontend styles for the contact-opening shortcodes.
 *
 * Self-contained: does not rely on Bootstrap or any other framework.
 * Colours can be overridden from a theme through the --co-* variables.
 */

:root {
	--co-text: #212529;
	--co-bg: #fff;
	--co-border: #dee2e6;
	--co-radius: .375rem;
	--co-stripe: rgba(0, 0, 0, .05);

	--co-open: #198754;
	--co-open-bg: #d1e7dd;
	--co-open-border: #a3cfbb;
	--co-open-text: #0a3622;

	--co-changed: #ffc107;
	--co-changed-bg: #fff3cd;
	--co-changed-border: #ffe69c;
	--co-changed-text: #664d03;

	--co-closed: #dc3545;
	--co-closed-bg: #f8d7da;
	--co-closed-border: #f1aeb5;
	--co-closed-text: #58151c;
}

.co-contact,
.co-contact *,
.co-hours,
.co-hours *,
.co-holidays,
.co-holidays * {
	box-sizing: border-box;
}

/* [contactgegevens] and [contactgegevens_kort] */

.co-contact {
	margin: 0 0 1rem;
	padding: 0;
	list-style: none;
}

.co-contact li {
	margin-top: .5rem;
}

.co-contact__name {
	font-weight: 700;
}

/* [openingstijden] */

.co-hours {
	width: fit-content;
	max-width: 100%;
}

.co-hours__list {
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 0;
	list-style: none;
}

.co-hours__item {
	display: block;
	margin: 0;
	padding: .5rem 1rem;
	color: var(--co-text);
	background-color: var(--co-bg);
	border: 1px solid var(--co-border);
}

.co-hours__item + .co-hours__item {
	border-top-width: 0;
}

.co-hours__item:first-child {
	border-top-left-radius: var(--co-radius);
	border-top-right-radius: var(--co-radius);
}

.co-hours__item:last-child {
	border-bottom-right-radius: var(--co-radius);
	border-bottom-left-radius: var(--co-radius);
}

.co-hours__title {
	font-size: calc(1.275rem + .3vw);
	font-weight: 700;
	line-height: 1.5;
}

@media (min-width: 1200px) {
	.co-hours__title {
		font-size: 1.5rem;
	}
}

.co-hours__row {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
}

.co-hours__info {
	margin-right: auto;
	margin-left: .5rem;
}

.co-hours__days {
	padding-right: 3rem;
	font-weight: 700;
}

.co-hours__status {
	padding: 0;
	font-weight: 700;
}

.co-badge {
	display: inline-block;
	margin-top: .5rem;
	padding: .35em .65em;
	font-size: .75em;
	font-weight: 700;
	line-height: 1;
	color: #fff;
	text-align: center;
	white-space: nowrap;
	vertical-align: baseline;
	border-radius: var(--co-radius);
}

.co-badge--open {
	background-color: var(--co-open);
}

.co-badge--closed {
	background-color: var(--co-closed);
}

.co-badge--changed {
	color: var(--co-text);
	background-color: var(--co-changed);
}

.co-status {
	padding: 1rem;
	border: 1px solid transparent;
}

.co-status--open {
	padding: 1rem 1.5rem;
	color: var(--co-open-text);
	background-color: var(--co-open-bg);
	border-color: var(--co-open-border);
}

.co-status--break {
	color: var(--co-changed-text);
	background-color: var(--co-changed-bg);
	border-color: var(--co-changed-border);
}

.co-status--closed {
	color: var(--co-closed-text);
	background-color: var(--co-closed-bg);
	border-color: var(--co-closed-border);
}

.co-notices {
	margin: 0 0 1rem;
	padding: 1rem 0 0;
	list-style: none;
}

.co-notice {
	margin: 0 0 1rem;
	padding: 1rem;
	color: var(--co-changed-text);
	background-color: var(--co-changed-bg);
	border: 1px solid var(--co-changed-border);
	border-radius: var(--co-radius);
}

/* [lijstfeestdagen] */

.co-holidays {
	width: fit-content;
	max-width: 100%;
	overflow-x: auto;
}

.co-holidays__table {
	width: 100%;
	margin: 0 0 1rem;
	border-collapse: collapse;
}

.co-holidays__table th,
.co-holidays__table td {
	padding: .5rem;
	text-align: left;
	vertical-align: top;
	border: 1px solid var(--co-border);
}

.co-holidays__table tbody tr:nth-of-type(odd) > * {
	background-color: var(--co-stripe);
}
