.tag-grid-wrap {
	--tag-full-color: #2e7d32;
	--tag-partial-color: #f9a825;
	--tag-neutral-color: #f1f3f5;
	margin: 1rem 0;
}

.tag-legend,
.tag-inline-form,
.tag-help-text,
.tag-status,
.tag-best-slots-list,
.tag-summary-box {
	margin-bottom: 1rem;
}

.tag-inline-form {
	display: flex;
	gap: 0.75rem;
	align-items: center;
	flex-wrap: wrap;
}

.tag-inline-form select,
.tag-inline-form button {
	min-height: 38px;
}

.tag-legend {
	display: flex;
	gap: 1rem;
	flex-wrap: wrap;
	font-size: 0.95rem;
}

.tag-swatch {
	display: inline-block;
	width: 14px;
	height: 14px;
	border-radius: 3px;
	vertical-align: middle;
	margin-right: 0.35rem;
	border: 1px solid #c8ccd0;
}

.tag-swatch.full { background: var(--tag-full-color); }
.tag-swatch.partial { background: var(--tag-partial-color); }
.tag-swatch.neutral { background: var(--tag-neutral-color); }

.tag-grid-scroll {
	overflow-x: auto;
	border: 1px solid #dcdcde;
	border-radius: 6px;
	background: #fff;
}

.tag-availability-table {
	width: 100%;
	border-collapse: collapse;
	min-width: 720px;
}

.tag-availability-table th,
.tag-availability-table td {
	border: 1px solid #dcdcde;
	padding: 0;
	text-align: center;
	vertical-align: middle;
}

.tag-availability-table th {
	background: #f6f7f7;
	padding: 0.75rem;
	font-weight: 600;
}

.tag-slot.tag-slot-full { background: var(--tag-full-color); }
.tag-slot.tag-slot-partial { background: var(--tag-partial-color); }
.tag-slot.tag-slot-neutral { background: var(--tag-neutral-color); }

.tag-slot-button,
.tag-slot-readonly {
	width: 100%;
	min-height: 58px;
	padding: 0.5rem;
	border: 0;
	background: transparent;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.2rem;
	font: inherit;
}

.tag-slot-readonly {
	cursor: default;
}

.tag-slot-button:focus-visible {
	outline: 3px solid #1d4ed8;
	outline-offset: -3px;
}

.tag-slot .tag-count {
	font-weight: 700;
	font-size: 0.95rem;
	color: #111;
}

.tag-slot-full .tag-count,
.tag-slot-full .tag-own-state {
	color: #fff;
}

.tag-own-state {
	font-size: 0.8rem;
	min-height: 1em;
}

.tag-slot.is-mine-active .tag-slot-button {
	box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.3);
}

.tag-status {
	min-height: 1.5rem;
	font-size: 0.95rem;
}

.tag-summary-box,
.tag-card {
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 6px;
	padding: 1rem;
}

.tag-best-slots-list {
	padding-left: 1.2rem;
}

.tag-best-slots-list .is-best {
	font-weight: 700;
}

.tag-admin-cards,
.tag-admin-columns {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 1rem;
	margin: 1rem 0;
}

@media (max-width: 782px) {
	.tag-legend,
	.tag-inline-form {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.5rem;
	}
}
