/* ============================================================
   Mevabi – Related Posts Inline  |  Admin styles  v1.1.0
   ============================================================ */

.mvrpi-admin { max-width: 900px; }

.mvrpi-admin h1 {
	font-size: 1.4rem;
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 1.8rem;
}

.mvrpi-badge {
	background: #6366f1;
	color: #fff;
	font-size: .6rem;
	padding: 3px 10px;
	border-radius: 20px;
	font-weight: 700;
	letter-spacing: .06em;
}

/* ── Tabs ── */
.mvrpi-tabs {
	display: flex;
	gap: 2px;
	border-bottom: 2px solid #e2e8f0;
	margin-bottom: 2rem;
	flex-wrap: wrap;
}

.mvrpi-tab {
	padding: 9px 20px;
	cursor: pointer;
	border-radius: 8px 8px 0 0;
	font-weight: 600;
	font-size: .82rem;
	color: #64748b;
	border: 2px solid transparent;
	border-bottom: none;
	background: transparent;
	transition: color .15s, background .15s;
	line-height: 1;
}

.mvrpi-tab:hover { color: #6366f1; background: #f5f3ff; }

.mvrpi-tab.active {
	color: #6366f1;
	border-color: #e2e8f0;
	border-bottom-color: #f8f8f8;
	background: #f8f8f8;
	margin-bottom: -2px;
}

/* ── Panels ── */
.mvrpi-panel { display: none; }
.mvrpi-panel.active { display: block; }

/* ── Cards ── */
.mvrpi-card {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 1.6rem;
	margin-bottom: 1.4rem;
	box-shadow: 0 1px 4px rgba(0,0,0,.04);
}

.mvrpi-card-title {
	font-size: .95rem;
	font-weight: 700;
	color: #0f172a;
	margin: 0 0 1.2rem;
	padding-bottom: .7rem;
	border-bottom: 1px solid #f1f5f9;
}

.mvrpi-subcard-title {
	font-size: .88rem;
	font-weight: 700;
	color: #334155;
	margin: 1.2rem 0 .8rem;
	padding-top: 1rem;
	border-top: 1px solid #f1f5f9;
}

/* ── Fields ── */
.mvrpi-field { margin-bottom: 1.1rem; }
.mvrpi-field:last-child { margin-bottom: 0; }

.mvrpi-label {
	font-weight: 600;
	font-size: .83rem;
	color: #374151;
	display: block;
	margin-bottom: 5px;
}

.mvrpi-desc {
	color: #94a3b8;
	font-size: .78rem;
	margin: 4px 0 0;
	display: block;
}

.mvrpi-field input[type="text"],
.mvrpi-field select {
	max-width: 320px;
	border-radius: 6px;
}

/* ── Radio groups ── */
.mvrpi-radio-group {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.mvrpi-radio-group.mvrpi-row {
	flex-direction: row;
	flex-wrap: wrap;
	gap: 16px;
}

.mvrpi-radio-group label {
	display: flex;
	align-items: center;
	gap: 7px;
	font-size: .85rem;
	font-weight: 500;
	cursor: pointer;
}

/* ── Toggle ── */
.mvrpi-toggle {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: .85rem;
	font-weight: 500;
	cursor: pointer;
}

.mvrpi-toggle input[type="checkbox"] {
	width: 36px;
	height: 20px;
	accent-color: #6366f1;
	cursor: pointer;
}

/* ── Design selector grid ── */
.mvrpi-design-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 12px;
	margin-bottom: 1.6rem;
}

.mvrpi-design-opt {
	border: 2px solid #e2e8f0;
	border-radius: 10px;
	cursor: pointer;
	transition: border-color .2s;
	overflow: hidden;
	position: relative;
}

.mvrpi-design-opt input[type="radio"] {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

.mvrpi-design-opt.mvrpi-selected { border-color: #6366f1; }

.mvrpi-design-preview-box {
	height: 80px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.mvrpi-design-label {
	padding: 8px 10px;
	border-top: 1px solid #f1f5f9;
	font-size: .78rem;
	font-weight: 600;
	text-align: center;
	color: #374151;
}

.mvrpi-check-icon {
	position: absolute;
	top: 6px;
	right: 6px;
	width: 18px;
	height: 18px;
	background: #6366f1;
	border-radius: 50%;
	display: none;
	align-items: center;
	justify-content: center;
}

.mvrpi-design-opt.mvrpi-selected .mvrpi-check-icon { display: flex; }

/* ── Color panels ── */
.mvrpi-colors-panel { display: none; }
.mvrpi-colors-panel.mvrpi-colors-active { display: block; }

.mvrpi-color-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 10px;
	margin-top: .6rem;
}

.mvrpi-color-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	background: #f8fafc;
	border: 1px solid #f1f5f9;
	border-radius: 7px;
	padding: 8px 10px;
}

.mvrpi-color-row label {
	font-size: .8rem;
	font-weight: 500;
	color: #374151;
}

.mvrpi-color-row input[type="color"] {
	width: 36px;
	height: 28px;
	border: 1px solid #e2e8f0;
	border-radius: 4px;
	cursor: pointer;
	padding: 2px;
	background: #fff;
}

.mvrpi-extra-fields {
	display: flex;
	gap: 20px;
	flex-wrap: wrap;
	margin-top: 14px;
}

/* ── Sub-field (indented nested field, e.g. manual IDs) ── */
.mvrpi-sub-field {
	margin-top: 10px;
	padding: 12px 14px;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
}

/* ── Font size fields ── */
.mvrpi-font-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 14px;
}

.mvrpi-font-field label {
	font-size: .82rem;
	font-weight: 600;
	color: #374151;
	display: block;
	margin-bottom: 5px;
}

.mvrpi-font-field input {
	max-width: 140px;
	border-radius: 6px;
}

/* ── Sticky save bar ── */
.mvrpi-save-bar {
	position: sticky;
	bottom: 0;
	background: #fff;
	border-top: 1px solid #e2e8f0;
	padding: 14px 0;
	margin-top: 1.5rem;
	z-index: 50;
}

.mvrpi-save-bar .button-primary {
	height: auto;
	padding: 9px 26px;
	font-size: .9rem;
}

/* ── Stats tab ── */
.mvrpi-tab-stats { color: #0ea5e9 !important; }
.mvrpi-tab-stats.active { color: #0ea5e9 !important; border-color: #e2e8f0 !important; }

.mvrpi-stats-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: .4rem;
}

.mvrpi-reset-btn {
	flex-shrink: 0;
	color: #dc2626 !important;
	border-color: #fca5a5 !important;
	background: #fff5f5 !important;
	font-size: .82rem !important;
	height: auto !important;
	padding: 5px 14px !important;
	transition: background .15s;
}
.mvrpi-reset-btn:hover {
	background: #fee2e2 !important;
	border-color: #f87171 !important;
}

/* ── Chart ── */
.mvrpi-chart-wrap {
	position: relative;
	width: 100%;
	height: 200px;
	margin-bottom: 1.4rem;
	background: #f8fafc;
	border: 1px solid #f1f5f9;
	border-radius: 10px;
	overflow: hidden;
}

#mvrpi-stats-chart {
	display: block;
	width: 100% !important;
	height: 100% !important;
}

/* ── Stats table ── */
.mvrpi-stats-table {
	border-collapse: collapse;
	width: 100%;
	margin-top: .4rem;
	font-size: .84rem;
}

.mvrpi-stats-table thead th {
	font-size: .8rem;
	font-weight: 700;
	color: #334155;
	background: #f1f5f9;
	padding: 9px 12px;
	border-bottom: 2px solid #e2e8f0;
	white-space: nowrap;
}

.mvrpi-stats-table tbody td {
	padding: 8px 12px;
	vertical-align: middle;
	border-bottom: 1px solid #f1f5f9;
	color: #374151;
}

.mvrpi-sortable {
	cursor: pointer;
	user-select: none;
}
.mvrpi-sortable:hover { background: #e9eef5; }
.mvrpi-sort-active { color: #6366f1 !important; }

.mvrpi-sort-icon {
	display: inline-block;
	margin-left: 4px;
	opacity: .5;
	font-size: .8em;
}
.mvrpi-sort-active .mvrpi-sort-icon { opacity: 1; }

.mvrpi-clicks-cell {
	font-weight: 700;
	color: #6366f1;
	text-align: right;
	white-space: nowrap;
}

.mvrpi-no-stats {
	padding: 1.2rem 0;
	font-style: italic;
}

/* ── Pro tab ── */
.mvrpi-tab-freevspro { color: #b45309 !important; }
.mvrpi-tab-freevspro.active {
	color: #b45309 !important;
	border-color: #e2e8f0 !important;
}

/* ── Pro disabled wrapper ── */
.mvrpi-pro-disabled {
	opacity: 0.45;
	pointer-events: none;
	user-select: none;
	cursor: not-allowed;
	filter: grayscale(30%);
}

/* ── Pro badge (inline "(Pro)" label) ── */
.mvrpi-pro-badge {
	display: inline-block;
	background: #fef3c7;
	color: #92400e;
	font-size: .65rem;
	font-weight: 700;
	font-style: italic;
	padding: 1px 6px;
	border-radius: 10px;
	letter-spacing: .04em;
	margin-left: 5px;
	vertical-align: middle;
	border: 1px solid #fcd34d;
}

/* ── Pro option row (radio/checkbox grayed) ── */
.mvrpi-pro-option {
	opacity: 0.42;
	pointer-events: none;
	user-select: none;
	cursor: not-allowed;
}

/* ── Pro design card overlay ── */
.mvrpi-design-pro {
	opacity: 0.45;
	pointer-events: none;
	user-select: none;
	cursor: not-allowed;
	filter: grayscale(40%);
	position: relative;
}

.mvrpi-design-pro-overlay {
	position: absolute;
	top: 6px;
	left: 6px;
	background: rgba(180,83,9,.85);
	color: #fff;
	font-size: .65rem;
	font-weight: 700;
	padding: 2px 7px;
	border-radius: 10px;
	letter-spacing: .04em;
	pointer-events: none;
}

.mvrpi-design-pro-label {
	color: #92400e;
	font-weight: 700;
	font-style: italic;
	font-size: .72rem;
}

/* ── Stats Pro notice card ── */
.mvrpi-pro-notice-card {
	background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
	border: 2px solid #fcd34d;
	border-radius: 16px;
	padding: 3rem 2rem;
	text-align: center;
	box-shadow: 0 4px 20px rgba(180,83,9,.08);
}

.mvrpi-pro-notice-icon {
	font-size: 3rem;
	margin-bottom: 1rem;
	line-height: 1;
}

.mvrpi-pro-notice-card h2 {
	font-size: 1.5rem;
	font-weight: 700;
	color: #1e293b;
	margin: 0 0 .8rem;
}

.mvrpi-pro-text {
	background: linear-gradient(90deg, #f59e0b, #b45309);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	font-style: italic;
}

.mvrpi-pro-notice-card p {
	color: #475569;
	font-size: .95rem;
	margin: 0 0 1.8rem;
	max-width: 480px;
	margin-left: auto;
	margin-right: auto;
}

.mvrpi-pro-cta-buttons {
	display: flex;
	gap: 12px;
	justify-content: center;
	flex-wrap: wrap;
}

.mvrpi-btn-upgrade {
	background: linear-gradient(135deg, #f59e0b, #b45309) !important;
	border-color: #92400e !important;
	color: #fff !important;
	font-weight: 700 !important;
	padding: 10px 28px !important;
	height: auto !important;
	font-size: .9rem !important;
	border-radius: 8px !important;
	box-shadow: 0 3px 12px rgba(180,83,9,.35), 0 1px 3px rgba(0,0,0,.1) !important;
	text-shadow: 0 1px 2px rgba(0,0,0,.2) !important;
	letter-spacing: .02em !important;
	transition: all .2s ease !important;
	text-decoration: none !important;
}
.mvrpi-btn-upgrade:hover {
	background: linear-gradient(135deg, #d97706, #92400e) !important;
	box-shadow: 0 5px 18px rgba(180,83,9,.45), 0 2px 5px rgba(0,0,0,.15) !important;
	transform: translateY(-1px) !important;
}

.mvrpi-btn-learn {
	height: auto !important;
	padding: 10px 24px !important;
	font-size: .9rem !important;
	border-radius: 8px !important;
	transition: all .2s ease !important;
	text-decoration: none !important;
}

/* ── Free vs Pro table panel ── */
.mvrpi-freevspro-header {
	text-align: center;
	padding: 1rem 0 1.4rem;
}

.mvrpi-freevspro-star {
	font-size: 2rem;
	display: block;
	margin-bottom: .4rem;
}

.mvrpi-freevspro-header h2 {
	font-size: 1.25rem;
	font-weight: 700;
	color: #0f172a;
	margin: 0 0 .5rem;
}

.mvrpi-freevspro-header p {
	color: #64748b;
	font-size: .9rem;
	margin: 0;
}

.mvrpi-freevspro-table {
	border-collapse: collapse;
	width: 100%;
	font-size: .87rem;
	margin-top: .6rem;
}

.mvrpi-freevspro-table thead tr {
	background: #f8fafc;
}

.mvrpi-freevspro-table thead th {
	padding: 10px 16px;
	font-size: .82rem;
	font-weight: 700;
	color: #334155;
	border-bottom: 2px solid #e2e8f0;
	text-align: center;
}

.mvrpi-freevspro-table thead th.mvrpi-fvp-feature-col {
	text-align: left;
	width: 60%;
}

.mvrpi-fvp-pro-col {
	background: linear-gradient(135deg, #fef9ee, #fef3c7) !important;
	color: #92400e !important;
}

.mvrpi-freevspro-table tbody tr:nth-child(even) {
	background: #f8fafc;
}

.mvrpi-freevspro-table tbody td {
	padding: 9px 16px;
	border-bottom: 1px solid #f1f5f9;
	color: #374151;
	vertical-align: middle;
}

.mvrpi-freevspro-table tbody td:first-child {
	font-weight: 500;
}

.mvrpi-fvp-col {
	text-align: center;
	width: 20%;
	font-size: .95rem;
}

.mvrpi-fvp-yes {
	text-align: center;
	color: #16a34a;
	font-weight: 700;
	font-size: .95rem;
}

.mvrpi-fvp-no {
	text-align: center;
	color: #94a3b8;
	font-size: .95rem;
}

.mvrpi-fvp-partial {
	text-align: center;
	color: #64748b;
	font-size: .88rem;
}

.mvrpi-freevspro-cta {
	display: flex;
	gap: 12px;
	justify-content: center;
	flex-wrap: wrap;
	padding: 1.8rem 0 .4rem;
}