/**
 * Frontend styles for I AM Family Portal
 *
 * @package I_AM_Family_Portal
 */

/* Dashboard Container */
.portal-dashboard {
	max-width: 1200px;
	margin: 0 auto;
	padding: 20px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Metrics Section */
.portal-metrics {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 20px;
	margin-bottom: 40px;
}

.portal-metric-card {
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 8px;
	padding: 20px;
	text-align: center;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	transition: transform 0.2s, box-shadow 0.2s;
}

.portal-metric-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.portal-metric-label {
	font-size: 14px;
	color: #666;
	margin-bottom: 10px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.portal-metric-value {
	font-size: 32px;
	font-weight: 700;
	color: #2271b1;
	line-height: 1.2;
}

/* Charts Section */
.portal-charts {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 30px;
	margin-bottom: 40px;
}

.portal-chart-container {
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 8px;
	padding: 20px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.portal-chart-title {
	font-size: 18px;
	font-weight: 600;
	margin: 0 0 20px 0;
	color: #23282d;
	text-align: center;
}

.portal-chart {
	max-height: 300px;
	width: 100% !important;
	height: auto !important;
}

/* Monthly Table Section */
.portal-monthly-table {
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 8px;
	padding: 20px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	overflow-x: auto;
}

.portal-table-title {
	font-size: 20px;
	font-weight: 600;
	margin: 0 0 20px 0;
	color: #23282d;
}

.portal-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.portal-table thead {
	background-color: #f6f7f7;
	border-bottom: 2px solid #ddd;
}

.portal-table th {
	padding: 12px 15px;
	text-align: left;
	font-weight: 600;
	color: #23282d;
	position: relative;
	cursor: pointer;
	user-select: none;
}

.portal-table th.portal-sortable:hover {
	background-color: #e5e5e5;
}

.portal-sort-indicator {
	display: inline-block;
	margin-left: 5px;
	opacity: 0.5;
	font-size: 12px;
}

.portal-table th.portal-sorted-asc .portal-sort-indicator::after {
	content: " ▲";
	opacity: 1;
}

.portal-table th.portal-sorted-desc .portal-sort-indicator::after {
	content: " ▼";
	opacity: 1;
}

.portal-table tbody tr {
	border-bottom: 1px solid #eee;
	transition: background-color 0.2s;
}

.portal-table tbody tr:hover {
	background-color: #f9f9f9;
}

.portal-table tbody tr:last-child {
	border-bottom: 2px solid #ddd;
	font-weight: 600;
	background-color: #f6f7f7;
}

.portal-table td {
	padding: 12px 15px;
	color: #50575e;
}

.portal-table tbody tr:last-child td {
	color: #23282d;
}

/* Error Message */
.portal-dashboard-error {
	padding: 20px;
	background: #fff3cd;
	border: 1px solid #ffc107;
	border-radius: 4px;
	color: #856404;
}

/* Responsive Design */
@media (max-width: 768px) {
	.portal-dashboard {
		padding: 10px;
	}

	.portal-metrics {
		grid-template-columns: 1fr;
		gap: 15px;
		margin-bottom: 30px;
	}

	.portal-charts {
		grid-template-columns: 1fr;
		gap: 20px;
		margin-bottom: 30px;
	}

	.portal-metric-value {
		font-size: 24px;
	}

	.portal-table {
		font-size: 12px;
	}

	.portal-table th,
	.portal-table td {
		padding: 8px 10px;
	}
}

@media (max-width: 480px) {
	.portal-metric-card {
		padding: 15px;
	}

	.portal-chart-container {
		padding: 15px;
	}

	.portal-monthly-table {
		padding: 15px;
	}
}

