/* ---- Layout ---- */
.ets-samples-wrap {
	display: flex;
	gap: 24px;
	margin: 20px 0;
	align-items: flex-start;
}

.ets-samples-grid {
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax( 180px, 1fr ) );
	gap: 16px;
	flex: 1 1 0;
}

/* ---- Card ---- */
.ets-sample-card {
	border: 2px solid #e2e2e2;
	border-radius: 10px;
	overflow: hidden;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	background: #fff;
	transition: border-color .15s, box-shadow .15s;
	position: relative;
	user-select: none;
}

.ets-sample-card:hover {
	border-color: #aaa;
	box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

/* Hide the native checkbox - interaction is via the whole card */
.ets-sample-checkbox {
	position: absolute;
	opacity: 0;
	pointer-events: none;
	width: 0;
	height: 0;
}

/* Image area */
.ets-sample-image {
	display: block;
	width: 100%;
	aspect-ratio: 4/3;
	overflow: hidden;
	background: #f5f5f5;
	position: relative;
}

.ets-sample-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .2s;
}

.ets-sample-card:hover .ets-sample-image img {
	transform: scale(1.03);
}

/* Checkmark circle - top right of image */
.ets-sample-check {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: rgba(255,255,255,.85);
	border: 2px solid #ccc;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background .15s, border-color .15s;
	z-index: 2;
}

.ets-sample-check svg {
	display: none;
	width: 14px;
	height: 14px;
}

/* Card text */
.ets-sample-info {
	padding: 10px 12px 12px;
}

.ets-sample-name {
	display: block;
	font-weight: 600;
	font-size: 14px;
	color: #1a1a1a;
	margin-bottom: 2px;
}

.ets-sample-spec {
	display: block;
	font-size: 12px;
	color: #666;
}

/* ---- Selected state ---- */
.ets-sample-card.is-selected {
	border-color: #2c7c4a;
	box-shadow: 0 0 0 1px #2c7c4a;
}

.ets-sample-card.is-selected .ets-sample-check {
	background: #2c7c4a;
	border-color: #2c7c4a;
}

.ets-sample-card.is-selected .ets-sample-check svg {
	display: block;
}

/* ---- Disabled (max reached) ---- */
.ets-sample-card.is-disabled {
	opacity: .45;
	cursor: not-allowed;
	pointer-events: none;
}

/* ---- Sample box sidebar ---- */
.ets-sample-box {
	flex: 0 0 240px;
	background: #1a1a1a;
	color: #fff;
	border-radius: 12px;
	padding: 20px;
	position: sticky;
	top: 20px;
}

.ets-sample-box h3 {
	margin: 0 0 4px;
	font-size: 16px;
	font-weight: 700;
	color: #fff;
}

.ets-sample-count {
	font-size: 13px;
	color: #aaa;
	margin: 0 0 16px;
}

.ets-selected-list {
	list-style: none;
	margin: 0 0 16px;
	padding: 0;
	min-height: 40px;
}

.ets-selected-list li {
	padding: 8px 0;
	border-bottom: 1px solid #333;
	font-size: 13px;
	color: #e0e0e0;
	display: flex;
	align-items: center;
	gap: 8px;
}

.ets-selected-list li:first-child {
	border-top: 1px solid #333;
}

.ets-selected-list li::before {
	content: '';
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #2c7c4a;
	flex-shrink: 0;
}

/* ---- Button ---- */
.ets-request-btn {
	width: 100%;
	background: #2c7c4a !important;
	color: #fff !important;
	border: none !important;
	border-radius: 6px !important;
	padding: 11px 16px !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	cursor: pointer !important;
	transition: background .15s !important;
	box-shadow: none !important;
}

.ets-request-btn:hover:not(:disabled) {
	background: #235f39 !important;
}

.ets-request-btn:disabled {
	opacity: .4 !important;
	cursor: not-allowed !important;
}

.ets-existing-notice {
	font-size: 12px;
	color: #f59e0b;
	margin: 0 0 12px;
	line-height: 1.4;
}

/* ---- Responsive ---- */
@media ( max-width: 700px ) {
	.ets-samples-wrap {
		flex-direction: column;
	}
	.ets-sample-box {
		flex: none;
		width: 100%;
		position: static;
	}
	.ets-samples-grid {
		grid-template-columns: repeat( auto-fill, minmax( 140px, 1fr ) );
	}
}

.ets-sample-message {
	margin-top: 10px;
	font-size: 13px;
	text-align: center;
}
