/**
 * NADmedia Client Portal Styles
 *
 * @package NADClientPortal
 */

/* Dashboard Layout */
.nad-portal-dashboard {
	max-width: 1200px;
	margin: 0 auto;
}

.nad-plan-badge {
	background: #f0f0f1;
	border-left: 4px solid #2271b1;
	padding: 12px 16px;
	margin-bottom: 24px;
	border-radius: 4px;
}

.nad-dashboard-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 24px;
	margin-bottom: 32px;
}

.nad-dashboard-card {
	background: #fff;
	border: 1px solid #ccd0d4;
	border-radius: 4px;
	padding: 24px;
	box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

.nad-dashboard-card h3 {
	margin-top: 0;
	margin-bottom: 16px;
	font-size: 18px;
	color: #1d2327;
}

.nad-report-month {
	font-size: 16px;
	color: #646970;
	margin-bottom: 16px;
}

.nad-report-excerpt {
	color: #3c434a;
	line-height: 1.6;
	margin-bottom: 16px;
}

.nad-metrics-snapshot {
	margin-bottom: 16px;
}

.nad-metric-item {
	display: flex;
	justify-content: space-between;
	padding: 8px 0;
	border-bottom: 1px solid #f0f0f1;
}

.nad-metric-item:last-child {
	border-bottom: none;
}

.nad-metric-label {
	color: #646970;
}

.nad-metric-value {
	font-weight: 600;
	color: #1d2327;
}

.nad-quick-links {
	margin-top: 32px;
	padding-top: 24px;
	border-top: 1px solid #ccd0d4;
}

.nad-quick-links h3 {
	margin-bottom: 16px;
	font-size: 18px;
}

.nad-quick-links ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

.nad-quick-links li {
	padding: 8px 0;
}

.nad-quick-links a {
	color: #2271b1;
	text-decoration: none;
}

.nad-quick-links a:hover {
	text-decoration: underline;
}

/* Reports */
.nad-reports-list {
	max-width: 1200px;
	margin: 0 auto;
}

.nad-reports-table {
	width: 100%;
	border-collapse: collapse;
	background: #fff;
	border: 1px solid #ccd0d4;
	border-radius: 4px;
	overflow: hidden;
	margin-top: 16px;
}

.nad-reports-table thead {
	background: #f6f7f7;
}

.nad-reports-table th,
.nad-reports-table td {
	padding: 12px 16px;
	text-align: left;
	border-bottom: 1px solid #f0f0f1;
}

.nad-reports-table th {
	font-weight: 600;
	color: #1d2327;
}

.nad-reports-table tbody tr:hover {
	background: #f9f9f9;
}

.nad-report-single {
	max-width: 1200px;
	margin: 0 auto;
}

.nad-report-single h2 {
	margin-bottom: 24px;
}

.nad-report-hours {
	font-size: 16px;
	color: #646970;
	margin-bottom: 24px;
}

.nad-report-content {
	background: #fff;
	border: 1px solid #ccd0d4;
	border-radius: 4px;
	padding: 24px;
	margin-bottom: 32px;
	line-height: 1.8;
}

.nad-report-metrics {
	margin-top: 32px;
	padding-top: 24px;
	border-top: 1px solid #ccd0d4;
}

.nad-report-metrics h3 {
	margin-bottom: 16px;
}

.nad-metrics-note {
	color: #646970;
	font-size: 14px;
	margin-bottom: 24px;
}

.nad-metrics-section {
	margin-bottom: 32px;
}

.nad-metrics-section h4 {
	margin-bottom: 12px;
	color: #1d2327;
}

.nad-metrics-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.nad-metrics-list li {
	padding: 8px 0;
	border-bottom: 1px solid #f0f0f1;
}

.nad-metrics-list li:last-child {
	border-bottom: none;
}

/* Traffic & SEO Pages */
.nad-traffic-page,
.nad-seo-page,
.nad-calls-page,
.nad-ai-page {
	max-width: 1200px;
	margin: 0 auto;
}

.nad-month-selector {
	background: #fff;
	border: 1px solid #ccd0d4;
	border-radius: 4px;
	padding: 16px;
	margin-bottom: 24px;
}

.nad-month-selector form {
	display: flex;
	align-items: center;
	gap: 12px;
}

.nad-month-selector label {
	font-weight: 600;
	color: #1d2327;
}

.nad-metrics-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 20px;
	margin-bottom: 32px;
}

.nad-metric-card {
	background: #fff;
	border: 1px solid #ccd0d4;
	border-radius: 4px;
	padding: 20px;
	text-align: center;
	box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

.nad-metric-card h3 {
	margin: 0 0 12px 0;
	font-size: 14px;
	font-weight: 600;
	color: #646970;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.nad-metric-value-large {
	font-size: 32px;
	font-weight: 700;
	color: #1d2327;
	line-height: 1.2;
}

.nad-top-pages,
.nad-top-queries,
.nad-top-blocks,
.nad-call-details {
	margin-top: 32px;
}

.nad-top-pages h3,
.nad-top-queries h3,
.nad-top-blocks h3,
.nad-call-details h3 {
	margin-bottom: 16px;
}

.nad-metrics-table {
	width: 100%;
	border-collapse: collapse;
	background: #fff;
	border: 1px solid #ccd0d4;
	border-radius: 4px;
	overflow: hidden;
}

.nad-metrics-table thead {
	background: #f6f7f7;
}

.nad-metrics-table th,
.nad-metrics-table td {
	padding: 12px 16px;
	text-align: left;
	border-bottom: 1px solid #f0f0f1;
}

.nad-metrics-table th {
	font-weight: 600;
	color: #1d2327;
}

.nad-metrics-table tbody tr:hover {
	background: #f9f9f9;
}

.nad-no-metrics {
	background: #fff;
	border: 1px solid #ccd0d4;
	border-radius: 4px;
	padding: 32px;
	text-align: center;
	color: #646970;
}

/* Admin Pages */
.nad-admin-dashboard {
	margin-top: 20px;
}

.nad-stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 20px;
	margin-bottom: 32px;
}

.nad-stat-card {
	background: #fff;
	border: 1px solid #ccd0d4;
	border-radius: 4px;
	padding: 24px;
	box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

.nad-stat-card h3 {
	margin: 0 0 12px 0;
	font-size: 14px;
	font-weight: 600;
	color: #646970;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.nad-stat-number {
	font-size: 36px;
	font-weight: 700;
	color: #2271b1;
	margin-bottom: 12px;
}

.nad-quick-actions {
	margin-top: 32px;
	padding-top: 24px;
	border-top: 1px solid #ccd0d4;
}

.nad-quick-actions h2 {
	margin-bottom: 16px;
}

.nad-sync-form {
	background: #fff;
	border: 1px solid #ccd0d4;
	border-radius: 4px;
	padding: 20px;
	margin-bottom: 24px;
}

.nad-quick-sync {
	background: #fff;
	border: 1px solid #ccd0d4;
	border-radius: 4px;
	padding: 20px;
}

.nad-quick-sync h2 {
	margin-top: 0;
	margin-bottom: 12px;
}

/* Admin Settings Tabs */
.nav-tab-wrapper {
	margin-bottom: 20px;
	border-bottom: 1px solid #ccd0d4;
}

.nav-tab {
	display: inline-block;
	padding: 10px 15px;
	margin-right: 5px;
	margin-bottom: -1px;
	border: 1px solid transparent;
	border-bottom: none;
	background: #f6f7f7;
	color: #2271b1;
	text-decoration: none;
	cursor: pointer;
	transition: all 0.2s;
}

.nav-tab:hover {
	background: #fff;
	color: #135e96;
}

.nav-tab-active {
	background: #fff;
	border-color: #ccd0d4;
	border-bottom-color: #fff;
	color: #1d2327;
	font-weight: 600;
}

.tab-content {
	background: #fff;
	border: 1px solid #ccd0d4;
	border-radius: 4px;
	padding: 20px;
	margin-top: -1px;
}

.tab-content h2 {
	margin-top: 0;
	padding-top: 0;
	border-bottom: 1px solid #f0f0f1;
	padding-bottom: 10px;
	margin-bottom: 20px;
}

.tab-content h2:first-of-type {
	margin-top: 0;
}

/* Enhanced Metric Cards */
.nad-metric-card {
	transition: transform 0.2s, box-shadow 0.2s;
}

.nad-metric-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Loading States */
.nad-loading {
	opacity: 0.6;
	pointer-events: none;
	position: relative;
}

.nad-loading::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 20px;
	height: 20px;
	margin: -10px 0 0 -10px;
	border: 2px solid #2271b1;
	border-top-color: transparent;
	border-radius: 50%;
	animation: nad-spin 0.6s linear infinite;
}

@keyframes nad-spin {
	to {
		transform: rotate(360deg);
	}
}

/* Enhanced Tables */
.nad-metrics-table tbody tr {
	transition: background-color 0.2s;
}

.nad-metrics-table tbody tr:hover {
	background: #f6f7f7;
}

/* Status Indicators */
.nad-status-indicator {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	margin-right: 6px;
}

.nad-status-indicator.success {
	background: #00a32a;
}

.nad-status-indicator.warning {
	background: #dba617;
}

.nad-status-indicator.error {
	background: #d63638;
}

/* Empty States */
.nad-empty-state {
	text-align: center;
	padding: 60px 20px;
	color: #646970;
}

.nad-empty-state-icon {
	font-size: 48px;
	margin-bottom: 16px;
	opacity: 0.5;
}

.nad-empty-state h3 {
	color: #1d2327;
	margin-bottom: 8px;
}

.nad-empty-state p {
	margin-bottom: 20px;
}

/* Improved Buttons */
.nad-button-group {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	margin-top: 20px;
}

.nad-button-group .button {
	margin: 0;
}

/* Metric Comparison */
.nad-metric-change {
	display: inline-block;
	margin-left: 8px;
	font-size: 12px;
	font-weight: 600;
}

.nad-metric-change.positive {
	color: #00a32a;
}

.nad-metric-change.negative {
	color: #d63638;
}

.nad-metric-change::before {
	content: '';
	display: inline-block;
	width: 0;
	height: 0;
	margin-right: 4px;
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
}

.nad-metric-change.positive::before {
	border-bottom: 6px solid #00a32a;
}

.nad-metric-change.negative::before {
	border-top: 6px solid #d63638;
}

/* Tooltips */
.nad-tooltip {
	position: relative;
	cursor: help;
}

.nad-tooltip::after {
	content: attr(data-tooltip);
	position: absolute;
	bottom: 100%;
	left: 50%;
	transform: translateX(-50%);
	background: #1d2327;
	color: #fff;
	padding: 6px 10px;
	border-radius: 4px;
	font-size: 12px;
	white-space: nowrap;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s;
	margin-bottom: 5px;
	z-index: 1000;
}

.nad-tooltip:hover::after {
	opacity: 1;
}

/* Form Enhancements */
.nad-sync-form .form-table th {
	width: 200px;
}

.nad-sync-form .form-table td {
	padding: 15px 10px;
}

/* Success/Error Messages */
.nad-sync-status {
	padding: 12px;
	border-radius: 4px;
	margin-bottom: 20px;
}

.nad-sync-status.success {
	background: #d4edda;
	border-left: 4px solid #00a32a;
	color: #155724;
}

.nad-sync-status.error {
	background: #f8d7da;
	border-left: 4px solid #d63638;
	color: #721c24;
}

.nad-sync-status.warning {
	background: #fff3cd;
	border-left: 4px solid #dba617;
	color: #856404;
}

/* Responsive */
@media (max-width: 782px) {
	.nad-dashboard-grid,
	.nad-metrics-grid {
		grid-template-columns: 1fr;
	}

	.nad-month-selector form {
		flex-direction: column;
		align-items: stretch;
	}

	.nad-month-selector form .button {
		width: 100%;
	}

	.nav-tab {
		display: block;
		margin-bottom: 5px;
	}

	.tab-content {
		padding: 15px;
	}

	.nad-button-group {
		flex-direction: column;
	}

	.nad-button-group .button {
		width: 100%;
	}
}

