/**
 * Plugin Rank Tracker – Modern Dashboard UI
 */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

:root {
	--prt-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	--prt-primary: #6366f1;
	--prt-primary-hover: #4f46e5;
	--prt-primary-light: rgba(99, 102, 241, 0.08);
	--prt-surface: #ffffff;
	--prt-surface-2: #f8fafc;
	--prt-border: #e2e8f0;
	--prt-text: #0f172a;
	--prt-text-muted: #64748b;
	--prt-success: #10b981;
	--prt-error: #ef4444;
	--prt-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
	--prt-shadow-lg: 0 10px 40px -10px rgba(0, 0, 0, 0.12);
	--prt-radius: 12px;
	--prt-radius-sm: 8px;
	--prt-transition: 0.2s ease;
}

.prt-dashboard-wrap {
	max-width: 720px;
	margin: 0 auto;
	padding: 0 1.25rem 3rem;
	font-family: var(--prt-font);
	background: var(--prt-surface-2);
	min-height: 60vh;
}

/* Hero header */
.prt-hero {
	background: linear-gradient(135deg, var(--prt-primary) 0%, #4f46e5 50%, #4338ca 100%);
	color: #fff;
	border-radius: var(--prt-radius);
	padding: 2rem 1.75rem;
	margin: -0.5rem 0 1.5rem;
	box-shadow: var(--prt-shadow-lg);
}

.prt-hero-inner {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
}

.prt-hero-content {
	flex: 1;
	min-width: 0;
}

.prt-dashboard-title {
	margin: 0 0 0.35em;
	font-size: 1.75rem;
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1.2;
	color: #fff;
}

.prt-hero-subtitle {
	margin: 0;
	font-size: 0.9375rem;
	opacity: 0.92;
	line-height: 1.5;
	max-width: 420px;
}

.prt-badge {
	display: inline-flex;
	align-items: center;
	padding: 0.4rem 0.9rem;
	border-radius: 999px;
	font-size: 0.8125rem;
	font-weight: 600;
	white-space: nowrap;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.prt-badge-pro {
	background: rgba(255, 255, 255, 0.95);
	color: var(--prt-primary);
}

.prt-badge-free {
	background: rgba(255, 255, 255, 0.2);
	color: #fff;
	border: 1px solid rgba(255, 255, 255, 0.4);
}

.prt-badge-guest {
	background: rgba(255, 255, 255, 0.2);
	color: #fff;
	border: 1px solid rgba(255, 255, 255, 0.4);
}

/* Cards */
.prt-card {
	background: var(--prt-surface);
	border-radius: var(--prt-radius);
	padding: 1.5rem 1.75rem;
	margin-bottom: 1.25rem;
	box-shadow: var(--prt-shadow);
	border: 1px solid var(--prt-border);
	transition: box-shadow var(--prt-transition);
}

.prt-card:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.prt-card-title {
	margin: 0 0 0.5rem;
	font-size: 1.0625rem;
	font-weight: 600;
	color: var(--prt-text);
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.prt-description,
.prt-search-hint {
	margin: 0 0 1rem;
	font-size: 0.9375rem;
	color: var(--prt-text-muted);
	line-height: 1.5;
}

/* Search fields: Keyword + Plugin slug (single-line inputs) */
.prt-search-fields {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem 1.5rem;
	margin-bottom: 0.5rem;
}

.prt-field-wrap {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	width: 100%;
	max-width: 280px;
}

.prt-search-fields .prt-field-wrap .prt-input {
	height: 2.75rem;
	min-height: 2.75rem;
	padding: 0.5rem 0.75rem;
	line-height: 1.4;
	box-sizing: border-box;
	resize: none;
}

.prt-field-label {
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--prt-text);
}

.prt-search-box {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	align-items: center;
}

.prt-search-box--primary {
	margin-bottom: 0.75rem;
}

.prt-plugin-details-card {
	margin-top: 1rem;
}

.prt-plugin-details-card .prt-detail-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.5rem;
	margin-bottom: 0.75rem;
	font-size: 0.9375rem;
}

.prt-plugin-details-card .prt-detail-label {
	font-weight: 600;
	color: var(--prt-text);
	min-width: 100px;
}

.prt-plugin-details-card .prt-detail-value {
	color: var(--prt-text-muted);
}

.prt-plugin-details-card .prt-detail-value a {
	color: var(--prt-primary);
	text-decoration: none;
}

.prt-plugin-details-card .prt-detail-value a:hover {
	text-decoration: underline;
}

.prt-plugin-details-card .prt-detail-desc {
	margin-top: 1rem;
	padding-top: 1rem;
	border-top: 1px solid var(--prt-border);
	color: var(--prt-text-muted);
	line-height: 1.6;
	font-size: 0.9375rem;
}

.prt-plugin-details-card .prt-detail-desc p:first-child {
	margin-top: 0;
}

.prt-input {
	
	min-width: 0;
	padding: 0.75rem 1rem;
	border: 1px solid var(--prt-border);
	border-radius: var(--prt-radius-sm);
	font-size: 0.9375rem;
	font-family: inherit;
	color: var(--prt-text);
	background: var(--prt-surface);
	transition: border-color var(--prt-transition), box-shadow var(--prt-transition);
}

.prt-input::placeholder {
	color: var(--prt-text-muted);
}

.prt-input:hover {
	border-color: #cbd5e1;
}

.prt-input:focus {
	border-color: var(--prt-primary);
	outline: none;
	box-shadow: 0 0 0 3px var(--prt-primary-light);
}

.prt-input-optional {
	max-width: 240px;
}

/* Buttons */
.prt-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.75rem 1.25rem;
	border: none;
	border-radius: var(--prt-radius-sm);
	font-size: 0.9375rem;
	font-weight: 600;
	font-family: inherit;
	cursor: pointer;
	text-decoration: none;
	transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.prt-btn:active {
	transform: scale(0.98);
}

.prt-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
}

.prt-btn-primary {
	background: linear-gradient(135deg, var(--prt-primary) 0%, var(--prt-primary-hover) 100%);
	color: #fff;
	box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}

.prt-btn-primary:hover:not(:disabled) {
	background: linear-gradient(135deg, var(--prt-primary-hover) 0%, #4338ca 100%);
	box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.prt-btn-secondary {
	background: var(--prt-surface-2);
	color: var(--prt-text);
	border: 1px solid var(--prt-border);
}

.prt-btn-secondary:hover:not(:disabled) {
	background: #f1f5f9;
	border-color: #cbd5e1;
}

/* Loading & error */
.prt-loading {
	text-align: center;
	padding: 1.75rem;
	color: var(--prt-text-muted);
	font-size: 0.9375rem;
}

.prt-error {
	background: #fef2f2;
	border: 1px solid #fecaca;
	border-radius: var(--prt-radius-sm);
	padding: 0.875rem 1rem;
	margin-bottom: 1rem;
	color: var(--prt-error);
	font-size: 0.9375rem;
}

/* Results grid */
.prt-results {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
	margin-top: 1rem;
}

.prt-result-card .prt-card-title {
	margin-bottom: 1rem;
}

.prt-lock {
	font-size: 0.875rem;
	opacity: 0.85;
}

/* Rank & score */
.prt-rank-score-row {
	display: flex;
	gap: 2rem;
	margin-bottom: 1rem;
	flex-wrap: wrap;
}

.prt-rank-box,
.prt-score-box {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

.prt-label {
	font-size: 0.8125rem;
	font-weight: 500;
	color: var(--prt-text-muted);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.prt-value {
	font-size: 1.75rem;
	font-weight: 700;
	color: var(--prt-primary);
	letter-spacing: -0.02em;
}

.prt-plugin-info {
	font-size: 0.9375rem;
	color: var(--prt-text-muted);
	line-height: 1.6;
	margin-top: 0.75rem;
}

.prt-plugin-info-header {
	margin-bottom: 0.5rem;
}

.prt-plugin-info-title {
	margin: 0 0 0.35em;
	font-size: 1.0625rem;
	font-weight: 600;
	color: var(--prt-text);
	line-height: 1.3;
}

.prt-plugin-info-author {
	display: block;
	font-size: 0.875rem;
	color: var(--prt-text-muted);
	margin-bottom: 0.5rem;
}

.prt-plugin-info-author a {
	color: var(--prt-primary);
	text-decoration: none;
	font-weight: 500;
}

.prt-plugin-info-author a:hover {
	text-decoration: underline;
}

.prt-plugin-info-desc {
	margin: 0 0 0.75rem;
	font-size: 0.9375rem;
	line-height: 1.55;
	color: var(--prt-text-muted);
}

.prt-plugin-info-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	font-size: 0.875rem;
	color: var(--prt-text-muted);
}

.prt-plugin-info-meta-item {
	font-weight: 500;
	color: var(--prt-text);
}

.prt-plugin-info strong {
	color: var(--prt-text);
}

/* Suggestions list */
.prt-suggestions-list {
	margin: 0;
	padding-left: 1.25rem;
	line-height: 1.7;
	color: var(--prt-text-muted);
}

.prt-suggestions-list li {
	margin-bottom: 0.5rem;
}

/* Competitors table */
.prt-competitors-list {
	max-height: 360px;
	overflow-y: auto;
	border-radius: var(--prt-radius-sm);
	border: 1px solid var(--prt-border);
}

.prt-competitors-list table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.875rem;
}

.prt-competitors-list th,
.prt-competitors-list td {
	padding: 0.65rem 1rem;
	text-align: left;
	border-bottom: 1px solid var(--prt-border);
}

.prt-competitors-list th {
	background: var(--prt-surface-2);
	font-weight: 600;
	color: var(--prt-text);
}

.prt-competitors-list tr:last-child td {
	border-bottom: none;
}

.prt-upgrade-cta {
	margin: 1rem 0 0;
	font-size: 0.875rem;
	color: var(--prt-text-muted);
}

.prt-upgrade-cta a {
	color: var(--prt-primary);
	font-weight: 500;
}

/* Chart */
.prt-chart-container {
	min-height: 200px;
	position: relative;
	border-radius: var(--prt-radius-sm);
}

.prt-chart-container canvas {
	max-width: 100%;
}

/* Save msg & guest hint */
.prt-save-msg {
	margin-top: 0.5rem;
	font-size: 0.875rem;
}

.prt-save-msg-ok {
	color: var(--prt-success);
}

.prt-save-msg-err {
	color: var(--prt-error);
}

.prt-guest-hint {
	font-size: 0.875rem;
	color: var(--prt-text-muted);
}

.prt-guest-hint a {
	color: var(--prt-primary);
	font-weight: 500;
	text-decoration: none;
}

.prt-guest-hint a:hover {
	text-decoration: underline;
}

.prt-guest-remaining {
	margin-top: 1rem;
	padding: 0.5rem 0;
	font-size: 0.9375rem;
	color: var(--prt-primary);
	font-weight: 500;
}

/* Pro actions */
.prt-pro-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: 1.25rem;
	padding-top: 1rem;
	border-top: 1px solid var(--prt-border);
}

/* Responsive */
@media (max-width: 640px) {
	.prt-dashboard-wrap {
		padding-left: 1rem;
		padding-right: 1rem;
	}

	.prt-hero {
		padding: 1.5rem 1.25rem;
	}

	.prt-dashboard-title {
		font-size: 1.5rem;
	}

	.prt-card {
		padding: 1.25rem 1.25rem;
	}

	.prt-search-box {
		flex-direction: column;
		align-items: stretch;
	}

	.prt-search-box .prt-btn {
		width: 100%;
	}

	.prt-input-optional {
		max-width: none;
	}

	.prt-rank-score-row {
		flex-direction: column;
		gap: 1rem;
	}

	.prt-hero-inner {
		flex-direction: column;
		align-items: flex-start;
	}
}
