/**
 * 2fox4 WP Blog Agent - Admin Stylesheet
 * Version: 1.2.0
 * Text Domain: wp-blog-agent
 */

/* ===== Reset & Container ===== */
.wbag-admin-container {
	max-width: 1100px;
	margin: 20px auto 40px;
	padding: 0 12px;
}

/* ===== Header ===== */
.wbag-header {
	background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
	color: #fff;
	padding: 28px 32px;
	border-radius: 16px;
	margin-bottom: 28px;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0, 0, 0, 0.08);
	position: relative;
	overflow: hidden;
}

.wbag-header::before {
	content: '';
	position: absolute;
	top: -50%;
	right: -10%;
	width: 300px;
	height: 300px;
	background: radial-gradient(circle, rgba(255, 107, 53, 0.08) 0%, transparent 70%);
	border-radius: 50%;
	pointer-events: none;
}

.wbag-header-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	position: relative;
	z-index: 1;
}

.wbag-header-left {
	flex: 1;
	min-width: 0;
}

.wbag-header-title-row {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.wbag-header-title-row h1 {
	margin: 0;
	font-size: 24px;
	font-weight: 700;
	letter-spacing: -0.3px;
	line-height: 1.2;
	color: #fff;
}

.wbag-version-badge {
	display: inline-block;
	background: rgba(255, 107, 53, 0.2);
	color: #FF6B35;
	padding: 3px 10px;
	border-radius: 20px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.3px;
	border: 1px solid rgba(255, 107, 53, 0.3);
}

.wbag-header-subtitle {
	margin: 6px 0 0 0;
	color: rgba(255, 255, 255, 0.5);
	font-size: 13px;
	font-weight: 400;
}

/* Donate Section (dezent, integriert) */
.wbag-header-donate {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 8px;
	flex-shrink: 0;
}

.wbag-donate-text {
	color: rgba(255, 255, 255, 0.4);
	font-size: 11px;
	text-align: right;
	max-width: 220px;
	line-height: 1.4;
}

.wbag-donate-button {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	background: rgba(255, 255, 255, 0.08);
	color: rgba(255, 255, 255, 0.7) !important;
	font-size: 12px;
	font-weight: 500;
	padding: 7px 14px;
	border-radius: 8px;
	text-decoration: none !important;
	transition: all 0.25s ease;
	border: 1px solid rgba(255, 255, 255, 0.1);
	white-space: nowrap;
}

.wbag-donate-button .dashicons {
	font-size: 14px;
	width: 14px;
	height: 14px;
	line-height: 14px;
	color: #f87171;
}

.wbag-donate-button:hover {
	background: rgba(255, 255, 255, 0.14);
	color: rgba(255, 255, 255, 0.95) !important;
	border-color: rgba(255, 255, 255, 0.2);
	transform: translateY(-1px);
}

/* ===== Tab Navigation ===== */
.wbag-tabs-nav {
	display: flex;
	gap: 2px;
	background: #f1f5f9;
	padding: 4px;
	border-radius: 12px;
	margin-bottom: 24px;
	flex-wrap: wrap;
}

.wbag-tab-button {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 10px 16px;
	border: none;
	background: transparent;
	color: #64748b;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	border-radius: 8px;
	transition: all 0.2s ease;
	white-space: nowrap;
}

.wbag-tab-button .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
	line-height: 16px;
}

.wbag-tab-button:hover {
	background: rgba(255, 255, 255, 0.7);
	color: #334155;
}

.wbag-tab-button.active {
	background: #fff;
	color: #0f172a;
	font-weight: 600;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
}

.wbag-tab-button.active .dashicons {
	color: #FF6B35;
}

/* ===== Tab Content ===== */
.wbag-tab-content {
	display: none;
}

.wbag-tab-content.active {
	display: block;
}

/* ===== Cards ===== */
.wbag-card {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 28px;
	margin-bottom: 24px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
	transition: box-shadow 0.2s ease;
}

.wbag-card:hover {
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.wbag-card h2 {
	margin: 0 0 24px 0;
	font-size: 17px;
	font-weight: 700;
	color: #0f172a;
	letter-spacing: -0.2px;
}

.wbag-card h3 {
	margin: 24px 0 16px 0;
	font-size: 14px;
	font-weight: 600;
	color: #334155;
	padding-bottom: 10px;
	border-bottom: 1px solid #f1f5f9;
}

.wbag-card h3:first-child {
	margin-top: 0;
}

/* ===== Section Titles ===== */
.wbag-section-title {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 20px 0;
	font-size: 17px;
	font-weight: 700;
	color: #0f172a;
}

.wbag-section-title .dashicons {
	color: #FF6B35;
	font-size: 20px;
	width: 20px;
	height: 20px;
}

/* ===== Form Fields ===== */
.wbag-form-group {
	margin-bottom: 20px;
}

.wbag-form-group:last-child {
	margin-bottom: 0;
}

.wbag-form-group label {
	display: block;
	margin-bottom: 6px;
	font-weight: 600;
	color: #334155;
	font-size: 13px;
}

.wbag-form-group input[type="text"],
.wbag-form-group input[type="email"],
.wbag-form-group input[type="url"],
.wbag-form-group input[type="number"],
.wbag-form-group input[type="password"],
.wbag-form-group textarea,
.wbag-form-group select {
	width: 100%;
	max-width: 480px;
	padding: 9px 14px;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	font-size: 13px;
	font-family: inherit;
	color: #1e293b;
	background: #fff;
	transition: all 0.2s ease;
	line-height: 1.4;
}

.wbag-form-group input:focus,
.wbag-form-group textarea:focus,
.wbag-form-group select:focus {
	outline: none;
	border-color: #FF6B35;
	box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.wbag-form-group textarea {
	resize: vertical;
	min-height: 90px;
	max-width: 100%;
}

.wbag-form-group .description {
	display: block;
	margin-top: 5px;
	color: #94a3b8;
	font-size: 12px;
	font-style: normal;
	line-height: 1.5;
}

.wbag-form-group .description a {
	color: #FF6B35;
}

/* ===== API Billing Links ===== */
.wbag-api-links {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
	margin-top: 2px;
}

.wbag-api-links a {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	text-decoration: none;
	transition: color 0.15s ease;
}

.wbag-api-links a .dashicons {
	font-size: 14px;
	width: 14px;
	height: 14px;
	line-height: 14px;
}

.wbag-api-links a:hover {
	color: #e85d2a;
}

.wbag-api-link-sep {
	color: #cbd5e1;
	font-size: 11px;
}

a.wbag-billing-link {
	color: #64748b;
}

a.wbag-billing-link:hover {
	color: #FF6B35;
}

.wbag-form-group-inline {
	display: flex;
	align-items: center;
	gap: 12px;
}

.wbag-form-group-inline label {
	margin-bottom: 0;
	white-space: nowrap;
}

.wbag-form-group-inline .small-text {
	width: 80px !important;
	max-width: 80px;
}

/* ===== Save Button ===== */
.wbag-action-buttons {
	border-top: 2px solid #f1f5f9;
	padding-top: 20px;
}

.wbag-action-buttons .button-primary {
	background: #FF6B35 !important;
	border-color: #e5571f !important;
	border-radius: 8px;
	padding: 8px 28px;
	font-size: 13px;
	font-weight: 600;
	height: auto;
	line-height: 1.6;
	transition: all 0.2s ease;
}

.wbag-action-buttons .button-primary:hover {
	background: #e5571f !important;
	border-color: #cc4a16 !important;
}

/* ===== Actions Section ===== */
.wbag-actions-section {
	margin-bottom: 24px;
}

.wbag-actions-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
}

.wbag-action-card {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 24px;
	position: relative;
	overflow: visible;
	transition: all 0.25s ease;
}

.wbag-action-card:hover {
	border-color: #cbd5e1;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.wbag-action-card--scout {
	border-top: 3px solid #3b82f6;
}

.wbag-action-card--writer {
	border-top: 3px solid #FF6B35;
}

.wbag-action-card-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 10px;
	margin-bottom: 14px;
}

.wbag-action-card--scout .wbag-action-card-icon {
	background: #eff6ff;
	color: #3b82f6;
}

.wbag-action-card--writer .wbag-action-card-icon {
	background: #fff7ed;
	color: #FF6B35;
}

.wbag-action-card-icon .dashicons {
	font-size: 22px;
	width: 22px;
	height: 22px;
}

.wbag-action-card-body h3 {
	margin: 0 0 6px 0 !important;
	font-size: 15px;
	font-weight: 700;
	color: #0f172a;
	border-bottom: none !important;
	padding-bottom: 0 !important;
}

.wbag-action-card-body p {
	margin: 0 0 16px 0;
	color: #64748b;
	font-size: 13px;
	line-height: 1.5;
}

/* Action Buttons */
.wbag-action-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 10px 20px !important;
	border-radius: 8px !important;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
	border: none !important;
	font-size: 13px;
	text-decoration: none;
	line-height: 1 !important;
	height: auto !important;
}

.wbag-action-btn .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
	line-height: 16px;
}

.wbag-action-btn:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.wbag-action-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	transform: none !important;
	box-shadow: none !important;
}

.wbag-btn-scout {
	background: #3b82f6 !important;
	color: #fff !important;
}

.wbag-btn-scout:hover:not(:disabled) {
	background: #2563eb !important;
	color: #fff !important;
}

.wbag-btn-writer {
	background: #FF6B35 !important;
	color: #fff !important;
}

.wbag-btn-writer:hover:not(:disabled) {
	background: #e5571f !important;
	color: #fff !important;
}

/* Spinner */
.wbag-action-spinner .spinner {
	float: none;
	margin: 8px 0 0 0;
}

/* ===== Custom Topic Section ===== */
.wbag-custom-topic-section {
	margin-top: 28px;
}

.wbag-custom-topic-card {
	padding: 24px;
}

.wbag-custom-topic-desc {
	color: #64748b;
	font-size: 13px;
	margin: 0 0 20px 0;
}

.wbag-affiliate-section {
	margin-top: 0;
}

.wbag-affiliate-title {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 14px !important;
	font-weight: 600 !important;
	color: #334155;
	margin: 0 0 6px 0 !important;
	padding: 0 !important;
	border: none !important;
}

.wbag-affiliate-title .dashicons {
	color: #FF6B35;
	font-size: 18px;
	width: 18px;
	height: 18px;
}

.wbag-affiliate-desc {
	color: #94a3b8;
	font-size: 12px;
	margin: 0 0 14px 0;
}

.wbag-affiliate-row {
	margin-bottom: 10px;
}

.wbag-affiliate-fields {
	display: flex;
	gap: 8px;
	align-items: center;
}

.wbag-affiliate-fields input[type="text"],
.wbag-affiliate-fields input[type="url"] {
	flex: 1;
	min-width: 0;
	padding: 8px 12px;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	font-size: 13px;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.wbag-affiliate-fields input:focus {
	border-color: #FF6B35;
	box-shadow: 0 0 0 2px rgba(255, 107, 53, 0.1);
	outline: none;
}

.wbag-affiliate-remove {
	flex-shrink: 0;
	padding: 4px 6px !important;
	min-height: 32px;
}

.wbag-affiliate-remove .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
	color: #94a3b8;
}

.wbag-affiliate-remove:hover .dashicons {
	color: #ef4444;
}

#wbag_add_affiliate_link {
	margin-top: 4px;
}

#wbag_add_affiliate_link .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
	vertical-align: text-bottom;
	margin-right: 2px;
}

#wbag_custom_topic_write {
	font-size: 14px;
	padding: 8px 20px !important;
	height: auto !important;
}

#wbag_custom_topic_write .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
	vertical-align: text-bottom;
	margin-right: 4px;
}

/* ===== Topic Queue ===== */
.wbag-topic-queue .wbag-queue-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

/* Approved topics section (waiting to be written) */
.wbag-approved-queue {
	border-left: 4px solid #10b981;
}
.wbag-approved-queue .wbag-section-title .dashicons {
	color: #10b981;
}
.wbag-approved-queue .wbag-hint {
	color: #64748b;
	font-size: 13px;
	margin: 0 0 12px 0;
}
.wbag-badge-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	height: 22px;
	padding: 0 8px;
	margin-left: 8px;
	background: #10b981;
	color: #fff;
	border-radius: 11px;
	font-size: 12px;
	font-weight: 600;
	vertical-align: middle;
}
.wbag-approved-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.wbag-approved-item {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	padding: 14px 16px;
	background: #f0fdf4;
	border: 1px solid #bbf7d0;
	border-radius: 10px;
	transition: all 0.15s ease;
}
.wbag-approved-item:hover {
	background: #dcfce7;
	border-color: #86efac;
}
.wbag-approved-item .wbag-queue-info h4 {
	margin: 0 0 4px 0;
	color: #065f46;
}
.wbag-approved-item .wbag-queue-info p {
	margin: 0;
	color: #475569;
	font-size: 13px;
}

.wbag-queue-item {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 16px;
	padding: 16px 18px;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	transition: all 0.15s ease;
}

.wbag-queue-item:hover {
	background: #f1f5f9;
	border-color: #cbd5e1;
}

.wbag-queue-info {
	flex: 1;
	min-width: 0;
}

.wbag-queue-info h4 {
	margin: 0 0 4px 0;
	font-size: 14px;
	font-weight: 600;
	color: #0f172a;
	line-height: 1.4;
}

.wbag-queue-info p {
	margin: 0;
	color: #64748b;
	font-size: 12px;
	line-height: 1.5;
}

.wbag-queue-actions {
	display: flex;
	gap: 6px;
	flex-shrink: 0;
	align-items: flex-start;
}

.wbag-approve-topic,
.wbag-delete-topic {
	border-radius: 6px !important;
	font-size: 12px !important;
	padding: 5px 12px !important;
	font-weight: 500 !important;
}

/* ===== Results Area ===== */
.wbag-action-result {
	margin-top: 12px;
}

.wbag-results {
	background: #f8fafc;
	border-left: 3px solid #FF6B35;
	padding: 14px 16px;
	border-radius: 0 8px 8px 0;
	margin-top: 12px;
}

.wbag-results p {
	margin: 0;
	color: #334155;
	font-size: 13px;
	line-height: 1.6;
}

.wbag-results a {
	color: #FF6B35;
	text-decoration: none;
	font-weight: 500;
}

.wbag-results a:hover {
	text-decoration: underline;
}

.wbag-results.success {
	background: #f0fdf4;
	border-left-color: #10b981;
}

.wbag-results.error {
	background: #fef2f2;
	border-left-color: #ef4444;
}

.wbag-results.error p {
	color: #991b1b;
}

/* ===== Info Box ===== */
.wbag-info-box {
	background: #f0f9ff;
	border: 1px solid #bae6fd;
	border-radius: 8px;
	padding: 12px 16px;
	margin-bottom: 16px;
	font-size: 13px;
	color: #0c4a6e;
	line-height: 1.5;
}

/* ===== Days Checkboxes ===== */
.wbag-days-checkboxes {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
}

.wbag-days-checkboxes label {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 6px 12px;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 6px;
	cursor: pointer;
	font-size: 13px;
	font-weight: 400 !important;
	color: #475569;
	transition: all 0.15s ease;
}

.wbag-days-checkboxes label:hover {
	background: #f1f5f9;
	border-color: #cbd5e1;
}

/* ===== Responsive ===== */
@media screen and (max-width: 782px) {
	.wbag-admin-container {
		margin: 10px 0 30px;
	}

	.wbag-header {
		padding: 20px;
		border-radius: 12px;
	}

	.wbag-header-top {
		flex-direction: column;
		align-items: flex-start;
	}

	.wbag-header-donate {
		align-items: flex-start;
		width: 100%;
		margin-top: 14px;
		padding-top: 14px;
		border-top: 1px solid rgba(255, 255, 255, 0.08);
	}

	.wbag-donate-text {
		text-align: left;
		max-width: none;
	}

	.wbag-header-title-row h1 {
		font-size: 20px;
	}

	.wbag-tabs-nav {
		gap: 2px;
		padding: 3px;
	}

	.wbag-tab-button {
		padding: 8px 12px;
		font-size: 12px;
	}

	.wbag-tab-button .dashicons {
		display: none;
	}

	.wbag-actions-grid {
		grid-template-columns: 1fr;
	}

	.wbag-card {
		padding: 18px;
		border-radius: 10px;
	}

	.wbag-queue-item {
		flex-direction: column;
		gap: 10px;
	}

	.wbag-queue-actions {
		width: 100%;
	}
}

@media screen and (max-width: 600px) {
	.wbag-tabs-nav {
		flex-direction: column;
	}

	.wbag-tab-button {
		width: 100%;
		justify-content: center;
	}
}

/* ==========================================================================
   Progress widget (blog writer / custom topic)
   ========================================================================== */

.wbag-progress-card {
	position: relative;
	margin-top: 14px;
	padding: 22px 24px 20px;
	border-radius: 14px;
	background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
	border: 1px solid #e2e8f0;
	box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
	overflow: hidden;
}

.wbag-progress-card::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
}

.wbag-progress-header {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 16px;
}

.wbag-progress-spinner {
	flex-shrink: 0;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	border: 3px solid #e0e7ff;
	border-top-color: #6366f1;
	animation: wbag-spin 0.9s linear infinite;
}

@keyframes wbag-spin {
	to { transform: rotate(360deg); }
}

.wbag-progress-titles {
	flex: 1;
	min-width: 0;
}

.wbag-progress-title {
	font-size: 15px;
	font-weight: 600;
	color: #0f172a;
	margin-bottom: 4px;
	line-height: 1.3;
}

.wbag-progress-stage {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	color: #475569;
	line-height: 1.4;
}

.wbag-progress-stage .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
	color: #6366f1;
}

.wbag-progress-elapsed {
	flex-shrink: 0;
	font-variant-numeric: tabular-nums;
	font-size: 13px;
	font-weight: 600;
	color: #64748b;
	background: #f1f5f9;
	padding: 4px 10px;
	border-radius: 999px;
}

.wbag-progress-track {
	position: relative;
	height: 10px;
	background: #eef2ff;
	border-radius: 999px;
	overflow: hidden;
	margin-bottom: 10px;
}

.wbag-progress-fill {
	height: 100%;
	width: 0%;
	border-radius: 999px;
	background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
	background-size: 200% 100%;
	animation: wbag-progress-shimmer 2s linear infinite;
	transition: width 0.3s ease-out;
	box-shadow: 0 0 12px rgba(139, 92, 246, 0.4);
}

@keyframes wbag-progress-shimmer {
	0%   { background-position: 0% 0; }
	100% { background-position: 200% 0; }
}

.wbag-progress-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 12px;
	color: #64748b;
}

.wbag-progress-hint {
	font-style: italic;
}

.wbag-progress-percent {
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	color: #6366f1;
}

.wbag-progress-info {
	margin-top: 14px;
	padding: 10px 14px;
	background: #eff6ff;
	border-left: 3px solid #3b82f6;
	border-radius: 6px;
	font-size: 12px;
	color: #1e40af;
	display: flex;
	align-items: center;
	gap: 8px;
}

.wbag-progress-info .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
}

/* Done state */
.wbag-progress-card.wbag-progress-done .wbag-progress-spinner {
	border-color: #bbf7d0;
	border-top-color: #16a34a;
	animation: none;
}

.wbag-progress-card.wbag-progress-done::before {
	background: linear-gradient(90deg, #16a34a 0%, #22c55e 100%);
}

.wbag-progress-card.wbag-progress-done .wbag-progress-fill {
	background: linear-gradient(90deg, #16a34a 0%, #22c55e 100%);
	animation: none;
}

.wbag-progress-card.wbag-progress-done .wbag-progress-stage .dashicons,
.wbag-progress-card.wbag-progress-done .wbag-progress-percent {
	color: #16a34a;
}

/* Failed state */
.wbag-progress-card.wbag-progress-failed .wbag-progress-spinner {
	border-color: #fecaca;
	border-top-color: #dc2626;
	animation: none;
}

.wbag-progress-card.wbag-progress-failed::before {
	background: linear-gradient(90deg, #dc2626 0%, #ef4444 100%);
}

.wbag-progress-card.wbag-progress-failed .wbag-progress-fill {
	background: linear-gradient(90deg, #dc2626 0%, #ef4444 100%);
	animation: none;
}

.wbag-progress-card.wbag-progress-failed .wbag-progress-stage .dashicons,
.wbag-progress-card.wbag-progress-failed .wbag-progress-percent {
	color: #dc2626;
}

@media screen and (max-width: 600px) {
	.wbag-progress-card {
		padding: 18px 18px 16px;
	}

	.wbag-progress-header {
		flex-wrap: wrap;
	}

	.wbag-progress-elapsed {
		order: 3;
		width: 100%;
		text-align: center;
		margin-top: 6px;
	}
}

/* ========================================
   Preview & Revise Modal (v1.3.14)
   ======================================== */
.wbag-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
}
.wbag-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.75);
	backdrop-filter: blur(4px);
}
.wbag-modal-dialog {
	position: relative;
	width: 92%;
	max-width: 960px;
	max-height: 92vh;
	background: #1f2329;
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 14px;
	box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	color: #e7e9ee;
}
.wbag-modal-header {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 18px 22px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	background: linear-gradient(180deg, rgba(255, 107, 53, 0.08), transparent);
}
.wbag-modal-header h2 {
	margin: 0;
	font-size: 18px;
	font-weight: 600;
	color: #fff;
	flex: 1;
}
.wbag-modal-header-meta {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 12px;
	color: rgba(255, 255, 255, 0.6);
}
.wbag-modal-wordcount::before {
	content: "📄 ";
}
.wbag-modal-revision-badge {
	padding: 3px 8px;
	border-radius: 10px;
	background: rgba(255, 107, 53, 0.2);
	color: #FF6B35;
	font-weight: 600;
}
.wbag-modal-close {
	background: transparent;
	border: none;
	color: #fff;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	padding: 0 6px;
	opacity: 0.6;
	transition: opacity 0.15s;
}
.wbag-modal-close:hover {
	opacity: 1;
}
.wbag-modal-body {
	flex: 1;
	overflow-y: auto;
	padding: 22px 26px;
	background: #fff;
	color: #222;
}
.wbag-modal-preview-wrapper {
	max-width: 720px;
	margin: 0 auto;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	line-height: 1.7;
}
.wbag-modal-preview-title {
	font-size: 32px;
	font-weight: 700;
	color: #111;
	margin: 0 0 20px;
	line-height: 1.2;
}
.wbag-modal-preview-featured img {
	width: 100%;
	height: auto;
	border-radius: 8px;
	margin-bottom: 24px;
}
.wbag-modal-preview-content {
	font-size: 16px;
	color: #333;
}
.wbag-modal-preview-content h2 {
	font-size: 24px;
	margin-top: 32px;
}
.wbag-modal-preview-content h3 {
	font-size: 19px;
	margin-top: 24px;
}
.wbag-modal-preview-content img {
	max-width: 100%;
	height: auto;
	border-radius: 6px;
}
.wbag-modal-preview-content a {
	color: #FF6B35;
}
.wbag-modal-footer {
	padding: 16px 22px 20px;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	background: #1a1d23;
}
.wbag-modal-revise-box label strong {
	color: #fff;
	font-size: 14px;
}
.wbag-modal-revise-box .description {
	color: rgba(255, 255, 255, 0.55);
	font-size: 12px;
}
#wbag-modal-revise-input {
	width: 100%;
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.15);
	color: #fff;
	border-radius: 8px;
	padding: 10px 12px;
	font-size: 13px;
	resize: vertical;
}
#wbag-modal-revise-input:focus {
	border-color: #FF6B35;
	outline: none;
	box-shadow: 0 0 0 2px rgba(255, 107, 53, 0.2);
}
.wbag-modal-revise-actions {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 12px;
	flex-wrap: wrap;
}
.wbag-modal-revise-status {
	flex: 1;
	font-size: 12px;
	color: rgba(255, 255, 255, 0.7);
}
.wbag-modal-revise-buttons {
	display: flex;
	gap: 8px;
	margin-left: auto;
}
.wbag-modal-spinner.is-active {
	visibility: visible;
}
@media (max-width: 782px) {
	.wbag-modal-dialog { width: 96%; max-height: 96vh; }
	.wbag-modal-preview-title { font-size: 24px; }
	.wbag-modal-revise-buttons { width: 100%; margin-left: 0; }
	.wbag-modal-revise-buttons .button { flex: 1; text-align: center; }
}

/* =========================================================
   Freemius Pro-Badges & Upgrade Notices (v1.3.15)
   ========================================================= */
.wbag-pro-badge {
	display: inline-block;
	background: linear-gradient(135deg, #e94560, #ff6b81);
	color: #fff;
	font-size: 10px;
	font-weight: 800;
	letter-spacing: .06em;
	padding: 2px 8px;
	border-radius: 999px;
	vertical-align: middle;
	margin-left: 8px;
	text-transform: uppercase;
}

/* Competitor-inspired badge on queue items */
.wbag-competitor-badge {
	display: inline-block;
	background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(59, 130, 246, 0.05));
	color: #3b82f6;
	font-size: 11px;
	font-weight: 600;
	padding: 2px 10px;
	border-radius: 999px;
	border: 1px solid rgba(59, 130, 246, 0.25);
	margin-left: 8px;
	vertical-align: middle;
	white-space: nowrap;
	cursor: help;
}
.wbag-competitor-badge .dashicons {
	font-size: 13px;
	width: 13px;
	height: 13px;
	vertical-align: -1px;
	margin-right: 3px;
}

.wbag-content-type-badge {
	display: inline-block;
	background: linear-gradient(135deg, rgba(124, 58, 237, 0.1), rgba(124, 58, 237, 0.05));
	color: #7c3aed;
	font-size: 11px;
	font-weight: 600;
	padding: 2px 10px;
	border-radius: 999px;
	border: 1px solid rgba(124, 58, 237, 0.25);
	margin-left: 8px;
	vertical-align: middle;
	white-space: nowrap;
	cursor: help;
}
.wbag-content-type-badge .dashicons {
	font-size: 13px;
	width: 13px;
	height: 13px;
	vertical-align: -1px;
	margin-right: 3px;
}

/* RSS Feed predefined chips */
.wbag-rss-predefined-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.wbag-rss-feed-chip {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 8px 14px;
	background: #f0f0f1;
	border: 2px solid #dcdcde;
	border-radius: 8px;
	cursor: pointer;
	font-size: 13px;
	font-weight: 500;
	transition: all .2s;
	user-select: none;
}
.wbag-rss-feed-chip:hover {
	border-color: #2271b1;
	background: #f0f6fc;
}
.wbag-rss-feed-chip.wbag-rss-active {
	border-color: #2271b1;
	background: linear-gradient(135deg, rgba(34, 113, 177, 0.08), rgba(34, 113, 177, 0.03));
	color: #2271b1;
	font-weight: 600;
}
.wbag-rss-feed-chip .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
}

/* Diagnostics collapsible */
.wbag-diagnostics-details[open] .wbag-diagnostics-arrow {
	transform: rotate(180deg);
}
.wbag-diagnostics-summary::-webkit-details-marker {
	display: none;
}
.wbag-diagnostics-summary::marker {
	content: '';
}
.wbag-diagnostics-summary:hover {
	background: #e5f0fa;
}

.wbag-upgrade-notice {
	background: #fff8e1;
	border-left: 4px solid #ffb300;
	padding: 12px 16px;
	border-radius: 0 8px 8px 0;
	margin-bottom: 18px;
	font-size: .93rem;
	color: #555;
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.wbag-upgrade-notice .dashicons {
	color: #e94560;
	font-size: 18px;
	flex-shrink: 0;
}

.wbag-upgrade-notice a {
	color: #e94560;
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
}

.wbag-upgrade-notice a:hover {
	color: #0f3460;
}

.wbag-upgrade-inline {
    margin: 6px 0 0 !important;
    font-size: 12px;
    font-weight: 600;
}
.wbag-upgrade-inline a {
    color: #e94560;
    text-decoration: none;
}
.wbag-upgrade-inline a:hover {
    color: #0f3460;
    text-decoration: underline;
}
.wbag-action-btn:disabled,
.wbag-modal-revise-submit:disabled {
    opacity: .5;
    cursor: not-allowed !important;
}

/* =========================================================
   Queue Item Notes (v1.3.40)
   ========================================================= */
.wbag-queue-notes {
    width: 100%;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}

.wbag-notes-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.5;
    background: #f8fafc;
    resize: vertical;
    transition: border-color 0.2s ease;
    font-family: inherit;
}

.wbag-notes-textarea:focus {
    border-color: #3b82f6;
    outline: none;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
    background: #fff;
}

.wbag-notes-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.wbag-notes-actions .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    vertical-align: text-bottom;
}

.wbag-notes-status {
    font-size: 12px;
    font-weight: 500;
}

.wbag-toggle-notes {
    display: inline-flex !important;
    align-items: center;
    gap: 4px;
}

.wbag-toggle-notes .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

.wbag-toggle-notes.wbag-has-notes {
    color: #2563eb !important;
    border-color: #93c5fd !important;
    background: #eff6ff !important;
}

/* =========================================================
   Info-Tooltips (v1.3.33)
   ========================================================= */
.wbag-info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    font-style: normal;
    cursor: help;
    position: relative;
    margin-left: 6px;
    vertical-align: middle;
    transition: background 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
    line-height: 1;
}

.wbag-info-icon:hover {
    background: #3b82f6;
    color: #fff;
}

.wbag-info-icon .wbag-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: #f1f5f9;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
    padding: 10px 14px;
    border-radius: 8px;
    min-width: 260px;
    max-width: 380px;
    width: max-content;
    white-space: normal;
    word-wrap: break-word;
    z-index: 9999;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    pointer-events: none;
    text-align: left;
}

.wbag-info-icon .wbag-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #1e293b;
}

.wbag-info-icon:hover .wbag-tooltip {
    display: block;
}

/* Tooltip left-aligned for elements near right edge */
.wbag-info-icon--left .wbag-tooltip {
    left: 0;
    transform: none;
}

.wbag-info-icon--left .wbag-tooltip::after {
    left: 8px;
    transform: none;
}

/* =========================================================
   Inline Topic Count Selector (v1.3.33)
   ========================================================= */
.wbag-scout-options {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e2e8f0;
}

.wbag-scout-options label {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
    white-space: nowrap;
    margin: 0;
}

.wbag-scout-options input[type="number"] {
    width: 56px;
    padding: 4px 6px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 13px;
    text-align: center;
    background: #f8fafc;
    transition: border-color 0.2s ease;
}

.wbag-scout-options input[type="number"]:focus {
    border-color: #3b82f6;
    outline: none;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

/* ===== Affiliate Links Tab ===== */
.wbag-affiliate-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 16px;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.wbag-affiliate-row:hover {
    border-color: rgba(255, 107, 53, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.wbag-affiliate-fields {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.wbag-affiliate-field {
    flex: 1;
    min-width: 200px;
}

.wbag-affiliate-field-wide {
    flex-basis: 100%;
}

.wbag-affiliate-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wbag-affiliate-field input {
    width: 100% !important;
}

.wbag-remove-affiliate {
    flex-shrink: 0;
    margin-top: 22px;
    color: #ef4444 !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
    background: rgba(239, 68, 68, 0.05) !important;
}

.wbag-remove-affiliate:hover {
    background: rgba(239, 68, 68, 0.15) !important;
    border-color: #ef4444 !important;
}

.wbag-remove-affiliate .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 1;
}

#wbag-add-affiliate .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

#wbag-affiliate-list:empty::after {
    content: 'Noch keine Affiliate-Partner hinzugefügt. Klicken Sie auf den Button unten, um zu beginnen.';
    display: block;
    padding: 24px;
    text-align: center;
    color: #64748b;
    font-style: italic;
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

/* ===== Topic Images (Queue Item) ===== */
.wbag-topic-images {
    width: 100%;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.wbag-images-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.wbag-images-label .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

.wbag-image-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.wbag-image-thumb {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: border-color 0.2s;
}

.wbag-image-thumb:hover {
    border-color: rgba(255, 107, 53, 0.5);
}

.wbag-image-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wbag-image-thumb .wbag-remove-image {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.9);
    color: #fff;
    border: none;
    font-size: 14px;
    line-height: 18px;
    text-align: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
    padding: 0;
}

.wbag-image-thumb:hover .wbag-remove-image {
    opacity: 1;
}

.wbag-add-topic-image .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    vertical-align: middle;
    margin-right: 2px;
}
