:root {
	--nest-at-page-width: min(1280px, calc(100vw - 64px));
	--nest-at-primary: var(--wp--preset--color--primary, #2563eb);
	--nest-at-border: var(--wp--preset--color--contrast-3, #ddd);
	--nest-at-soft: var(--wp--preset--color--base-2, #f7f7f7);
	--nest-at-text: var(--wp--preset--color--contrast, #1f2937);
	--nest-at-muted: #666;
}

.nest-at-page .entry-content,
.nest-at-page .wp-block-post-content,
.nest-at-page main .wp-block-group,
.nest-at-page main .wp-block-group__inner-container {
	max-width: none;
}

.nest-attendance-tracker,
.nest-attendance-archive {
	width: var(--nest-at-page-width);
	max-width: none;
	margin-right: auto;
	margin-left: auto;
	color: var(--nest-at-text);
}

.nest-attendance-tracker *,
.nest-attendance-archive *,
.nest-at-dashboard-panel *,
.nest-at-modal * {
	box-sizing: border-box;
}

.nest-at-table-scroll {
	width: 100%;
	overflow-x: auto;
	border: 1px solid var(--nest-at-border);
	border-radius: 8px;
	background: #fff;
}

.nest-at-export-toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: flex-end;
	margin-bottom: 12px;
}

.nest-at-tracker-select {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: end;
	margin-bottom: 16px;
}

.nest-at-tracker-select label {
	display: grid;
	gap: 4px;
	font-weight: 600;
}

.nest-at-tracker-select select {
	min-width: min(100%, 360px);
	padding: 8px 10px;
	border: 1px solid #bbb;
	border-radius: 4px;
	background: #fff;
}

.nest-at-print-title {
	display: none;
}

.nest-at-table {
	width: 100%;
	min-width: 760px;
	border-collapse: collapse;
}

.nest-at-table th,
.nest-at-table td {
	padding: 10px 12px;
	border-bottom: 1px solid var(--nest-at-border);
	text-align: center;
	vertical-align: middle;
	white-space: nowrap;
}

.nest-at-table th:first-child {
	position: sticky;
	left: 0;
	z-index: 1;
	text-align: left;
	background: var(--nest-at-soft);
}

.nest-at-table thead th {
	position: sticky;
	top: 0;
	z-index: 2;
	background: var(--nest-at-soft);
	font-weight: 600;
}

.nest-at-status {
	min-width: 110px;
	padding: 6px 8px;
	border: 1px solid #bbb;
	border-radius: 4px;
	background: #fff;
}

.nest-at-status.is-saving {
	opacity: 0.65;
}

.nest-at-status.is-error {
	border-color: #c00;
}

.nest-at-widget {
	max-width: 520px;
	margin-top: 12px;
}

.nest-at-widget-date {
	margin: 0 0 10px;
	text-align: center;
	font-size: 1rem;
}

.nest-at-widget-list {
	display: grid;
	gap: 6px;
}

.nest-at-widget-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 132px;
	gap: 12px;
	align-items: center;
	padding: 4px 0;
	border-bottom: 1px solid var(--nest-at-border);
}

.nest-at-widget-name {
	overflow-wrap: anywhere;
}

.nest-at-widget-nav {
	display: flex;
	justify-content: space-between;
	margin-top: 12px;
}

.nest-at-empty {
	margin: 0;
	color: var(--nest-at-muted);
}

.nest-at-modal .nest-modal-content {
	width: min(92vw, 760px);
}

.nest-at-wizard-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
}

.nest-at-weekdays {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.nest-at-checkbox {
	display: inline-flex;
	gap: 6px;
	align-items: center;
	padding: 6px 10px;
	border: 1px solid var(--nest-at-border);
	border-radius: 4px;
	background: #fff;
	font-weight: 500;
}

.nest-at-holiday-header,
.nest-at-modal-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	justify-content: space-between;
}

.nest-at-holiday {
	position: relative;
	margin-top: 12px;
	padding: 14px;
	border: 1px solid var(--nest-at-border);
	border-radius: 8px;
	background: var(--nest-at-soft);
}

.nest-at-remove-holiday {
	position: absolute;
	top: 8px;
	right: 10px;
	border: 0;
	background: transparent;
	cursor: pointer;
	font-size: 1.25rem;
	line-height: 1;
}

.nest-at-message {
	min-height: 1.4em;
	margin: 12px 0;
	color: green;
}

.nest-at-message.is-error {
	color: #c00;
}

.nest-at-archive-select {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	margin-bottom: 18px;
}

.nest-at-archive-select select {
	min-width: 260px;
	padding: 8px 10px;
	border: 1px solid #bbb;
	border-radius: 4px;
}

@media (max-width: 700px) {
	:root {
		--nest-at-page-width: calc(100vw - 32px);
	}

	.nest-at-wizard-grid,
	.nest-at-widget-row {
		grid-template-columns: 1fr;
	}

	.nest-at-status {
		width: 100%;
	}
}

@page {
	margin: 0.18in 0.22in;
}

@media print {
	html,
	body {
		margin: 0;
		padding: 0;
	}

	body * {
		visibility: hidden;
	}

	.nest-attendance-tracker,
	.nest-attendance-tracker * {
		visibility: visible;
	}

	.nest-attendance-tracker {
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		margin: 0;
		padding: 0;
		color: #000;
	}

	.nest-at-export-toolbar,
	.nest-at-archive-select {
		display: none;
	}

	.nest-at-print-title {
		display: block;
		margin: 0 0 10px;
		padding: 0;
		color: #000;
		font-size: 16px;
		font-weight: 700;
		line-height: 1.2;
	}

	.nest-at-table-scroll {
		overflow: visible;
		border: 0;
	}

	.nest-at-table {
		min-width: 0;
		font-size: 10px;
	}

	.nest-at-table th:first-child,
	.nest-at-table thead th {
		position: static;
	}
}
