/* ==========================================================================
   MyCreaTools Dashboard KPI & Statistics Metrics Cards CSS
   ========================================================================== */

.mct-kpi-grid-wrapper {
	width: 100%;
	box-sizing: border-box;
	font-family: inherit;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
	padding-bottom: 6px;
	margin-bottom: -6px;
}

/* Custom Sleek Scrollbar */
.mct-kpi-grid-wrapper::-webkit-scrollbar {
	height: 6px;
}

.mct-kpi-grid-wrapper::-webkit-scrollbar-track {
	background: #f1f5f9;
	border-radius: 10px;
}

.mct-kpi-grid-wrapper::-webkit-scrollbar-thumb {
	background: #cbd5e1;
	border-radius: 10px;
	transition: background 0.2s ease;
}

.mct-kpi-grid-wrapper::-webkit-scrollbar-thumb:hover {
	background: #94a3b8;
}

/* Grid Layout Container */
.mct-kpi-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(220px, 1fr));
	gap: 16px;
	width: 100%;
	box-sizing: border-box;
}

.mct-kpi-grid.cols-3 {
	grid-template-columns: repeat(3, minmax(220px, 1fr));
}

.mct-kpi-grid.cols-2 {
	grid-template-columns: repeat(2, minmax(220px, 1fr));
}

.mct-kpi-grid.cols-1 {
	grid-template-columns: 1fr;
}

/* Forced Horizontal Scrollable Track Mode */
.mct-kpi-grid.scroll-mode {
	display: flex !important;
	flex-wrap: nowrap !important;
	gap: 16px !important;
	width: max-content !important;
	min-width: 100% !important;
}

.mct-kpi-grid.scroll-mode .mct-kpi-card {
	flex: 0 0 240px !important;
	width: 240px !important;
}

/* Individual Metric Card Container matching screenshot design */
.mct-kpi-card {
	background: #ffffff;
	border: 1px solid #f1f5f9;
	border-radius: 20px;
	padding: 20px 22px;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	transition: border-color 0.25s ease, box-shadow 0.25s ease;
	text-decoration: none !important;
	color: inherit;
	cursor: pointer;
	min-height: 125px;
	min-width: 210px;
	width: 100%;
	scroll-snap-align: start;
}

.mct-kpi-card:hover {
	border-color: #e2e8f0;
}

/* Top Row: Label & Icon Badge */
.mct-kpi-top-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	margin-bottom: 8px;
}

.mct-kpi-label {
	font-size: 14px;
	font-weight: 600;
	color: #64748b;
	margin: 0;
	line-height: 1.3;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Pastel Icon Circle Badge */
.mct-kpi-badge {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 18px;
	flex-shrink: 0;
	box-sizing: border-box;
	transition: transform 0.2s ease;
}

.mct-kpi-card:hover .mct-kpi-badge {
	transform: scale(1.06);
}

.mct-kpi-badge svg {
	width: 20px;
	height: 20px;
	fill: currentColor;
}

/* Middle Row: Large Value Number */
.mct-kpi-value-row {
	margin-bottom: 8px;
}

.mct-kpi-value {
	font-size: 28px;
	font-weight: 800;
	color: #0f172a;
	margin: 0;
	line-height: 1.1;
	letter-spacing: -0.02em;
}

/* Bottom Row: Trend Indicator & Subtext */
.mct-kpi-bottom-row {
	display: flex;
	align-items: center;
	gap: 6px;
	width: 100%;
}

.mct-kpi-trend {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 13px;
	font-weight: 700;
	color: #10b981;
	line-height: 1.3;
}

.mct-kpi-trend-icon {
	font-size: 12px;
	display: inline-block;
}

.mct-kpi-trend-text {
	font-size: 13px;
	font-weight: 600;
	color: #64748b;
	line-height: 1.3;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
	.mct-kpi-grid:not(.scroll-mode) {
		grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
		gap: 14px;
	}
}

@media (max-width: 640px) {
	.mct-kpi-grid:not(.scroll-mode) {
		display: flex;
		flex-wrap: nowrap;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		gap: 12px;
		width: max-content;
		min-width: 100%;
	}

	.mct-kpi-grid:not(.scroll-mode) .mct-kpi-card {
		flex: 0 0 230px;
		width: 230px;
	}

	.mct-kpi-card {
		padding: 16px 18px;
	}

	.mct-kpi-value {
		font-size: 24px;
	}
}