/**
 * AM Dashboard Styles
 * Unified styles for Autonomous Maintenance dashboard pages
 */

/* Dashboard Grid Layout */
.dashboard-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 40px;
	padding: 20px 10px;
}

/* Chart Container */
.chart-container {
	background: white;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.15);
	padding: 15px;
	min-height: 400px;
}

/* Chart Title */
.chart-title {
	font-size: 16px;
	font-weight: 600;
	margin-bottom: 15px;
	padding-bottom: 10px;
	border-bottom: 1px solid #eee;
	color: #333;
	display: flex;
	align-items: center;
}

/* Chart Title Link */
.chart-title a.chart-title-link {
	color: inherit;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	flex: 1;
	transition: color 0.2s;
}

.chart-title a.chart-title-link:hover {
	color: #0066cc;
}

.chart-title a.chart-title-link i {
	font-size: 14px;
	opacity: 0.6;
	transition: opacity 0.2s;
	margin-left: 10px;
}

.chart-title a.chart-title-link:hover i {
	opacity: 1;
}

/* Chart Header KPI V2 Styles */
.chart-title .kpiV3 {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
}

.chart-title .kpiV3 .circle {
	font-size: 0.9em;
	padding: 6px 8px;
	min-width: 40px;
	height: 40px;
	background-color: var(--light);
	border-radius: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: bold;
	box-sizing: border-box;
	user-select: none;
}

.chart-title .kpiV3 .circle.dark {
	background-color: var(--dark);
	color: #ffffff;
}

.chart-title .kpiV3 .circle.midTone {
	background-color: var(--midTone);
	color: #ffffff;
}

.chart-title .kpiV3 .circle.light {
	background-color: var(--light);
}

.chart-title .kpiV3 .circle.green {
	background-color: var(--green);
}

.chart-title .kpiV3 .circle.red {
	background-color: var(--red);
}

.chart-title .kpiV3 .circle.yellow {
	background-color: #ffe04e;
}

.chart-title .kpiV3 .textWrap {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: flex-start;
}

.chart-title .kpiV3 div.textWrap .text {
	font-size: 0.9em;
	font-weight: 600;
	color: #333;
}

.chart-title .kpiV3 .textWrap .subtext {
	font-size: 0.7em;
	color: gray;
	font-weight: normal;
}

/* Full width chart - spans entire grid */
.chart-container.full-width {
	grid-column: 1 / -1;
}

/* Main Dashboard Grid - 3 charts visible with horizontal scroll */
.dashboard-grid-main {
	display: grid;
    /*grid-template-columns: repeat(auto-fit, minmax(550px, 1fr));*/

    /*grid-template-columns: repeat(auto-fill, 550px);*/
    /*grid-auto-columns: auto;*/
	/*grid-auto-flow: column;*/

    grid-template-columns: 1fr 1fr;
    width: 100%;

	gap: 40px;
	padding: 20px 10px;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-behavior: smooth;
	/* Add subtle shadow indicators for scrollable content */
	position: relative;
}

/* Ensure chart containers maintain minimum width in main grid */
.dashboard-grid-main .chart-container {
	/*min-width: 550px;*/
    width: clamp(300px, 100%, 800px);
}

/*!* Optional: Add scroll indicators with pseudo-elements *!*/
/*.dashboard-grid-main::before,*/
/*.dashboard-grid-main::after {*/
/*	content: '';*/
/*	position: sticky;*/
/*	top: 0;*/
/*	width: 20px;*/
/*	height: 100%;*/
/*	pointer-events: none;*/
/*	z-index: 1;*/
/*}*/

/*.dashboard-grid-main::before {*/
/*	left: 0;*/
/*	background: linear-gradient(to right, rgba(255,255,255,1), rgba(255,255,255,0));*/
/*}*/

/*.dashboard-grid-main::after {*/
/*	right: 0;*/
/*	background: linear-gradient(to left, rgba(255,255,255,1), rgba(255,255,255,0));*/
/*}*/

/* Responsive adjustments */
@media (max-width: 768px) {
	.dashboard-grid {
		grid-template-columns: 1fr;
		padding: 10px 5px;
	}
    .dashboard-grid-main {
        grid-template-columns: 1fr;
        padding: 10px 5px;
        overflow-x: visible;
    }
}

@media (min-width: 1400px) {
	.dashboard-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}