/* PressGo Admin Styles */

/* ─── Layout ─── */

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

.pressgo-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 24px;
}

.pressgo-header h1 {
	font-size: 28px;
	font-weight: 700;
	color: #1d2327;
	margin: 0;
}

.pressgo-subtitle {
	font-weight: 400;
	color: #646970;
	font-size: 18px;
	margin-left: 4px;
}

.pressgo-model-badge {
	display: inline-block;
	padding: 4px 12px;
	background: #f0f0f1;
	border: 1px solid #c3c4c7;
	border-radius: 12px;
	font-size: 12px;
	color: #646970;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ─── Mode Tabs ─── */

.pressgo-mode-tabs {
	display: flex;
	gap: 0;
	margin-bottom: -1px;
	position: relative;
	z-index: 1;
}

.pressgo-mode-tab {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 10px 20px;
	border: 1px solid #c3c4c7;
	border-bottom: 1px solid #c3c4c7;
	border-radius: 6px 6px 0 0;
	background: #f6f7f7;
	font-size: 14px;
	font-weight: 500;
	color: #646970;
	cursor: pointer;
	transition: all 0.15s;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.pressgo-mode-tab:hover {
	background: #f0f0f1;
	color: #1d2327;
}

.pressgo-mode-tab.active {
	background: #fff;
	border-bottom-color: #fff;
	color: #1d2327;
	font-weight: 600;
}

.pressgo-mode-tab .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
}

/* ─── Input Panel ─── */

.pressgo-input-panel {
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 8px;
	padding: 24px;
	margin-bottom: 24px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.pressgo-input-row {
	margin-bottom: 16px;
}

#pressgo-prompt {
	width: 100%;
	min-height: 100px;
	padding: 12px 16px;
	font-size: 15px;
	line-height: 1.6;
	border: 1px solid #c3c4c7;
	border-radius: 6px;
	resize: vertical;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
	transition: border-color 0.2s, box-shadow 0.2s;
}

#pressgo-prompt:focus {
	border-color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1;
	outline: none;
}

.pressgo-controls-row {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
}

.pressgo-control-group {
	display: flex;
	align-items: center;
	gap: 8px;
}

.pressgo-control-right {
	margin-left: auto;
}

.pressgo-upload-btn {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 6px 14px;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	background: #f6f7f7;
	cursor: pointer;
	font-size: 13px;
	color: #50575e;
	transition: all 0.15s;
}

.pressgo-upload-btn:hover {
	background: #f0f0f1;
	border-color: #8c8f94;
	color: #1d2327;
}

.pressgo-image-name {
	font-size: 13px;
	color: #646970;
	max-width: 200px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.pressgo-image-clear {
	background: none;
	border: none;
	color: #d63638;
	cursor: pointer;
	font-size: 18px;
	padding: 2px 6px;
	line-height: 1;
}

#pressgo-page-title {
	padding: 6px 12px;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	font-size: 14px;
	width: 280px;
}

/* ─── Import Mode Fields ─── */

#pressgo-import-url {
	width: 100%;
	padding: 12px 16px;
	font-size: 15px;
	line-height: 1.6;
	border: 1px solid #c3c4c7;
	border-radius: 6px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
	transition: border-color 0.2s, box-shadow 0.2s;
}

#pressgo-import-url:focus {
	border-color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1;
	outline: none;
}

.pressgo-consent-label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: #50575e;
	cursor: pointer;
	user-select: none;
}

.pressgo-consent-label input[type="checkbox"] {
	margin: 0;
}

#pressgo-import-page-title {
	padding: 6px 12px;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	font-size: 14px;
	width: 280px;
}

#pressgo-import-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 15px;
	padding: 8px 24px;
}

#pressgo-import-btn .dashicons {
	font-size: 20px;
	width: 20px;
	height: 20px;
}

#pressgo-import-btn:disabled {
	opacity: 0.7;
	cursor: not-allowed;
}

.pressgo-shortcut-hint {
	font-size: 11px;
	color: #a7aaad;
	background: #f6f7f7;
	border: 1px solid #dcdcde;
	border-radius: 3px;
	padding: 2px 8px;
	font-family: -apple-system, monospace;
}

#pressgo-generate-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 15px;
	padding: 8px 24px;
}

#pressgo-generate-btn .dashicons {
	font-size: 20px;
	width: 20px;
	height: 20px;
}

#pressgo-generate-btn:disabled {
	opacity: 0.7;
	cursor: not-allowed;
}

/* ─── Empty State ─── */

.pressgo-empty-state {
	margin-top: 0;
}

.pressgo-empty-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
	margin-bottom: 32px;
}

@media (max-width: 960px) {
	.pressgo-empty-grid {
		grid-template-columns: 1fr;
	}
}

.pressgo-empty-card {
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	padding: 28px 24px;
	text-align: center;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.pressgo-empty-card:hover {
	border-color: #2271b1;
	box-shadow: 0 2px 8px rgba(34, 113, 177, 0.08);
}

.pressgo-empty-card-icon {
	margin-bottom: 12px;
}

.pressgo-empty-card-icon .dashicons {
	font-size: 32px;
	width: 32px;
	height: 32px;
	color: #2271b1;
}

.pressgo-empty-card h4 {
	margin: 0 0 8px;
	font-size: 15px;
	font-weight: 600;
	color: #1d2327;
}

.pressgo-empty-card p {
	margin: 0;
	font-size: 13px;
	line-height: 1.5;
	color: #646970;
}

/* ─── Example Prompts ─── */

.pressgo-examples {
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	padding: 20px 24px;
}

.pressgo-examples-label {
	margin: 0 0 12px;
	font-size: 13px;
	font-weight: 600;
	color: #646970;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.pressgo-example-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.pressgo-example-chip {
	display: inline-block;
	padding: 8px 16px;
	background: #f0f6fc;
	border: 1px solid #c5d9ed;
	border-radius: 20px;
	font-size: 13px;
	color: #2271b1;
	cursor: pointer;
	transition: all 0.15s;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.pressgo-example-chip:hover {
	background: #2271b1;
	border-color: #2271b1;
	color: #fff;
}

.pressgo-example-chip:active {
	transform: scale(0.97);
}

/* ─── Workspace (split panel) ─── */

.pressgo-workspace {
	border: 1px solid #c3c4c7;
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.pressgo-split-panel {
	display: grid;
	grid-template-columns: 350px 1fr;
	min-height: 500px;
}

@media (max-width: 960px) {
	.pressgo-split-panel {
		grid-template-columns: 1fr;
	}
}

/* ─── Activity Panel (left) ─── */

.pressgo-activity-panel {
	border-right: 1px solid #e0e0e0;
	display: flex;
	flex-direction: column;
	background: #fafafa;
}

.pressgo-activity-panel h3 {
	padding: 16px 20px;
	margin: 0;
	border-bottom: 1px solid #e0e0e0;
	font-size: 14px;
	font-weight: 600;
	color: #1d2327;
	background: #fff;
}

.pressgo-activity-log {
	flex: 1;
	overflow-y: auto;
	padding: 16px;
	max-height: 480px;
}

.pressgo-activity-entry {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin-bottom: 10px;
	font-size: 13px;
	line-height: 1.5;
	animation: pressgo-fadein 0.3s ease;
}

.pressgo-activity-icon {
	flex-shrink: 0;
	width: 14px;
	text-align: center;
	margin-top: 2px;
}

.pressgo-activity-thinking .pressgo-activity-icon {
	color: #2271b1;
	animation: pressgo-pulse 1.5s ease-in-out infinite;
}

.pressgo-activity-progress .pressgo-activity-icon {
	color: #dba617;
}

.pressgo-activity-success .pressgo-activity-icon,
.pressgo-activity-done .pressgo-activity-icon {
	color: #00a32a;
}

.pressgo-activity-error .pressgo-activity-icon {
	color: #d63638;
}

.pressgo-activity-text {
	color: #50575e;
	word-break: break-word;
}

.pressgo-activity-done .pressgo-activity-text {
	font-weight: 600;
	color: #00a32a;
}

.pressgo-activity-error .pressgo-activity-text {
	color: #d63638;
}

/* ─── Preview Panel (right) ─── */

.pressgo-preview-panel {
	display: flex;
	flex-direction: column;
}

.pressgo-preview-panel h3 {
	padding: 16px 20px;
	margin: 0;
	border-bottom: 1px solid #e0e0e0;
	font-size: 14px;
	font-weight: 600;
	color: #1d2327;
}

.pressgo-section-preview {
	flex: 1;
	padding: 20px;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.pressgo-section-block {
	padding: 20px 24px;
	border-radius: 6px;
	border: 1px solid rgba(0, 0, 0, 0.06);
	transition: all 0.4s ease;
	position: relative;
	overflow: hidden;
}

.pressgo-section-block.building {
	opacity: 0.7;
	animation: pressgo-shimmer 2s ease-in-out infinite;
}

.pressgo-section-block.complete {
	opacity: 1;
}

.pressgo-section-label {
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.5px;
}

.pressgo-section-detail {
	font-size: 12px;
	margin-top: 4px;
}

/* ─── Result Actions ─── */

.pressgo-result-actions {
	display: flex;
	gap: 12px;
	padding: 20px;
	border-top: 1px solid #e0e0e0;
	background: #f9f9f9;
	flex-wrap: wrap;
	align-items: center;
}

.pressgo-result-note {
	width: 100%;
	margin: 0 0 4px;
	font-size: 13px;
	color: #666;
	font-style: italic;
}

.pressgo-result-actions .button {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.pressgo-result-actions .button .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
}

/* ─── Settings Page ─── */

.pressgo-settings-test {
	margin-top: 20px;
}

.pressgo-test-result {
	margin-left: 12px;
}

.pressgo-status-ok {
	color: #00a32a;
}

.pressgo-status-error {
	color: #d63638;
}

.pressgo-status-warn {
	color: #b26200;
}

.pressgo-settings-info {
	margin-top: 30px;
	padding: 20px 24px;
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 8px;
}

.pressgo-settings-info h3 {
	margin-top: 0;
	font-size: 15px;
}

.pressgo-settings-info ul {
	list-style: none;
	padding-left: 0;
	margin: 0;
}

.pressgo-settings-info li {
	margin-bottom: 8px;
	padding: 6px 0;
	border-bottom: 1px solid #f0f0f1;
	font-size: 13px;
}

.pressgo-settings-info li:last-child {
	border-bottom: none;
	margin-bottom: 0;
}

/* ─── Animations ─── */

@keyframes pressgo-fadein {
	from {
		opacity: 0;
		transform: translateY(4px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes pressgo-pulse {
	0%,
	100% {
		opacity: 1;
	}
	50% {
		opacity: 0.4;
	}
}

@keyframes pressgo-shimmer {
	0% {
		opacity: 0.5;
	}
	50% {
		opacity: 0.8;
	}
	100% {
		opacity: 0.5;
	}
}

.pressgo-shake {
	animation: pressgo-shake 0.4s ease;
}

@keyframes pressgo-shake {
	0%,
	100% {
		transform: translateX(0);
	}
	20%,
	60% {
		transform: translateX(-6px);
	}
	40%,
	80% {
		transform: translateX(6px);
	}
}

/* ─── Spinner ─── */

.pressgo-spinner {
	display: inline-block;
	width: 16px;
	height: 16px;
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-top-color: #fff;
	border-radius: 50%;
	animation: pressgo-spin 0.6s linear infinite;
}

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

/* ─── Pro tier styling ─── */
.pressgo-tier {
	display: inline-block;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.5px;
	padding: 3px 8px;
	border-radius: 4px;
	margin-left: 8px;
	vertical-align: middle;
}
.pressgo-tier--pro {
	background: linear-gradient(135deg, #f8bb18 0%, #f59e0b 100%);
	color: #1a1a2e;
}
.pressgo-tier--free {
	background: rgba(0, 0, 0, 0.06);
	color: #6b7280;
}
.pressgo-pro-promo {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	background: linear-gradient(135deg, #1a1a2e 0%, #2d2d4a 100%);
	color: #fff;
	border-color: #1a1a2e !important;
}
.pressgo-pro-promo-text { flex: 1; }
.pressgo-pro-promo-text strong { color: #f8bb18; }
.pressgo-pro-cta {
	background: linear-gradient(135deg, #f8bb18 0%, #f59e0b 100%) !important;
	color: #1a1a2e !important;
	border-color: transparent !important;
	font-weight: 700 !important;
	box-shadow: 0 2px 12px rgba(248, 187, 24, 0.35);
}
.pressgo-pro-cta:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 16px rgba(248, 187, 24, 0.5);
}
