/*
 * IPOGMPHub — GMP HISTORY + TREND (V3 Premium Cards Layout)
 */

.ipogmphub-gmp-v3 {
	--gmp-blue: #2563eb;
	--gmp-blue-light: #eff6ff;
	--gmp-dark: #0f172a;
	--gmp-text: #475569;
	--gmp-muted: #64748b;
	--gmp-border: #e2e8f0;
	--gmp-card-bg: #ffffff;
	--gmp-bg-main: #f8fafc;
	--gmp-red: #ef4444;
	
	width: 100%;
	margin: 32px 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	color: var(--gmp-text);
}

.ipogmphub-gmp-v3 *,
.ipogmphub-gmp-v3 *::before,
.ipogmphub-gmp-v3 *::after {
	box-sizing: border-box;
}

/* Header Area */
.ipogmphub-gmp-v3-header {
	margin-bottom: 24px;
}

.ipogmphub-gmp-v3-eyebrow {
	display: inline-block;
	font-size: 12px;
	font-weight: 800;
	color: var(--gmp-blue);
	text-transform: uppercase;
	letter-spacing: 0.1em;
	margin-bottom: 8px;
	padding-left: 12px;
	border-left: 4px solid var(--gmp-blue);
	line-height: 1.2;
}

.ipogmphub-gmp-v3-title {
	margin: 0;
	font-size: 26px;
	font-weight: 800;
	color: var(--gmp-dark);
	letter-spacing: -0.02em;
}

/* Flexbox Layout: This fixes the empty space issue */
.ipogmphub-gmp-v3-row {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
	/* align-items: flex-start ensures cards don't stretch to match each other's height */
	align-items: flex-start; 
}

/* Individual Cards */
.ipogmphub-gmp-v3-card {
	background: var(--gmp-card-bg);
	border: 1px solid var(--gmp-border);
	border-radius: 16px;
	padding: 24px;
	box-shadow: 0 4px 15px rgba(15, 23, 42, 0.04);
}

.ipogmphub-gmp-v3-table-card {
	flex: 1 1 320px;
	max-width: 100%;
}

.ipogmphub-gmp-v3-chart-card {
	flex: 2 1 450px;
	min-width: 0; /* Prevents overflow issues */
}

.ipogmphub-gmp-v3-card-title {
	font-size: 19px;
	font-weight: 800;
	color: var(--gmp-dark);
	margin: 0 0 20px 0;
	letter-spacing: -0.01em;
}

/* Table Design */
.ipogmphub-gmp-v3-table-wrap {
	max-height: 400px;
	overflow-y: auto;
	border: 1px solid var(--gmp-border);
	border-radius: 12px;
	scrollbar-width: thin;
	scrollbar-color: #cbd5e1 transparent;
}

.ipogmphub-gmp-v3-table {
	width: 100%;
	border-collapse: collapse;
	text-align: left;
}

.ipogmphub-gmp-v3-table th {
	position: sticky;
	top: 0;
	background: var(--gmp-bg-main);
	padding: 14px 16px;
	font-size: 11px;
	font-weight: 800;
	color: var(--gmp-muted);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	border-bottom: 1px solid var(--gmp-border);
	z-index: 2;
}

.ipogmphub-gmp-v3-table td {
	padding: 16px;
	font-size: 14px;
	font-weight: 600;
	border-bottom: 1px solid var(--gmp-bg-main);
	color: var(--gmp-text);
}

.ipogmphub-gmp-v3-table th:last-child,
.ipogmphub-gmp-v3-table td:last-child {
	text-align: right;
}

.ipogmphub-gmp-v3-table tr:last-child td {
	border-bottom: none;
}

.ipogmphub-gmp-v3-table tr:hover td {
	background: var(--gmp-blue-light);
}

.ipogmphub-gmp-v3-val-up { color: var(--gmp-blue); font-weight: 800; font-size: 15px;}
.ipogmphub-gmp-v3-val-down { color: var(--gmp-red); font-weight: 800; font-size: 15px;}

/* SVG Chart Design */
.ipogmphub-gmp-v3-chart-wrap {
	width: 100%;
	height: 350px;
	position: relative;
}

.ipogmphub-gmp-v3-svg {
	display: block;
	width: 100%;
	height: 100%;
	overflow: visible;
}

.ipogmphub-gmp-v3-grid-line {
	stroke: #f1f5f9;
	stroke-width: 1.5;
	stroke-dasharray: 4 4;
}

.ipogmphub-gmp-v3-axis-text {
	fill: var(--gmp-muted);
	font-size: 12px;
	font-weight: 600;
}

.ipogmphub-gmp-v3-line {
	stroke: var(--gmp-blue);
	stroke-width: 3.5;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.ipogmphub-gmp-v3-point {
	fill: #ffffff;
	stroke: var(--gmp-blue);
	stroke-width: 2.5;
}

.ipogmphub-gmp-v3-point.is-negative {
	stroke: var(--gmp-red);
}

.ipogmphub-gmp-v3-point-text {
	fill: var(--gmp-dark);
	font-size: 13px;
	font-weight: 800;
}
.ipogmphub-gmp-v3-point-text.is-negative { fill: var(--gmp-red); }

.ipogmphub-gmp-v3-date-text {
	fill: var(--gmp-muted);
	font-size: 11.5px;
	font-weight: 600;
}

/* Responsive Styles */
@media (max-width: 900px) {
	.ipogmphub-gmp-v3-row {
		flex-direction: column;
	}
	.ipogmphub-gmp-v3-table-card,
	.ipogmphub-gmp-v3-chart-card {
		width: 100%;
		flex: none;
	}
	.ipogmphub-gmp-v3-chart-wrap {
		height: 300px;
	}
}

@media (max-width: 480px) {
	.ipogmphub-gmp-v3-card {
		padding: 16px;
	}
	.ipogmphub-gmp-v3-chart-wrap {
		height: 250px;
	}
}