/* =============================================================
	Repoevo — detail.css
   ============================================================= */

/* -------------------------------------------------------------
   Hero
   ------------------------------------------------------------- */

   .pm-hero {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	background: #fff;
	border: 1px solid #f0f0f0;
	border-radius: 12px;
	padding: 18px 24px;
	margin-bottom: 16px;
}

.pm-hero-left {
	display: flex;
	align-items: center;
	gap: 16px;
	min-width: 0;
}

.pm-hero-icon {
	width: 56px;
	height: 56px;
	border-radius: 10px;
	object-fit: cover;
	flex-shrink: 0;
	border: 1px solid #f0f0f0;
}

.pm-hero-icon-placeholder {
	width: 56px;
	height: 56px;
	border-radius: 10px;
	background: #f9fafb;
	border: 1px solid #f0f0f0;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	color: #9ca3af;
}

.pm-hero-info {
	min-width: 0;
}

.pm-hero-title {
	margin: 0 0 6px;
	padding: 0;
	font-size: 20px;
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 600px;
}

.pm-hero-meta {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	font-size: 12px;
	color: #374151;
}

.pm-hero-meta-label {
	color: #9ca3af;
	margin-right: 2px;
}

.pm-hero-meta-sep {
	color: #d1d5db;
}

.pm-hero-meta-link {
	color: #2563eb;
	text-decoration: none;
}

.pm-hero-meta-link:hover {
	text-decoration: underline;
}

.pm-hero-right {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-shrink: 0;
	color: #6b7280;
	font-size: 12px;
	font-weight: 500;
}

.pm-hero-right svg {
	color: #9ca3af;
}

.pm-hero-date {
	color: #374151;
}

.pm-hero-divider {
	margin: 0 0 20px;
	border: none;
	border-top: 1px solid #f3f3f3;
}

/* -------------------------------------------------------------
   Live Dot
   ------------------------------------------------------------- */

.pm-live-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #16a34a;
	position: relative;
	flex-shrink: 0;
}

.pm-live-dot.pulse::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background: #16a34a;
	animation: pmPulse 1.8s infinite;
}

@keyframes pmPulse {
	0% {
		transform: scale(1);
		opacity: 0.8;
	}
	70% {
		transform: scale(2.2);
		opacity: 0;
	}
	100% {
		opacity: 0;
	}
}

/* -------------------------------------------------------------
   Filter Form
   ------------------------------------------------------------- */

.pm-filter-form {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	margin-bottom: 10px;
}

.pm-filter-left {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

/* -------------------------------------------------------------
   Compare Dropdown — neben Daily Downloads Titel
   ------------------------------------------------------------- */

.pm-compare-select-wrap {
	display: flex;
	align-items: center;
	gap: 8px;
}

.pm-compare-select-wrap form {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 0;
}

.pm-compare-label {
	font-size: 13px;
	color: #64748b;
	white-space: nowrap;
}

.pm-compare-select {
	min-width: 140px;
	max-width: 200px;
}

/* -------------------------------------------------------------
   Stats Grid
   ------------------------------------------------------------- */

.pm-stats-grid {
	display: grid;
	gap: 20px;
	margin: 30px 0;
	grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1200px) {
	.pm-stats-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 600px) {
	.pm-stats-grid {
		grid-template-columns: 1fr;
	}
}

.pm-stat-box {
	background: #fff;
	padding: 25px;
	border-radius: 12px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
	text-align: center;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.pm-stat-box h3 {
	margin: 0;
	font-size: 14px;
	font-weight: 500;
	color: #666;
}

.pm-stat-box strong {
	font-size: 28px;
	display: block;
}

/* -------------------------------------------------------------
   Conversion Farben
   ------------------------------------------------------------- */

.pm-conv-sehr.gut,
.pm-conv-value.pm-conv-sehr\.gut {
	color: #16a34a;
}

.pm-conv-gut,
.pm-conv-value.pm-conv-gut {
	color: #22c55e;
}

.pm-conv-ok,
.pm-conv-value.pm-conv-ok {
	color: #f59e0b;
}

.pm-conv-schwach,
.pm-conv-value.pm-conv-schwach {
	color: #dc2626;
}

.pm-conv-label.pm-conv-sehr\.gut { color: #16a34a; }
.pm-conv-label.pm-conv-gut       { color: #22c55e; }
.pm-conv-label.pm-conv-ok        { color: #f59e0b; }
.pm-conv-label.pm-conv-schwach   { color: #dc2626; }

/* -------------------------------------------------------------
   Chart Grid
   ------------------------------------------------------------- */

.pm-chart-grid {
	display: grid;
	gap: 30px;
	grid-template-columns: 1fr;
}

.pm-chart-box {
	position: relative;
	width: 100%;
	max-height: 500px;
}

.pm-chart-inner {
	display: flex;
	gap: 20px;
}

.pm-chart-canvas-wrap {
	flex: 1;
	max-height: 500px;
}

.pm-chart-grid .pm-chart-box canvas {
	width: 100% !important;
	height: 100% !important;
}

.pm-chart-legend {
	width: 200px;
}

.pm-chart-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 10px;
}

.pm-add-keyword-form {
	display: flex;
	gap: 6px;
	align-items: center;
}

.pm-add-keyword-form input {
	width: 180px;
}

@media (max-width: 1200px) {
	.pm-chart-grid {
		grid-template-columns: 1fr;
	}
}

/* -------------------------------------------------------------
   Vergleich
   ------------------------------------------------------------- */

.pm-compare-wrap {
	margin-top: 40px;
}

.pm-plugin-name {
	max-width: 320px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.pm-meta {
	font-size: 12px;
	color: #6b7280;
}

.pm-self-row {
	background: #ecfdf5;
}

.pm-self-badge {
	margin-left: 6px;
	color: #16a34a;
	font-size: 12px;
	font-weight: 400;
}

.pm-status-ok {
	color: #16a34a;
}

.pm-status-muted {
	color: #6b7280;
}

/* -------------------------------------------------------------
   Actions — Icon Buttons (geerbt von info.css)
   ------------------------------------------------------------- */

.pm-actions {
	display: flex;
	gap: 6px;
	align-items: center;
	justify-content: flex-end;
}

.pm-btn-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 6px;
	border: 1px solid #d1d5db;
	background: #fff;
	cursor: pointer;
	text-decoration: none;
	color: #374151;
	transition: background 0.15s, border-color 0.15s;
}

.pm-btn-icon:hover {
	background: #f3f4f6;
	border-color: #9ca3af;
	color: #111827;
}

.pm-btn-icon svg {
	width: 15px;
	height: 15px;
	stroke: currentColor;
	fill: none;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* -------------------------------------------------------------
   Keywords
   ------------------------------------------------------------- */

.keywordflex {
	position: relative;
	display: grid;
	gap: 20px;
	margin: 0;
	padding: 20px;
	grid-template-columns: repeat(2, 1fr);
}

.keyword_form {
	position: relative;
	padding: 20px;
}

/* -------------------------------------------------------------
   Responsive
   ------------------------------------------------------------- */

@media (max-width: 768px) {

	.pm-hero {
		flex-direction: column;
		align-items: flex-start;
	}

	.pm-hero-title {
		font-size: 16px;
		max-width: 100%;
		white-space: normal;
	}

	.pm-hero-right {
		align-self: flex-start;
	}

	.pm-chart-inner {
		flex-direction: column;
	}

	.pm-chart-legend {
		width: 100%;
		margin-top: 12px;
	}

	.keywordflex {
		grid-template-columns: 1fr;
	}

	.pm-chart-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 10px;
	}

	.pm-add-keyword-form {
		width: 100%;
	}

	.pm-add-keyword-form input {
		flex: 1;
		width: auto;
	}

}

/* -------------------------------------------------------------
   Section Toggle
   ------------------------------------------------------------- */

   .pm-section-wrap {
	margin-top: 30px;
}

.pm-section-toggle {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	padding: 14px 20px;
	cursor: pointer;
	font-size: 15px;
	font-weight: 600;
	color: #111827;
	text-align: left;
	transition: background 0.15s;
}

.pm-section-toggle:hover {
	background: #f9fafb;
}

.pm-section-toggle span:first-child {
	flex: 1;
}

.pm-section-badge {
	background: #2563eb;
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	padding: 2px 8px;
	border-radius: 999px;
}

.pm-pro-badge {
	background: #f59e0b;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	padding: 2px 8px;
	border-radius: 999px;
}

.pm-toggle-icon {
	width: 18px;
	height: 18px;
	stroke: currentColor;
	fill: none;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
	transition: transform 0.2s;
	flex-shrink: 0;
}

.pm-section-body {
	margin-top: 12px;
}

.pm-section-desc {
	color: #6b7280;
	font-size: 13px;
	margin-bottom: 12px;
}

.pm-table td:last-child {
    text-align: right;
    white-space: nowrap;
}

.pm-table th:last-child {
    text-align: right;
}

/* -------------------------------------------------------------
   Rank Badge / Locked
   ------------------------------------------------------------- */

.pm-rank-badge {
	display: inline-block;
	background: #f3f4f6;
	color: #374151;
	font-size: 12px;
	font-weight: 600;
	padding: 2px 8px;
	border-radius: 6px;
}

.pm-rank-locked {
	display: inline-block;
	background: #fef3c7;
	color: #92400e;
	font-size: 12px;
	font-weight: 600;
	padding: 2px 8px;
	border-radius: 6px;
}

/* -------------------------------------------------------------
   Plugin B Match Badge — Suggested Keywords
   ------------------------------------------------------------- */

.pm-b-match-badge {
	display: inline-block;
	background: #f59e0b1a;
	color: #92400e;
	border: 1px solid #f59e0b66;
	border-radius: 4px;
	font-size: 11px;
	font-weight: 600;
	padding: 1px 6px;
	margin-left: 6px;
	vertical-align: middle;
	max-width: 120px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
