/* ==========================================================================
   CBC Icon Stat Blocks  v1.4.0
   ========================================================================== */

/* Wrapper
   -------------------------------------------------------------------------- */
.cbc-isb-wrapper {
	width: 100%;
	box-sizing: border-box;
	overflow: visible;
}

/* Grid
   -------------------------------------------------------------------------- */
.cbc-isb-grid {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 14px;
	width: 100%;
	box-sizing: border-box;
	overflow: visible;
}

/* Card
   -------------------------------------------------------------------------- */
.cbc-isb-item {
	position: relative;
	overflow: visible;
	background-color: #ffffff;
	border-radius: 12px;
	/* Top padding reserves space for the floating image container */
	padding: 44px 16px 20px;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.13);
	transition: transform 250ms ease, box-shadow 250ms ease;
}

.cbc-isb-item:hover {
	transform: translateY(-3px);
	box-shadow: 0 8px 22px rgba(0, 0, 0, 0.17);
}

/* Full-card link overlay
   -------------------------------------------------------------------------- */
.cbc-isb-link-overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	border-radius: inherit;
	text-decoration: none;
	display: block;
}

.elementor-editor-active .cbc-isb-link-overlay {
	pointer-events: none;
}

/* Keep image wrap + text above the link overlay */
.cbc-isb-img-wrap,
.cbc-isb-title,
.cbc-isb-description {
	position: relative;
	z-index: 2;
}

/* Floating image container
   Absolutely positioned to overlap the top edge of the card
   -------------------------------------------------------------------------- */
.cbc-isb-img-wrap {
	position: absolute;
	top: -28px;                       /* default; overridden by "Overlap Amount" */
	left: 50%;
	transform: translateX(-50%);

	width: 64px;
	height: 64px;
	background-color: #ffffff;
	border-radius: 12px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.13);
	overflow: visible;

	/* Flex centres the image inside the container */
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

/* Image inside container
   -------------------------------------------------------------------------- */
.cbc-isb-img-wrap img {
	display: block;
	max-width: 48px;       /* default; overridden by "Image Max Width" control */
	width: 100%;
	height: auto;
	object-fit: contain;
}

/* Empty placeholder shown when no image has been selected yet
   -------------------------------------------------------------------------- */
.cbc-isb-img-placeholder {
	display: block;
	width: 36px;
	height: 36px;
	border-radius: 4px;
	background-color: #e0e8f0;
	/* Dashed border hint */
	outline: 2px dashed #aac4d8;
	outline-offset: 2px;
}

/* Title
   -------------------------------------------------------------------------- */
.cbc-isb-title {
	display: block;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	color: #1a4a72;
	margin: 0;
	padding: 0;
}

/* Description
   -------------------------------------------------------------------------- */
.cbc-isb-description {
	font-size: 13px;
	color: #4a6a8a;
	line-height: 1.5;
	margin: 6px 0 0;
	padding: 0;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
	.cbc-isb-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 767px) {
	.cbc-isb-grid        { grid-template-columns: repeat(2, 1fr); }
	.cbc-isb-img-wrap    { width: 52px; height: 52px; top: -22px; }
	.cbc-isb-img-wrap img { max-width: 36px; }
}

@media (max-width: 400px) {
	.cbc-isb-grid { grid-template-columns: 1fr; }
}
