/**
 * MaplePress Search Speed Test - Admin Styles
 */

.mpss-wrap {
	max-width: 1200px;
	margin: 20px auto 20px 0;
}

.mpss-card {
	background: #fff;
	border: 1px solid #ccd0d4;
	box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
	padding: 20px;
	margin-bottom: 20px;
}

.mpss-card h2 {
	margin-top: 0;
	display: flex;
	align-items: center;
	gap: 10px;
}

.mpss-card h3 {
	border-bottom: 1px solid #eee;
	padding-bottom: 10px;
	margin-top: 25px;
	margin-bottom: 15px;
}

/* Mode Selection */
.mpss-mode-selection {
	margin: 20px 0;
}

.mpss-radio-label {
	display: block;
	padding: 15px;
	margin: 10px 0;
	border: 2px solid #ddd;
	border-radius: 4px;
	cursor: pointer;
	transition: all 0.2s;
}

.mpss-radio-label:hover {
	border-color: #2271b1;
	background: #f9f9f9;
}

.mpss-radio-label input[type="radio"] {
	margin-right: 10px;
}

.mpss-radio-label input[type="radio"]:checked + .mpss-radio-title {
	color: #2271b1;
	font-weight: 600;
}

.mpss-radio-label input[type="radio"]:checked ~ .mpss-radio-title {
	color: #2271b1;
}

.mpss-radio-title {
	font-weight: 600;
	font-size: 14px;
	display: block;
	margin-bottom: 5px;
}

.mpss-radio-desc {
	font-size: 13px;
	color: #666;
	display: block;
	margin-left: 25px;
}

/* Test Info */
.mpss-test-info ul {
	list-style: none;
	margin: 10px 0;
	padding: 0;
}

.mpss-test-info li {
	padding: 8px 0;
	border-bottom: 1px solid #f0f0f0;
}

.mpss-test-info li:last-child {
	border-bottom: none;
}

/* Warning */
.mpss-warning {
	background: #fff3cd;
	border-left: 4px solid #ffc107;
	padding: 12px 15px;
	margin: 20px 0;
	display: flex;
	align-items: center;
	gap: 10px;
}

.mpss-warning .dashicons {
	color: #856404;
	flex-shrink: 0;
}

/* Progress */
.mpss-progress {
	margin: 20px 0;
}

.mpss-progress-bar {
	width: 100%;
	height: 30px;
	background: #f0f0f0;
	border-radius: 15px;
	overflow: hidden;
	margin-top: 15px;
}

.mpss-progress-fill {
	height: 100%;
	background: linear-gradient(90deg, #667eea, #764ba2);
	transition: width 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-weight: 600;
	position: relative;
	overflow: hidden;
}

.mpss-progress-fill.pulsing::before {
	content: '';
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
	animation: shimmer 2s infinite;
}

@keyframes shimmer {
	0% {
		left: -100%;
	}
	100% {
		left: 100%;
	}
}

.mpss-progress-fill.pulsing {
	animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
	0%, 100% {
		opacity: 1;
	}
	50% {
		opacity: 0.8;
	}
}

.spin {
	animation: spin 1s linear infinite;
}

@keyframes spin {
	from {
		transform: rotate(0deg);
	}
	to {
		transform: rotate(360deg);
	}
}

/* Test Meta */
.mpss-test-meta {
	display: flex;
	gap: 20px;
	flex-wrap: wrap;
	margin: 15px 0 25px 0;
	padding: 15px;
	background: #f9f9f9;
	border-radius: 4px;
}

.mpss-test-meta span {
	font-size: 14px;
}

.mpss-test-meta strong {
	color: #2271b1;
}

/* Summary Cards */
.mpss-summary-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 15px;
	margin: 20px 0;
}

.mpss-profile-card {
	border: 2px solid #ddd;
	border-radius: 8px;
	padding: 20px;
	text-align: center;
	transition: transform 0.2s;
}

.mpss-profile-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.mpss-profile-card h4 {
	margin: 0 0 15px 0;
	font-size: 16px;
	color: #333;
}

.mpss-profile-metrics {
	display: flex;
	justify-content: space-around;
	margin: 15px 0;
}

.mpss-metric {
	text-align: center;
}

.mpss-metric-label {
	font-size: 11px;
	color: #666;
	text-transform: uppercase;
	display: block;
	margin-bottom: 5px;
}

.mpss-metric-value {
	font-size: 18px;
	font-weight: 600;
	display: block;
}

.mpss-status-badge {
	display: inline-block;
	padding: 5px 12px;
	border-radius: 12px;
	font-size: 12px;
	font-weight: 600;
	margin-top: 10px;
}

.mpss-status-excellent {
	background: #d4edda;
	color: #155724;
	border-color: #46b450;
}

.mpss-status-good {
	background: #d1ecf1;
	color: #0c5460;
	border-color: #00a0d2;
}

.mpss-status-fair {
	background: #fff3cd;
	color: #856404;
	border-color: #ffc107;
}

.mpss-status-poor {
	background: #f8d7da;
	color: #721c24;
	border-color: #dc3545;
}

.mpss-status-critical {
	background: #dc3232;
	color: #fff;
	border-color: #dc3232;
}

.mpss-profile-details {
	font-size: 12px;
	color: #666;
	margin-top: 10px;
}

/* Chart Container */
.mpss-chart-container {
	margin: 30px 0;
	padding: 20px;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 4px;
}

#mpss-chart {
	max-height: 400px;
}

/* Results Table */
.mpss-table-container {
	margin: 30px 0;
}

#mpss-results-table {
	margin-top: 15px;
}

#mpss-results-table th {
	font-weight: 600;
}

#mpss-results-table td {
	vertical-align: middle;
}

/* Recommendations */
.mpss-recommendations {
	margin: 30px 0;
}

.mpss-recommendation {
	padding: 15px;
	margin: 15px 0;
	border-left: 4px solid;
	border-radius: 4px;
}

.mpss-recommendation h4 {
	margin: 0 0 10px 0;
	font-size: 14px;
}

.mpss-recommendation p {
	margin: 0;
	font-size: 13px;
}

.mpss-recommendation-success {
	background: #d4edda;
	border-color: #46b450;
	color: #155724;
}

.mpss-recommendation-info {
	background: #d1ecf1;
	border-color: #00a0d2;
	color: #0c5460;
}

.mpss-recommendation-warning {
	background: #fff3cd;
	border-color: #ffc107;
	color: #856404;
}

.mpss-recommendation-error {
	background: #f8d7da;
	border-color: #dc3545;
	color: #721c24;
}

.mpss-recommendation-critical {
	background: #dc3232;
	border-color: #dc3232;
	color: #fff;
}

/* Site Info */
.mpss-site-info {
	margin: 30px 0;
	padding: 20px;
	background: #f9f9f9;
	border-radius: 4px;
}

.mpss-site-info ul {
	list-style: none;
	margin: 10px 0;
	padding: 0;
}

.mpss-site-info li {
	padding: 8px 0;
	font-size: 14px;
}

.mpss-site-info strong {
	color: #2271b1;
	min-width: 150px;
	display: inline-block;
}

/* Actions */
.mpss-actions {
	display: flex;
	gap: 10px;
	margin-top: 30px;
	padding-top: 20px;
	border-top: 1px solid #ddd;
}

.mpss-actions button {
	display: flex;
	align-items: center;
	gap: 5px;
}

/* Responsive */
@media (max-width: 768px) {
	.mpss-summary-cards {
		grid-template-columns: 1fr;
	}

	.mpss-test-meta {
		flex-direction: column;
		gap: 10px;
	}

	.mpss-actions {
		flex-direction: column;
	}

	.mpss-actions button {
		width: 100%;
		justify-content: center;
	}
}
