/* ── PR Bridge Metabox ────────────────────────────────────────────────────── */

.twt-aeo-pr-metabox {
	font-size: 13px;
	color: #374151;
}

.twt-aeo-pr-detected,
.twt-aeo-pr-undetected {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	padding: 10px 12px;
	border-radius: 6px;
	margin-bottom: 14px;
	font-size: 12px;
}

.twt-aeo-pr-detected {
	background: #eff6ff;
	border: 1px solid #bfdbfe;
	color: #1e40af;
}

.twt-aeo-pr-detected .dashicons,
.twt-aeo-pr-undetected .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
	flex-shrink: 0;
	margin-top: 1px;
}

.twt-aeo-pr-undetected {
	background: #f9fafb;
	border: 1px solid #e5e7eb;
	color: #6b7280;
}

.twt-aeo-pr-method {
	display: block;
	font-weight: 500;
	font-size: 11px;
	opacity: .75;
	text-transform: capitalize;
}

.twt-aeo-pr-section {
	margin-bottom: 14px;
	padding-bottom: 14px;
	border-bottom: 1px solid rgba(0,0,0,.07);
}

.twt-aeo-pr-section:last-child {
	border-bottom: none;
	margin-bottom: 0;
	padding-bottom: 0;
}

.twt-aeo-pr-section__title {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: #6b7280;
	margin-bottom: 8px;
}

.twt-aeo-pr-saved {
	display: flex;
	align-items: center;
	gap: 6px;
	color: #16a34a;
	font-size: 12px;
	font-weight: 600;
	margin-bottom: 8px;
}

.twt-aeo-pr-saved .dashicons {
	font-size: 15px;
	width: 15px;
	height: 15px;
}

.twt-aeo-pr-actions {
	display: flex;
	gap: 6px;
}

.twt-aeo-pr-danger {
	color: #dc2626 !important;
	border-color: #fca5a5 !important;
}

.twt-aeo-pr-danger:hover {
	background: #fef2f2 !important;
}

.twt-aeo-pr-transform-btn {
	width: 100%;
	text-align: center;
	display: flex !important;
	align-items: center;
	justify-content: center;
	gap: 5px;
}

.twt-aeo-pr-transform-btn .dashicons {
	font-size: 14px;
	width: 14px;
	height: 14px;
}

.twt-aeo-pr-notice-small {
	font-size: 12px;
	color: #6b7280;
	margin: 0;
}

.twt-aeo-pr-setup-notice {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	background: #fefce8;
	border: 1px solid #fde68a;
	border-radius: 6px;
	padding: 10px 12px;
	font-size: 12px;
}

.twt-aeo-pr-setup-notice .dashicons {
	color: #d97706;
	font-size: 16px;
	width: 16px;
	height: 16px;
	flex-shrink: 0;
	margin-top: 1px;
}

.twt-aeo-pr-setup-notice > div {
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.twt-aeo-pr-setup-notice strong {
	color: #92400e;
	font-size: 12px;
}

.twt-aeo-pr-setup-notice span {
	color: #78350f;
	line-height: 1.4;
}

.twt-aeo-pr-setup-link {
	font-weight: 600;
	color: #d97706;
	text-decoration: none;
	margin-top: 2px;
}

.twt-aeo-pr-setup-link:hover {
	color: #92400e;
	text-decoration: underline;
}

.twt-aeo-pr-select {
	width: 100%;
	margin-bottom: 8px;
	font-size: 12px;
}

.twt-aeo-pr-status {
	margin-top: 8px;
	font-size: 12px;
	padding: 6px 10px;
	border-radius: 4px;
}

.twt-aeo-pr-status--ok {
	background: #f0fdf4;
	color: #15803d;
	border: 1px solid #bbf7d0;
}

.twt-aeo-pr-status--err {
	background: #fef2f2;
	color: #dc2626;
	border: 1px solid #fecaca;
}

/* History list */

.twt-aeo-pr-history {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.twt-aeo-pr-history__item {
	font-size: 12px;
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 6px 8px;
	border-radius: 5px;
	border-left: 3px solid transparent;
}

.twt-aeo-pr-history__item--ok {
	background: #f0fdf4;
	border-left-color: #16a34a;
}

.twt-aeo-pr-history__item--err {
	background: #fef2f2;
	border-left-color: #dc2626;
}

.twt-aeo-pr-history__err {
	color: #dc2626;
	font-size: 11px;
}

/* ── Admin Notice ─────────────────────────────────────────────────────────── */

.twt-aeo-pr-notice strong {
	margin-right: 4px;
}

/* ── Modal ────────────────────────────────────────────────────────────────── */

body.twt-aeo-modal-open {
	overflow: hidden;
}

.twt-aeo-pr-modal {
	position: fixed;
	inset: 0;
	z-index: 100100;
	display: flex;
	align-items: center;
	justify-content: center;
}

.twt-aeo-pr-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .55);
}

.twt-aeo-pr-modal__box {
	position: relative;
	z-index: 1;
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 20px 60px rgba(0,0,0,.25);
	width: 92vw;
	max-width: 1100px;
	max-height: 90vh;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.twt-aeo-pr-modal__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 24px;
	border-bottom: 1px solid #e5e7eb;
	background: #f9fafb;
	flex-shrink: 0;
}

.twt-aeo-pr-modal__title {
	margin: 0;
	font-size: 15px;
	font-weight: 700;
	color: #111827;
	display: flex;
	align-items: center;
	gap: 8px;
}

.twt-aeo-pr-modal__title .dashicons {
	color: #2563eb;
}

.twt-aeo-pr-modal__close {
	background: none;
	border: none;
	cursor: pointer;
	padding: 4px;
	color: #6b7280;
	display: flex;
	align-items: center;
}

.twt-aeo-pr-modal__close:hover {
	color: #111827;
}

.twt-aeo-pr-modal__body {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0;
	flex: 1;
	overflow: hidden;
	min-height: 0;
}

.twt-aeo-pr-modal__col {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border-right: 1px solid #e5e7eb;
}

.twt-aeo-pr-modal__col:last-child {
	border-right: none;
}

.twt-aeo-pr-modal__col-head {
	padding: 10px 16px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: #6b7280;
	background: #f9fafb;
	border-bottom: 1px solid #e5e7eb;
	display: flex;
	align-items: center;
	gap: 6px;
	flex-shrink: 0;
}

.twt-aeo-pr-modal__hint {
	font-weight: 400;
	font-style: italic;
	text-transform: none;
	letter-spacing: 0;
}

.twt-aeo-pr-modal__textarea {
	flex: 1;
	width: 100%;
	box-sizing: border-box;
	resize: none;
	border: none;
	border-radius: 0;
	font-size: 13px;
	line-height: 1.65;
	font-family: 'SFMono-Regular', 'Consolas', 'Monaco', monospace;
	color: #111827;
	padding: 16px;
	background: #fff;
	min-height: 0;
}

.twt-aeo-pr-modal__textarea:focus {
	outline: none;
	background: #fffbf0;
}

.twt-aeo-pr-modal__spinner {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 32px 16px;
	color: #6b7280;
	font-size: 13px;
}

.twt-aeo-pr-modal__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 24px;
	border-top: 1px solid #e5e7eb;
	background: #f9fafb;
	flex-shrink: 0;
	gap: 12px;
}

.twt-aeo-pr-modal__footer-right {
	display: flex;
	gap: 8px;
}

.twt-aeo-pr-modal__save-status {
	font-size: 13px;
}

.twt-aeo-pr-modal__save-status--ok {
	color: #16a34a;
	font-weight: 600;
}

.twt-aeo-pr-modal__save-status--error {
	color: #dc2626;
}

/* ── Media Report table ───────────────────────────────────────────────────── */

.twt-aeo-pr-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}

.twt-aeo-pr-table th {
	text-align: left;
	padding: 10px 16px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: #6b7280;
	border-bottom: 1px solid #e5e7eb;
	background: #f9fafb;
}

.twt-aeo-pr-table td {
	padding: 12px 16px;
	border-bottom: 1px solid #f3f4f6;
	vertical-align: top;
	color: #374151;
}

.twt-aeo-pr-table tr:last-child td {
	border-bottom: none;
}

.twt-aeo-pr-table tr:hover td {
	background: #f9fafb;
}

.twt-aeo-pr-table__type {
	display: block;
	font-size: 11px;
	color: #9ca3af;
	text-transform: capitalize;
}

.twt-aeo-pr-badge {
	display: inline-flex;
	align-items: center;
	padding: 2px 8px;
	border-radius: 20px;
	font-size: 11px;
	font-weight: 600;
}

.twt-aeo-pr-badge--ok {
	background: #f0fdf4;
	color: #15803d;
	border: 1px solid #bbf7d0;
}

.twt-aeo-pr-badge--err {
	background: #fef2f2;
	color: #dc2626;
	border: 1px solid #fecaca;
	cursor: help;
}

.twt-aeo-pr-report-meta {
	margin-top: 12px;
	font-size: 12px;
	color: #9ca3af;
}

/* ── Setup notice (admin page) ────────────────────────────────────────────── */

.twt-aeo-pr-page-setup {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	background: #fefce8;
	border: 1px solid #fde68a;
	border-radius: 8px;
	padding: 18px 20px;
	margin-bottom: 24px;
}

.twt-aeo-pr-page-setup__icon {
	font-size: 24px;
	width: 24px;
	height: 24px;
	color: #d97706;
	flex-shrink: 0;
	margin-top: 2px;
}

.twt-aeo-pr-page-setup__body {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.twt-aeo-pr-page-setup__body strong {
	font-size: 14px;
	color: #92400e;
}

.twt-aeo-pr-page-setup__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.twt-aeo-pr-page-setup__list li {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	color: #78350f;
}

.twt-aeo-pr-page-setup__check {
	color: #16a34a;
	font-size: 16px;
	width: 16px;
	height: 16px;
	flex-shrink: 0;
}

.twt-aeo-pr-page-setup__x {
	color: #dc2626;
	font-size: 16px;
	width: 16px;
	height: 16px;
	flex-shrink: 0;
}

.twt-aeo-pr-page-setup__btn {
	align-self: flex-start;
}

/* ── Empty state ──────────────────────────────────────────────────────────── */

.twt-aeo-pr-empty {
	text-align: center;
	padding: 48px 24px;
	color: #6b7280;
}

.twt-aeo-pr-empty__icon {
	font-size: 48px;
	width: 48px;
	height: 48px;
	color: #d1d5db;
	display: block;
	margin: 0 auto 16px;
}

.twt-aeo-pr-empty__hint {
	font-size: 12px;
	color: #9ca3af;
	margin-top: 4px;
}

/* Metabox transform spinner. */
.twt-aeo-pr-spinner {
	display: inline-block;
	width: 16px;
	height: 16px;
	border: 2px solid #e5e7eb;
	border-top-color: #2563eb;
	border-radius: 50%;
	animation: twt-aeo-pr-spin .7s linear infinite;
	flex-shrink: 0;
}

@keyframes twt-aeo-pr-spin {
	to { transform: rotate(360deg); }
}
