/* Venue Availability & Events Calendar — Frontend Styles
   Uses CSS variables for easy theming; inherits theme typography by default. */

.vaec-calendar-wrapper {
	--vaec-border-color: #e2e2e2;
	--vaec-bg: #ffffff;
	--vaec-text: inherit;
	--vaec-muted: #6b6b6b;
	--vaec-radius: 6px;
	--vaec-accent: #1e8e3e;
	font-family: inherit;
	color: var(--vaec-text);
	max-width: 900px;
	margin: 0 auto;
	box-sizing: border-box;
}

.vaec-calendar-wrapper * {
	box-sizing: border-box;
}

.vaec-calendar-title {
	margin: 0 0 1rem;
	font-size: 1.5rem;
}

/* Status indicator */
.vaec-status-indicator {
	border: 2px solid var(--vaec-border-color);
	border-radius: var(--vaec-radius);
	padding: 0.85rem 1.25rem;
	margin-bottom: 1.25rem;
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
}

.vaec-status-eyebrow {
	font-size: 0.75rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--vaec-muted);
}

.vaec-status-label {
	font-size: 1.2rem;
	font-weight: 700;
}

/* Nav */
.vaec-calendar-nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	margin-bottom: 0.75rem;
}

.vaec-current-month {
	margin: 0;
	font-size: 1.1rem;
	flex: 1;
	text-align: center;
}

.vaec-calendar-nav button {
	background: var(--vaec-bg);
	border: 1px solid var(--vaec-border-color);
	border-radius: var(--vaec-radius);
	padding: 0.4rem 0.75rem;
	cursor: pointer;
	font-size: 0.9rem;
}

.vaec-calendar-nav button:hover,
.vaec-calendar-nav button:focus-visible {
	background: #f5f5f5;
	outline: 2px solid var(--vaec-accent);
	outline-offset: 1px;
}

/* Grid */
.vaec-calendar-grid {
	border: 1px solid var(--vaec-border-color);
	border-radius: var(--vaec-radius);
	overflow: hidden;
}

.vaec-grid-header,
.vaec-grid-body {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
}

.vaec-grid-header-cell {
	padding: 0.5rem;
	text-align: center;
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	background: #fafafa;
	border-bottom: 1px solid var(--vaec-border-color);
}

.vaec-grid-cell {
	min-height: 90px;
	border-right: 1px solid var(--vaec-border-color);
	border-bottom: 1px solid var(--vaec-border-color);
	padding: 0.35rem;
	position: relative;
	background: var(--vaec-bg);
}

.vaec-grid-cell:nth-child(7n) {
	border-right: none;
}

.vaec-grid-cell-empty {
	background: #fafafa;
}

.vaec-grid-cell-today {
	background: #fff8e1;
}

.vaec-grid-daynum {
	font-size: 0.85rem;
	font-weight: 600;
	display: block;
	margin-bottom: 0.25rem;
}

.vaec-grid-events {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.vaec-grid-event {
	color: #fff;
	font-size: 0.72rem;
	line-height: 1.3;
	padding: 2px 4px;
	border-radius: 3px;
	cursor: pointer;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.vaec-grid-event:focus-visible {
	outline: 2px solid #000;
}

.vaec-grid-event-title {
	white-space: nowrap;
}

.vaec-grid-event-more {
	font-size: 0.7rem;
	color: var(--vaec-muted);
}

/* Legend */
.vaec-legend {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	padding: 0;
	margin: 1.25rem 0;
}

.vaec-legend-item {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	font-size: 0.85rem;
}

.vaec-legend-swatch {
	width: 12px;
	height: 12px;
	border-radius: 3px;
	display: inline-block;
}

/* Upcoming events */
.vaec-upcoming-events {
	margin-top: 1.5rem;
}

.vaec-upcoming-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.vaec-upcoming-item {
	border: 1px solid var(--vaec-border-color);
	border-radius: var(--vaec-radius);
	padding: 0.75rem 1rem;
	cursor: pointer;
	display: grid;
	grid-template-columns: auto auto 1fr auto;
	align-items: center;
	gap: 0.5rem 0.75rem;
}

.vaec-upcoming-item:focus-visible {
	outline: 2px solid var(--vaec-accent);
}

.vaec-upcoming-notice {
	grid-column: 1 / -1;
	margin: 0.25rem 0 0;
	color: var(--vaec-muted);
	font-size: 0.85rem;
}

.vaec-upcoming-type-badge,
.vaec-modal-type-badge {
	color: #fff;
	font-size: 0.7rem;
	padding: 2px 8px;
	border-radius: 999px;
	display: inline-block;
}

.vaec-upcoming-date {
	font-weight: 600;
	font-size: 0.85rem;
}

/* Modal */
.vaec-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 100000;
	padding: 1rem;
}

.vaec-modal-overlay[hidden] {
	display: none;
}

.vaec-modal {
	background: var(--vaec-bg);
	border-radius: var(--vaec-radius);
	max-width: 480px;
	width: 100%;
	padding: 1.5rem;
	position: relative;
	max-height: 90vh;
	overflow-y: auto;
}

.vaec-modal-close {
	position: absolute;
	top: 0.5rem;
	right: 0.75rem;
	background: none;
	border: none;
	font-size: 1.5rem;
	cursor: pointer;
	line-height: 1;
}

.vaec-modal-title {
	margin: 0.5rem 0 0.25rem;
}

.vaec-modal-date,
.vaec-modal-time {
	margin: 0.1rem 0;
	color: var(--vaec-muted);
	font-size: 0.9rem;
}

.vaec-modal-notice {
	margin-top: 0.75rem;
	font-style: italic;
}

/* Mobile: switch to a list-style presentation instead of a dense grid */
@media (max-width: 600px) {
	.vaec-grid-header {
		display: none;
	}

	.vaec-grid-body {
		display: flex;
		flex-direction: column;
	}

	.vaec-grid-cell {
		border-right: none;
		min-height: unset;
		display: flex;
		align-items: flex-start;
		gap: 0.5rem;
	}

	.vaec-grid-cell-empty {
		display: none;
	}

	.vaec-grid-daynum {
		flex: 0 0 32px;
		margin-bottom: 0;
	}

	.vaec-grid-events {
		flex: 1;
	}

	.vaec-upcoming-item {
		grid-template-columns: 1fr;
	}
}
