/* Blackcat Hub public calendar. Uses the site's brand variables, with fallbacks. */

.bhc {
	--bhc-red: var(--brand-red, #cc2615);
	--bhc-red-dark: var(--brand-red-dark, #9c1c10);
	--bhc-ink: var(--brand-ink, #1a1a1a);
	--bhc-muted: var(--brand-muted, #6f6f6f);
	--bhc-border: var(--brand-border, #e5e0d8);
	--bhc-cream: var(--brand-cream, #f6f3ee);
	--bhc-white: var(--brand-white, #fff);
	color: var(--bhc-ink);
	font-size: 15px;
	line-height: 1.4;
}
.bhc *, .bhc *::before, .bhc *::after { box-sizing: border-box; }
.bhc-loading { color: var(--bhc-muted); }

/* Toolbar */
.bhc-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.bhc-title { margin: 0 6px; font-size: 1.5rem; min-width: 190px; text-align: center; }
.bhc-nav, .bhc-today {
	appearance: none; border: 1px solid var(--bhc-border); background: var(--bhc-white); color: var(--bhc-ink);
	border-radius: 8px; cursor: pointer; font: inherit; line-height: 1;
}
.bhc-nav { width: 38px; height: 38px; font-size: 22px; }
.bhc-today { height: 38px; padding: 0 14px; font-size: 14px; font-weight: 600; }
.bhc-nav:hover, .bhc-today:hover { border-color: var(--bhc-red); color: var(--bhc-red); }
.bhc-nav:focus-visible, .bhc-today:focus-visible, .bhc-cell:focus-visible, .bhc-list-item:focus-visible, .bhc-close:focus-visible { outline: 2px solid var(--bhc-red); outline-offset: 2px; }
.bhc-spinner { width: 18px; height: 18px; border: 2px solid var(--bhc-border); border-top-color: var(--bhc-red); border-radius: 50%; animation: bhc-spin .7s linear infinite; }
@keyframes bhc-spin { to { transform: rotate(360deg); } }
.bhc-error { color: var(--bhc-red-dark); font-weight: 600; }

.bhc-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: -4px 0 12px; font-size: 13px; color: var(--bhc-muted); }
.bhc-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.bhc-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

/* Pills */
.bhc-pill { display: inline-block; align-self: flex-start; color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .02em; padding: 2px 8px; border-radius: 999px; line-height: 1.4; white-space: nowrap; }
.bhc-pill-outline { background: transparent; color: var(--bhc-red); border: 1px solid var(--bhc-red); }

/* Desktop grid */
.bhc-grid {
	display: grid;
	grid-template-columns: minmax(0, .55fr) repeat(5, minmax(0, 1fr)) minmax(0, .55fr);
	border: 1px solid var(--bhc-border); border-radius: 10px; overflow: hidden; background: var(--bhc-border); gap: 1px;
}
.bhc-grid.is-loading { opacity: .5; pointer-events: none; }
.bhc-weekday { background: var(--bhc-cream); padding: 8px 10px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--bhc-muted); }

.bhc-cell {
	appearance: none; border: 0; margin: 0; font: inherit; color: inherit; text-align: left; cursor: pointer;
	display: flex; flex-direction: column; gap: 4px; min-height: 118px; padding: 8px 10px;
	background: var(--bhc-white); min-width: 0; overflow: hidden;
}
.bhc-cell:hover { background: #fdfcfa; box-shadow: inset 0 0 0 2px var(--bhc-red); }
.bhc-cell.is-weekend { background: var(--bhc-cream); }
.bhc-cell.is-off:not(.is-weekend) { background: repeating-linear-gradient(135deg, var(--bhc-white), var(--bhc-white) 8px, var(--bhc-cream) 8px, var(--bhc-cream) 16px); }
.bhc-cell.is-other-month { opacity: .4; }
.bhc-num { font-weight: 700; font-size: 14px; width: 26px; height: 26px; line-height: 26px; text-align: center; border-radius: 50%; margin: -2px 0 0 -4px; }
.bhc-cell.is-today .bhc-num { background: var(--bhc-red); color: #fff; }
.bhc-entree { font-weight: 600; font-size: 13px; line-height: 1.3; }
.bhc-sides { font-size: 12px; color: var(--bhc-muted); line-height: 1.3; }
.bhc-events { display: flex; flex-direction: column; gap: 3px; margin-top: auto; }
.bhc-event { display: block; font-size: 12px; background: color-mix(in srgb, var(--bhc-red) 9%, var(--bhc-white)); border-left: 3px solid var(--bhc-red); padding: 2px 6px; border-radius: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bhc-more { font-size: 12px; color: var(--bhc-muted); }

/* Phone list (hidden on desktop) */
.bhc-list { display: none; }
.bhc-empty { color: var(--bhc-muted); }

/* Lunch info */
.bhc-lunch-info { margin-top: 18px; padding: 14px 16px; background: var(--bhc-cream); border: 1px solid var(--bhc-border); border-radius: 10px; font-size: 14px; }
.bhc-lunch-info p { margin: 0; }
.bhc-lunch-info p + p { margin-top: 6px; }
.bhc-prices { display: flex; flex-wrap: wrap; gap: 4px 20px; }

/* Day dialog */
.bhc-dialog { width: min(520px, calc(100vw - 24px)); max-height: calc(100vh - 48px); padding: 0; border: 0; border-radius: 14px; box-shadow: 0 20px 50px rgba(0,0,0,.25); color: var(--brand-ink, #1a1a1a); font-size: 15px; }
.bhc-dialog::backdrop { background: rgba(12, 12, 12, .45); }
.bhc-d-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 18px 20px 12px; border-bottom: 1px solid var(--brand-border, #e5e0d8); position: sticky; top: 0; background: #fff; }
.bhc-d-head h3 { margin: 0 0 6px; font-size: 1.25rem; }
.bhc-close { appearance: none; border: 0; background: none; font-size: 28px; line-height: 1; cursor: pointer; color: var(--brand-muted, #6f6f6f); padding: 0 4px; }
.bhc-d-body { padding: 6px 20px 20px; }
.bhc-d-note { margin: 12px 0 0; padding: 10px 12px; background: color-mix(in srgb, var(--brand-red, #cc2615) 7%, #fff); border-left: 4px solid var(--brand-red, #cc2615); border-radius: 4px; }
.bhc-d-note > :first-child { margin-top: 0; }
.bhc-d-note > :last-child { margin-bottom: 0; }
.bhc-d-off { margin: 14px 0 0; font-weight: 600; color: var(--brand-muted, #6f6f6f); }
.bhc-d-section { margin-top: 16px; }
.bhc-d-section h4 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--brand-muted, #6f6f6f); }
.bhc-d-lunch { margin: 0; padding: 0; list-style: none; }
.bhc-d-lunch li { padding: 3px 0; }
.bhc-d-lunch li.is-entree { font-weight: 700; }
.bhc-d-event { padding: 8px 0; border-bottom: 1px solid var(--brand-border, #e5e0d8); }
.bhc-d-event:last-child { border-bottom: 0; }
.bhc-d-event strong, .bhc-d-meta { display: block; }
.bhc-d-meta { font-size: 13px; color: var(--brand-muted, #6f6f6f); }
.bhc-d-desc { margin: 6px 0 0; font-size: 14px; white-space: pre-line; }
.bhc-d-sched { width: 100%; border-collapse: collapse; font-size: 14px; }
.bhc-d-sched td { padding: 5px 0; border-bottom: 1px solid var(--brand-border, #e5e0d8); }
.bhc-d-sched td + td { text-align: right; color: var(--brand-muted, #6f6f6f); font-variant-numeric: tabular-nums; }
.bhc-d-sched tr.is-wave td { padding-left: 14px; font-size: 13px; color: var(--brand-muted, #6f6f6f); }

@media (max-width: 767px) {
	.bhc-title { min-width: 0; flex: 1; font-size: 1.25rem; }
	.bhc-grid { display: none; }
	.bhc-list { display: flex; flex-direction: column; gap: 8px; }
	.bhc-list-item {
		appearance: none; font: inherit; color: inherit; text-align: left; cursor: pointer; width: 100%;
		display: flex; flex-direction: column; gap: 4px; padding: 12px 14px;
		background: var(--bhc-white); border: 1px solid var(--bhc-border); border-radius: 10px;
	}
	.bhc-list-item.is-today { border-color: var(--bhc-red); box-shadow: inset 4px 0 0 var(--bhc-red); }
	.bhc-list-date { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
	.bhc-list-lunch { font-size: 14px; color: var(--bhc-muted); }
	.bhc-dialog { width: 100vw; max-width: 100vw; max-height: 88vh; margin: auto auto 0; border-radius: 14px 14px 0 0; }
}
