/*
 * Opening hours and social profiles.
 *
 * Two small blocks rendered by inc/opening-hours.php
 * (harbor_coffee_roasters_opening_hours_list() and
 * harbor_coffee_roasters_social_links_list()). Every colour comes from a theme
 * token, and the dark-footer variants are scoped under .hcr-site-footer, so the
 * same markup stays readable on a cream page and on the dark footer band.
 */

/* --------------------------------------------- the compact header bar --- */

/*
 * A single strip above the nav: today's hours on the left, the social icons on
 * the right. Mobile-first — the strip is a wrapping flex row with no fixed
 * width anywhere, so at 320px it simply stacks onto two lines and nothing can
 * scroll sideways.
 */

.hcr-topbar {
	background: var(--color-neutral-900);
	color: var(--color-neutral-200);
	font-family: var(--font-body);
	font-size: var(--text-xs);
}

.hcr-topbar__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-1) var(--space-4);
	padding-block: var(--space-2);
	min-width: 0;
}

.hcr-hours-today {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--space-1) var(--space-2);
	margin: 0;
	min-width: 0;
	color: var(--color-neutral-200);
	line-height: var(--leading-snug);
}

.hcr-hours-today__icon {
	flex: none;
	color: var(--color-accent-300);
}

.hcr-hours-today__label {
	font-variant-numeric: tabular-nums;
}

.hcr-hours-today__status {
	display: inline-flex;
	align-items: center;
	gap: var(--space-2);
	padding: var(--space-1) var(--space-3);
	border-radius: var(--radius-full);
	background: var(--color-neutral-800);
	color: var(--color-neutral-200);
	font-weight: var(--weight-medium);
	letter-spacing: var(--letter-wide);
	text-transform: uppercase;
}

.hcr-hours-today__status::before {
	content: "";
	width: 0.5rem;
	height: 0.5rem;
	border-radius: var(--radius-full);
	background: var(--color-neutral-400);
}

.hcr-hours-today__status--open {
	color: var(--color-accent-200);
}

.hcr-hours-today__status--open::before {
	background: var(--color-accent-300);
}

/* Icons-only social row inside the strip. */
.hcr-social--compact {
	margin-top: 0;
}

.hcr-social--compact .hcr-social__list {
	gap: var(--space-1);
}

.hcr-social--compact .hcr-social__link {
	padding: var(--space-2);
	border: var(--border-width) solid transparent;
	border-radius: var(--radius-full);
	background: transparent;
	color: var(--color-neutral-200);
}

.hcr-social--compact .hcr-social__link:hover,
.hcr-social--compact .hcr-social__link:focus-visible {
	border-color: var(--color-accent-300);
	background: transparent;
	color: var(--color-accent-300);
}

/* ------------------------------------------------------ opening hours --- */

.hcr-hours__heading,
.hcr-social__heading {
	margin: 0 0 var(--space-4);
	color: var(--color-text);
	font-family: var(--font-heading);
	font-size: var(--text-sm);
	font-weight: var(--weight-semibold);
	letter-spacing: var(--letter-wide);
	text-transform: uppercase;
}

.hcr-hours__list {
	display: flex;
	flex-direction: column;
	gap: var(--space-2);
	margin: 0;
	font-family: var(--font-body);
	font-size: var(--text-sm);
	line-height: var(--leading-normal);
}

.hcr-hours__row {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: var(--space-2) var(--space-4);
	justify-content: space-between;
	max-width: 24rem;
}

.hcr-hours__days {
	margin: 0;
	color: var(--color-text);
	font-weight: var(--weight-medium);
}

.hcr-hours__time {
	margin: 0;
	color: var(--color-text-muted);
	font-variant-numeric: tabular-nums;
}

.hcr-hours__row--closed .hcr-hours__time {
	color: var(--color-primary-600);
	font-weight: var(--weight-medium);
}

/* ----------------------------------------------------- social profiles --- */

.hcr-social {
	margin-top: var(--space-6);
}

.hcr-social__list {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2) var(--space-3);
	margin: 0;
	padding: 0;
	list-style: none;
}

.hcr-social__item {
	margin: 0;
}

.hcr-social__link {
	display: inline-flex;
	align-items: center;
	gap: var(--space-2);
	padding: var(--space-2) var(--space-4);
	border: var(--border-width) solid var(--color-border);
	border-radius: var(--radius-full);
	background: var(--color-surface);
	color: var(--color-text);
	font-family: var(--font-body);
	font-size: var(--text-xs);
	font-weight: var(--weight-medium);
	letter-spacing: var(--letter-wide);
	text-decoration: none;
	text-transform: uppercase;
	transition:
		background-color var(--duration-fast) var(--ease-default),
		border-color var(--duration-fast) var(--ease-default),
		color var(--duration-fast) var(--ease-default),
		transform var(--duration-fast) var(--ease-default);
}

.hcr-social__link:hover,
.hcr-social__link:focus-visible {
	border-color: var(--color-primary-600);
	background: var(--color-primary-600);
	color: var(--color-on-primary);
	transform: translateY(-1px);
}

.hcr-social__link:focus-visible {
	outline: 3px solid var(--color-accent-300);
	outline-offset: 2px;
}

.hcr-social__icon {
	flex: none;
	width: 1.125rem;
	height: 1.125rem;
}

.hcr-social--compact .hcr-social__icon {
	width: 1.25rem;
	height: 1.25rem;
}

/* ------------------------------------------- inside the dark footer --- */

.hcr-site-footer .hcr-hours__heading,
.hcr-site-footer .hcr-social__heading {
	color: var(--color-neutral-50);
}

.hcr-site-footer .hcr-hours__days {
	color: var(--color-neutral-200);
}

.hcr-site-footer .hcr-hours__time {
	color: var(--color-neutral-300);
}

.hcr-site-footer .hcr-hours__row--closed .hcr-hours__time {
	color: var(--color-accent-300);
}

.hcr-site-footer .hcr-social__link {
	border-color: var(--color-neutral-700);
	background: transparent;
	color: var(--color-neutral-200);
}

.hcr-site-footer .hcr-social__link:hover,
.hcr-site-footer .hcr-social__link:focus-visible {
	border-color: var(--color-accent-300);
	background: var(--color-accent-300);
	color: var(--color-neutral-900);
}

/* The footer gains a fourth column once hours are rendered in it. */
@media (min-width: 48em) {
	.hcr-site-footer__inner--with-hours {
		grid-template-columns: 1.3fr 1fr 1fr 1.1fr;
		gap: var(--space-10);
	}
}

@media (prefers-reduced-motion: reduce) {
	.hcr-social__link {
		transition: none;
	}

	.hcr-social__link:hover,
	.hcr-social__link:focus-visible {
		transform: none;
	}
}
