/* ==========================================================================
   TablePress → CF7  |  Front-end Checkbox Group Styles
   ========================================================================== */

/**
 * Wrapper: responsive grid — fills available width, wraps into columns.
 * Each checkbox item is at least 260px wide, so ~3 columns on desktop.
 */
.tpcf7-checkbox-group {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 0.3rem 1.5rem;
	padding: 0.25rem 0;
}

/* Reset CF7 list-item defaults inside our group */
.tpcf7-checkbox-group .wpcf7-list-item {
	margin: 0;
	display: flex;
}

/* Individual label row */
.tpcf7-checkbox-group .wpcf7-list-item label {
	display: flex;
	align-items: flex-start;
	gap: 0.55rem;
	width: 100%;
	cursor: pointer;
	padding: 0.3rem 0.4rem;
	border-radius: 4px;
	transition: background-color 0.14s ease;
	line-height: 1.45;
}

.tpcf7-checkbox-group .wpcf7-list-item label:hover {
	background-color: rgba(0, 0, 0, 0.045);
}

/* Checkbox input */
.tpcf7-checkbox-group .wpcf7-list-item input[type="checkbox"] {
	flex-shrink: 0;
	margin-top: 0.18em;
	width: 1rem;
	height: 1rem;
	accent-color: #1a73e8;
	cursor: pointer;
}

/* Label text */
.tpcf7-checkbox-group .wpcf7-list-item-label {
	font-size: 0.875rem;
	color: inherit;
}

/* Validation error state — CF7 adds .wpcf7-not-valid to the wrapper */
.tpcf7-checkbox-group.wpcf7-not-valid {
	outline: 2px solid #dc3232;
	border-radius: 4px;
	outline-offset: 2px;
}

/* Dev-only error message (only shown when WP_DEBUG is true) */
.tpcf7-error {
	color: #cc0000;
	font-size: 0.85rem;
	font-style: italic;
	margin: 0.25rem 0;
}
