/**
 * Answer Engine Optimizer AI Dashboard Styles
 * Yoast-inspired design for AEO dashboard
 *
 * @package AEO_Ranking
 * @since 1.0.0
 */

/* ============================================
   Dashboard Wrapper
   ============================================ */

.aeo-dashboard-wrap {
	max-width: 1400px;
}

.aeo-dashboard-title {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 23px;
	font-weight: 400;
	margin: 0 0 10px;
	padding: 0;
	line-height: 1.3;
}

.aeo-dashboard-title .dashicons {
	color: #2271b1;
	font-size: 28px;
	width: 28px;
	height: 28px;
}

.aeo-dashboard-subtitle {
	color: #646970;
	font-size: 14px;
	margin: 0 0 24px;
}

/* ============================================
   Dashboard Boxes Container
   ============================================ */

.aeo-dashboard-boxes {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
	gap: 24px;
	margin-top: 24px;
}

/* ============================================
   Dashboard Box (Yoast-style Card)
   ============================================ */

.aeo-dashboard-box {
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 4px;
	box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
	overflow: hidden;
}

.aeo-box-header {
	padding: 20px 24px;
	border-bottom: 1px solid #f0f0f1;
	background: #f9f9f9;
}

.aeo-box-header h2 {
	margin: 0 0 6px;
	font-size: 18px;
	font-weight: 600;
	color: #1d2327;
	line-height: 1.4;
}

.aeo-box-description {
	margin: 0;
	font-size: 13px;
	color: #646970;
	line-height: 1.5;
}

.aeo-box-content {
	padding: 24px;
}

/* ============================================
   Box 1: AEO Score Overview
   ============================================ */

.aeo-score-display {
	display: flex;
	flex-direction: column;
	align-items: center;
	margin-bottom: 28px;
}

.aeo-score-circle {
	position: relative;
	width: 140px;
	height: 140px;
	margin-bottom: 16px;
}

.aeo-circle-svg {
	width: 100%;
	height: 100%;
	transform: rotate(-90deg);
}

.aeo-circle-bg {
	fill: none;
	stroke: #f0f0f1;
	stroke-width: 8;
}

.aeo-circle-progress {
	fill: none;
	stroke-width: 8;
	stroke-linecap: round;
	stroke-dasharray: 339.292;
	transition: stroke-dashoffset 0.6s ease;
}

/* Score Colors */
.aeo-score-good .aeo-circle-progress {
	stroke: #7ad03a;
}

.aeo-score-ok .aeo-circle-progress {
	stroke: #ffba00;
}

.aeo-score-poor .aeo-circle-progress {
	stroke: #ee7c1b;
}

.aeo-score-number {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	text-align: center;
}

.aeo-score-value {
	display: block;
	font-size: 42px;
	font-weight: 700;
	line-height: 1;
	color: #1d2327;
}

.aeo-score-max {
	display: block;
	font-size: 16px;
	color: #646970;
	margin-top: 2px;
}

.aeo-score-label {
	text-align: center;
	font-size: 16px;
	color: #646970;
}

.aeo-score-label strong {
	display: block;
	font-size: 18px;
	color: #1d2327;
	margin-bottom: 4px;
}

/* Score Breakdown */
.aeo-score-breakdown {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 16px;
}

.aeo-score-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px;
	background: #f9f9f9;
	border-radius: 4px;
	border-left: 3px solid;
}

.aeo-score-item.aeo-score-good {
	border-left-color: #7ad03a;
}

.aeo-score-item.aeo-score-ok {
	border-left-color: #ffba00;
}

.aeo-score-item.aeo-score-poor {
	border-left-color: #ee7c1b;
}

.aeo-score-item.aeo-score-none {
	border-left-color: #dcdcde;
}

.aeo-score-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	flex-shrink: 0;
}

.aeo-score-good .aeo-score-dot {
	background: #7ad03a;
}

.aeo-score-ok .aeo-score-dot {
	background: #ffba00;
}

.aeo-score-poor .aeo-score-dot {
	background: #ee7c1b;
}

.aeo-score-none .aeo-score-dot {
	background: #dcdcde;
}

.aeo-score-count {
	font-size: 20px;
	font-weight: 700;
	color: #1d2327;
	min-width: 32px;
}

.aeo-score-text {
	font-size: 13px;
	color: #646970;
	line-height: 1.4;
}

/* ============================================
   Box 2: Content Coverage
   ============================================ */

.aeo-coverage-item {
	padding: 20px 0;
	border-bottom: 1px solid #f0f0f1;
}

.aeo-coverage-item:first-child {
	padding-top: 0;
}

.aeo-coverage-item:last-child {
	padding-bottom: 0;
	border-bottom: none;
}

.aeo-coverage-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 12px;
}

.aeo-coverage-title {
	margin: 0;
	font-size: 15px;
	font-weight: 600;
	color: #1d2327;
}

.aeo-coverage-count {
	font-size: 14px;
	font-weight: 600;
	color: #646970;
	background: #f0f0f1;
	padding: 4px 10px;
	border-radius: 3px;
}

.aeo-coverage-bar {
	height: 8px;
	background: #f0f0f1;
	border-radius: 4px;
	overflow: hidden;
	margin-bottom: 12px;
}

.aeo-coverage-progress {
	height: 100%;
	background: linear-gradient(90deg, #7ad03a 0%, #5cb85c 100%);
	border-radius: 4px;
	transition: width 0.6s ease;
}

.aeo-coverage-stats {
	display: flex;
	gap: 20px;
	flex-wrap: wrap;
}

.aeo-coverage-stat {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	color: #646970;
}

.aeo-coverage-stat .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
	color: #2271b1;
}

/* ============================================
   Responsive Design
   ============================================ */

@media screen and (max-width: 1024px) {
	.aeo-dashboard-boxes {
		grid-template-columns: 1fr;
	}
}

@media screen and (max-width: 782px) {
	.aeo-dashboard-title {
		font-size: 20px;
	}

	.aeo-box-header {
		padding: 16px 20px;
	}

	.aeo-box-content {
		padding: 20px;
	}

	.aeo-score-circle {
		width: 120px;
		height: 120px;
	}

	.aeo-score-value {
		font-size: 36px;
	}

	.aeo-score-breakdown {
		grid-template-columns: 1fr;
	}

	.aeo-coverage-stats {
		flex-direction: column;
		gap: 8px;
	}
}

@media screen and (max-width: 600px) {
	.aeo-dashboard-boxes {
		gap: 16px;
	}

	.aeo-box-header h2 {
		font-size: 16px;
	}

	.aeo-score-circle {
		width: 100px;
		height: 100px;
	}

	.aeo-score-value {
		font-size: 32px;
	}

	.aeo-score-max {
		font-size: 14px;
	}
}

/* ============================================
   Reporting Page Styles
   ============================================ */

/* Statistics Cards */
.aeo-dashboard-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 20px;
	margin: 20px 0 30px;
}

.aeo-stat-card {
	display: flex;
	align-items: center;
	gap: 15px;
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 8px;
	padding: 20px;
	box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

.aeo-stat-icon {
	width: 50px;
	height: 50px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.aeo-stat-icon .dashicons {
	font-size: 28px;
	width: 28px;
	height: 28px;
	color: #fff;
}

.aeo-stat-green {
	background: #00a32a;
}

.aeo-stat-yellow {
	background: #dba617;
}

.aeo-stat-red {
	background: #d63638;
}

.aeo-stat-blue {
	background: #2271b1;
}

.aeo-stat-content {
	flex: 1;
}

.aeo-stat-number {
	font-size: 32px;
	font-weight: 700;
	line-height: 1;
	color: #1d2327;
	margin-bottom: 5px;
}

.aeo-stat-label {
	font-size: 13px;
	color: #646970;
	line-height: 1.4;
}

/* Filters */
.aeo-dashboard-filters {
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	padding: 15px;
	margin-bottom: 20px;
}

.aeo-dashboard-filters form {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.aeo-dashboard-filters select {
	min-width: 180px;
}

/* Dashboard Table */
.aeo-dashboard-table {
	margin-top: 20px;
}

.aeo-dashboard-table th {
	font-weight: 600;
}

.aeo-dashboard-table th a {
	text-decoration: none;
	color: inherit;
	display: flex;
	align-items: center;
	gap: 5px;
}

.aeo-dashboard-table th a:hover {
	color: #2271b1;
}

.aeo-dashboard-table th .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
}

.aeo-dashboard-table .column-title {
	width: 30%;
}

.aeo-dashboard-table .column-type {
	width: 10%;
}

.aeo-dashboard-table .column-score {
	width: 15%;
}

.aeo-dashboard-table .column-summary {
	width: 12%;
}

.aeo-dashboard-table .column-faq {
	width: 10%;
	text-align: center;
}

.aeo-dashboard-table .column-actions {
	width: 15%;
}

/* Score Badge */
.aeo-score-badge {
	display: inline-block;
	padding: 6px 12px;
	border-radius: 4px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
}

.aeo-score-badge strong {
	font-size: 18px;
}

.aeo-score-badge-green {
	background: #e7f7ed;
	color: #00a32a;
	border: 1px solid #00a32a;
}

.aeo-score-badge-yellow {
	background: #fcf8e3;
	color: #dba617;
	border: 1px solid #dba617;
}

.aeo-score-badge-red {
	background: #f8d7da;
	color: #d63638;
	border: 1px solid #d63638;
}

/* Summary Badge */
.aeo-badge {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 3px;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.aeo-badge-manual {
	background: #00a32a;
	color: #fff;
}

.aeo-badge-auto {
	background: #2271b1;
	color: #fff;
}

.aeo-badge-none {
	background: #dcdcde;
	color: #50575e;
}

/* No Results */
.aeo-no-results {
	text-align: center;
	padding: 40px 20px !important;
	color: #646970;
	font-style: italic;
}

/* Actions Column */
.column-actions .button {
	margin-right: 5px;
	margin-bottom: 5px;
}

/* ============================================
   Audit Report Card
   ============================================ */

.aeo-audit-report-card {
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	padding: 0;
	margin-bottom: 20px;
	box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
	max-width: 100%;
}

.aeo-audit-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px;
	border-bottom: 1px solid #f0f0f1;
	background: #f9f9f9;
}

.aeo-audit-title {
	display: flex;
	align-items: center;
	gap: 10px;
}

.aeo-audit-title .dashicons {
	font-size: 24px;
	width: 24px;
	height: 24px;
	color: #2271b1;
}

.aeo-audit-title h2 {
	margin: 0;
	font-size: 18px;
	font-weight: 600;
	color: #1d2327;
}

.aeo-download-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
}

.aeo-download-btn .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
	margin-top: 6px;
}

.aeo-audit-description {
	padding: 15px 20px;
	margin: 0;
	font-size: 13px;
	color: #646970;
	border-bottom: 1px solid #f0f0f1;
	background: #fafafa;
}

/* Audit Table */
.aeo-audit-table-wrapper {
	overflow-x: auto;
	padding: 20px;
}

.aeo-audit-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}

.aeo-audit-table thead {
	background: #f9f9f9;
	border-bottom: 2px solid #dcdcde;
}

.aeo-audit-table th {
	padding: 12px;
	text-align: left;
	font-weight: 600;
	color: #1d2327;
	border-bottom: 1px solid #dcdcde;
}

.aeo-audit-table tbody tr {
	border-bottom: 1px solid #f0f0f1;
	transition: background 0.2s;
}

.aeo-audit-table tbody tr:hover {
	background: #f9f9f9;
}

.aeo-audit-table tbody tr.aeo-priority-row {
	background: #fff8e5;
	border-left: 3px solid #dba617;
}

.aeo-audit-table tbody tr.aeo-priority-row:hover {
	background: #fff3d4;
}

.aeo-audit-table td {
	padding: 12px;
	vertical-align: middle;
}

/* Column Widths */
.aeo-audit-col-title {
	width: 35%;
}

.aeo-audit-col-type {
	width: 10%;
}

.aeo-audit-col-score {
	width: 15%;
}

.aeo-audit-col-summary {
	width: 12%;
}

.aeo-audit-col-faq {
	width: 8%;
	text-align: center;
}

.aeo-audit-col-warnings {
	width: 10%;
	text-align: center;
}

/* Priority Badge */
.aeo-priority-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	background: #dba617;
	border-radius: 50%;
	margin-right: 8px;
	vertical-align: middle;
}

.aeo-priority-badge .dashicons {
	font-size: 14px;
	width: 14px;
	height: 14px;
	color: #fff;
}

/* Audit Title Link */
.aeo-audit-title {
	color: #2271b1;
	text-decoration: none;
	font-weight: 500;
}

.aeo-audit-title:hover {
	color: #135e96;
	text-decoration: underline;
}

/* Type Badge */
.aeo-type-badge {
	display: inline-block;
	padding: 4px 8px;
	background: #f0f0f1;
	border-radius: 3px;
	font-size: 11px;
	font-weight: 600;
	color: #646970;
	text-transform: uppercase;
}

/* FAQ Count */
.aeo-faq-count {
	display: inline-block;
	padding: 4px 10px;
	background: #e7f5fe;
	border: 1px solid #72aee6;
	border-radius: 3px;
	font-weight: 600;
	color: #135e96;
}

/* Warnings Badge */
.aeo-warnings-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 28px;
	height: 28px;
	padding: 4px 8px;
	border-radius: 50%;
	font-weight: 700;
	font-size: 12px;
}

.aeo-warnings-badge.aeo-warnings-has {
	background: #f8d7da;
	color: #d63638;
	border: 1px solid #d63638;
}

.aeo-warnings-badge.aeo-warnings-none {
	background: #e7f7ed;
	color: #00a32a;
	border: 1px solid #00a32a;
}

.aeo-warnings-badge .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
}

/* Responsive - Reporting Page */
@media screen and (max-width: 782px) {
	.aeo-dashboard-stats {
		grid-template-columns: 1fr;
	}

	.aeo-dashboard-filters form {
		flex-direction: column;
		align-items: stretch;
	}

	.aeo-dashboard-filters select {
		width: 100%;
	}

	.aeo-dashboard-table .column-title {
		width: auto;
	}

	.aeo-dashboard-table .column-type,
	.aeo-dashboard-table .column-faq {
		display: none;
	}

	.aeo-audit-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 15px;
	}

	.aeo-download-btn {
		width: 100%;
		justify-content: center;
	}

	.aeo-audit-table {
		font-size: 12px;
	}

	.aeo-audit-table th,
	.aeo-audit-table td {
		padding: 8px;
	}

	.aeo-audit-col-type,
	.aeo-audit-col-faq {
		display: none;
	}
}
