/* Forminator Image Choices — front-end styles */

/* Image choice grid — wraps all options */
.forminator-field .fic-choices-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Each choice card */
.fic-choice-item {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}

/* The real checkbox/radio — hidden visually but still accessible */
.fic-choice-item input[type="radio"],
.fic-choice-item input[type="checkbox"] {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
	pointer-events: none;
}

/* Clickable card */
.fic-choice-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	cursor: pointer;
	border: 2px solid #e0e0e0;
	border-radius: 8px;
	padding: 10px;
	width: 130px;
	background: #fff;
	transition: border-color 0.18s, box-shadow 0.18s;
	user-select: none;
}

.fic-choice-card:hover {
	border-color: #a0a0a0;
	box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Selected state */
.fic-choice-item input:checked + .fic-choice-card {
	border-color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1;
	background: #f0f6fc;
}

/* Image inside the card */
.fic-choice-card .fic-img {
	width: 100px;
	height: 80px;
	object-fit: cover;
	border-radius: 4px;
	display: block;
	margin-bottom: 8px;
}

/* Label text */
.fic-choice-card .fic-label {
	font-size: 13px;
	line-height: 1.3;
	color: #1d2327;
	word-break: break-word;
}

/* Checkmark badge for selected items */
.fic-choice-item input:checked + .fic-choice-card::after {
	content: "✓";
	position: absolute;
	top: 6px;
	right: 6px;
	width: 20px;
	height: 20px;
	background: #2271b1;
	color: #fff;
	border-radius: 50%;
	font-size: 12px;
	line-height: 20px;
	text-align: center;
}

/* Fallback: if no image is set, just style the label nicely */
.fic-choice-card.fic-no-image .fic-label {
	padding: 8px 4px;
}

/* Responsive */
@media (max-width: 480px) {
	.fic-choices-grid {
		gap: 8px;
	}
	.fic-choice-card {
		width: 100px;
		padding: 8px;
	}
	.fic-choice-card .fic-img {
		width: 80px;
		height: 64px;
	}
}
