/* ── CF Card Select: Frontend ───────────────────────────────────────────────── */

/* Grid: auto-fit equal-width columns; items stretch to the same row height */
.cf-card-select__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 16px;
	align-items: stretch;
}

/*
 * Label IS the card.
 * Two columns: checkbox/radio on the left, card content on the right.
 * Matches cf-feature-card shell exactly (white, 16 px radius, 24 px pad, shadow).
 */
.cf-card-select__item {
	display: flex;
	flex-direction: row;
	align-items: flex-start;
	gap: 16px;
	padding: 24px;
	background: #ffffff;
	border-radius: 16px;
	border: 2px solid transparent;
	box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
	overflow: hidden;
	cursor: pointer;
	transition: border-color 0.15s, box-shadow 0.15s;
}

/* Checkbox / radio — visible left column */
.cf-card-select__input {
	flex-shrink: 0;
	width: 18px;
	height: 18px;
	margin-top: 2px; /* align with first text baseline */
	cursor: pointer;
	accent-color: #2050ce;
}

/* Right column — stacks icon → title → description */
.cf-card-select__card {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
}

/* Selected state — blue border + soft glow */
.cf-card-select__item.is-selected {
	border-color: #2050ce;
	box-shadow: 0 0 0 4px rgba(32, 80, 206, 0.10), 0 2px 20px rgba(0, 0, 0, 0.08);
}

/* Keyboard focus — ring on the native input */
.cf-card-select__input:focus-visible {
	outline: 2px solid #2050ce;
	outline-offset: 2px;
}

/* Icon — matches cf-feature-card__icon */
.cf-card-select__icon {
	display: block;
	margin-bottom: 0.75rem;
	line-height: 0;
}

.cf-card-select__icon img {
	display: block;
	width: 36px;
	height: 36px;
	object-fit: contain;
}

/* Title */
.cf-card-select__label {
	display: block;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.3;
	margin: 0 0 12px;
}

/* Description — matches cf-feature-card__desc */
.cf-card-select__desc {
	display: block;
	font-size: 0.9rem;
	line-height: 1.6;
	margin: 0;
	opacity: 0.75;
}

/* Single column on narrow screens */
@media (max-width: 480px) {
	.cf-card-select__grid {
		grid-template-columns: 1fr;
	}
}


/* ── CF Card Select: Admin (GF editor sidebar) ──────────────────────────────── */

/* Individual choice row */
.cf-cs-row {
	border: 1px solid #dcdcdc;
	border-radius: 4px;
	padding: 12px 12px 8px;
	margin-bottom: 8px;
	background: #fafafa;
	position: relative;
}

/* 2-column grid for label / value; description and icon span full width */
.cf-cs-row__fields {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	margin-bottom: 6px;
}

.cf-cs-field {
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.cf-cs-field--full {
	grid-column: 1 / -1;
}

.cf-cs-field label {
	font-size: 11px;
	font-weight: 600;
	color: #444;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

.cf-cs-field input[type="text"],
.cf-cs-field input[type="url"],
.cf-cs-field textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 4px 6px;
	font-size: 13px;
	border: 1px solid #dcdcdc;
	border-radius: 3px;
	background: #fff;
}

/* Icon row: URL field + Select button + preview thumbnail */
.cf-cs-field--icon {
	grid-column: 1 / -1;
	display: grid;
	grid-template-columns: 1fr auto auto;
	align-items: end;
	gap: 6px;
}

.cf-cs-field--icon label {
	grid-column: 1 / -1;
}

.cf-cs-icon-preview {
	width: 32px;
	height: 32px;
	object-fit: contain;
	border: 1px solid #dcdcdc;
	border-radius: 3px;
	background: #fff;
}

/* Remove button */
.cf-cs-remove {
	position: absolute;
	top: 8px;
	right: 8px;
	color: #b32d2e !important;
	font-size: 12px;
	background: none;
	border: none;
	cursor: pointer;
	padding: 2px 4px;
	line-height: 1;
}

.cf-cs-remove:hover {
	text-decoration: underline;
}

/* Empty-state hint */
#cf-cs-list:empty::before {
	content: 'No choices yet — click \201C+ Add Choice\201D to get started.';
	display: block;
	padding: 12px;
	color: #888;
	font-style: italic;
	font-size: 13px;
	text-align: center;
	border: 2px dashed #dcdcdc;
	border-radius: 4px;
}
