/* ── WebPossum Admin Styles ──────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600;700&display=swap');



#webpossum-app {
	font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
	max-width: 960px;
	margin: 20px 0;
	color: #111;
	font-size: 14px;
	line-height: 1.5;
}

/* ── Header ──────────────────────────────────────────────────────────────── */
#webpossum-app .wp-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 24px;
	flex-wrap: wrap;
	gap: 16px;
}
#webpossum-app .wp-header-left { display: flex; align-items: center; gap: 14px; }
#webpossum-app .wp-logo        { font-size: 40px; line-height: 1; }
#webpossum-app .wp-title {
	font-size: 26px !important;
	font-weight: 700 !important;
	letter-spacing: -0.5px;
	color: #111 !important;
	margin: 0 0 2px !important;
	padding: 0 !important;
	border: none !important;
	line-height: 1.2 !important;
}
#webpossum-app .wp-subtitle { font-size: 13px; color: #666; margin: 0; }
#webpossum-app .wp-btn-pro {
	background: #111;
	color: #fff !important;
	padding: 10px 20px;
	border-radius: 40px;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none !important;
	transition: background 0.2s;
	display: inline-block;
}
#webpossum-app .wp-btn-pro:hover { background: #333; color: #fff !important; }

/* ── Last scan bar ───────────────────────────────────────────────────────── */
#webpossum-app .wp-last-scan {
	background: #f8f8f8;
	border: 1px solid #e5e5e5;
	border-radius: 12px;
	padding: 12px 18px;
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	margin-bottom: 20px;
	font-size: 13px;
}
#webpossum-app .wp-last-label    { color: #888; }
#webpossum-app .wp-score-badge   { padding: 3px 10px; border-radius: 40px; font-size: 12px; font-weight: 600; }
#webpossum-app .wp-score-badge.good { background: #f0fdf4; color: #005f23; }
#webpossum-app .wp-score-badge.warn { background: #fefce8; color: #ca8a04; }
#webpossum-app .wp-score-badge.bad  { background: #fef2f2; color: #dc2626; }
#webpossum-app .wp-violations-badge {
	background: #fef2f2; color: #dc2626;
	padding: 3px 10px; border-radius: 40px; font-size: 12px; font-weight: 600;
}
#webpossum-app .wp-date { color: #aaa; margin-left: auto; }

/* ── Scanner card ────────────────────────────────────────────────────────── */
#webpossum-app .wp-scanner-card {
	background: #fff;
	border: 1px solid #e5e5e5;
	border-radius: 20px;
	padding: 24px;
	margin-bottom: 24px;
	box-shadow: 0 4px 20px rgba(0,0,0,0.04);
}
#webpossum-app .wp-scanner-top {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 16px;
	margin-bottom: 20px;
	align-items: end;
}
@media (max-width: 700px) { #webpossum-app .wp-scanner-top { grid-template-columns: 1fr; } }
#webpossum-app .wp-field-group { display: flex; flex-direction: column; gap: 6px; }
#webpossum-app .wp-label {
	font-size: 11px; font-weight: 600;
	text-transform: uppercase; letter-spacing: 0.06em; color: #888;
}
#webpossum-app .wp-select {
	font-family: 'DM Sans', sans-serif;
	font-size: 14px;
	border: 1.5px solid #e5e5e5;
	border-radius: 40px;
	padding: 9px 16px;
	background: #f8f8f8;
	color: #111;
	outline: none;
	transition: border-color 0.15s;
	min-width: 0;
	width: 100%;
	-webkit-appearance: auto;
}
#webpossum-app .wp-select:focus { border-color: #111; background: #fff; }
#webpossum-app .wp-select-sm    { min-width: 280px; }

#webpossum-app .wp-btn-scan {
	width: 100%; padding: 14px;
	background: #111; color: #fff;
	border: none; border-radius: 40px;
	font-family: 'DM Sans', sans-serif;
	font-size: 16px; font-weight: 600;
	cursor: pointer;
	display: flex; align-items: center; justify-content: center; gap: 8px;
	transition: background 0.15s, transform 0.1s;
}
#webpossum-app .wp-btn-scan:hover    { background: #333; }
#webpossum-app .wp-btn-scan:active   { transform: scale(0.98); }
#webpossum-app .wp-btn-scan:disabled { background: #ccc; cursor: not-allowed; }
#webpossum-app .wp-btn-icon          { font-size: 18px; }

/* ── Loading ─────────────────────────────────────────────────────────────── */
#webpossum-app .wp-loading {
	text-align: center; padding: 48px;
	background: #fff; border: 1px solid #e5e5e5; border-radius: 20px;
	margin-bottom: 24px;
}
#webpossum-app .wp-spinner {
	width: 36px; height: 36px;
	border: 3px solid #e5e5e5; border-top-color: #111;
	border-radius: 50%;
	margin: 0 auto 20px;
	animation: webpossum-spin 0.8s linear infinite;
}
@keyframes webpossum-spin { to { transform: rotate(360deg); } }
#webpossum-app .wp-loading-text { font-size: 16px; font-weight: 500; margin-bottom: 6px; }
#webpossum-app .wp-loading-sub  { font-size: 13px; color: #888; }

/* ── Error ───────────────────────────────────────────────────────────────── */
#webpossum-app .wp-error {
	background: #fef2f2; border: 1px solid #fecaca;
	border-radius: 12px; padding: 16px 20px;
	color: #dc2626; font-size: 14px; margin-bottom: 16px;
}

/* ── Results header ──────────────────────────────────────────────────────── */
#webpossum-app .wp-results-header {
	background: #fff; border: 1px solid #e5e5e5; border-radius: 20px;
	padding: 24px;
	display: flex; align-items: center; justify-content: space-between;
	gap: 20px; margin-bottom: 16px; flex-wrap: wrap;
}
#webpossum-app .wp-results-meta { flex: 1; }
#webpossum-app .wp-result-url  { font-size: 13px; color: #888; font-family: monospace; margin-bottom: 4px; word-break: break-all; }
#webpossum-app .wp-result-time { font-size: 12px; color: #bbb; }

#webpossum-app .wp-score-wrap  { position: relative; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
#webpossum-app .wp-score-ring  { width: 100px; height: 100px; }
#webpossum-app .wp-score-inner { position: absolute; text-align: center; }
#webpossum-app .wp-score-num   { font-size: 28px; font-weight: 700; line-height: 1; letter-spacing: -1px; }
#webpossum-app .wp-score-label { font-size: 10px; color: #aaa; text-transform: uppercase; letter-spacing: 0.05em; }

/* ── Stats grid ──────────────────────────────────────────────────────────── */
#webpossum-app .wp-stats-grid {
	display: grid; grid-template-columns: repeat(4, 1fr);
	gap: 12px; margin-bottom: 16px;
}
@media (max-width: 600px) { #webpossum-app .wp-stats-grid { grid-template-columns: repeat(2, 1fr); } }
#webpossum-app .wp-stat { background: #f8f8f8; border: 1px solid #e5e5e5; border-radius: 16px; padding: 16px; }
#webpossum-app .wp-stat-num { font-size: 36px; font-weight: 700; line-height: 1; letter-spacing: -1px; }
#webpossum-app .wp-stat-lbl { font-size: 11px; color: #888; text-transform: uppercase; letter-spacing: 0.06em; margin-top: 4px; }
#webpossum-app .wp-stat-red    .wp-stat-num { color: #dc2626; }
#webpossum-app .wp-stat-green  .wp-stat-num { color: #005f23; }
#webpossum-app .wp-stat-yellow .wp-stat-num { color: #ca8a04; }

/* ── Hire banner ─────────────────────────────────────────────────────────── */
#webpossum-app .wp-hire-banner {
	background: #111; border-radius: 16px; padding: 20px 24px;
	display: flex; align-items: center; justify-content: space-between;
	gap: 16px; margin-bottom: 16px; flex-wrap: wrap;
}
#webpossum-app .wp-hire-eyebrow { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255,255,255,0.5); margin-bottom: 4px; }
#webpossum-app .wp-hire-title   { font-size: 17px; font-weight: 600; color: #fff; margin-bottom: 4px; }
#webpossum-app .wp-hire-sub     { font-size: 13px; color: rgba(255,255,255,0.6); }
#webpossum-app .wp-hire-price {
	display: inline-block; margin-top: 8px;
	font-size: 12px; font-weight: 600; color: rgba(255,255,255,0.5);
	background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12);
	border-radius: 40px; padding: 3px 12px;
}
#webpossum-app .wp-hire-cta {
	background: #fff; color: #111 !important; padding: 11px 22px;
	border-radius: 40px; font-size: 14px; font-weight: 600;
	text-decoration: none !important; white-space: nowrap; flex-shrink: 0;
	transition: opacity 0.15s;
}
#webpossum-app .wp-hire-cta:hover { opacity: 0.9; }

/* ── Tabs ────────────────────────────────────────────────────────────────── */
#webpossum-app .wp-tabs { display: flex; border-bottom: 1px solid #e5e5e5; margin-bottom: 16px; }
#webpossum-app .wp-tab {
	font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 500;
	color: #888; background: transparent; border: none;
	border-bottom: 2px solid transparent;
	padding: 10px 18px; margin-bottom: -1px;
	cursor: pointer; transition: color 0.15s;
}
#webpossum-app .wp-tab:hover  { color: #111; }
#webpossum-app .wp-tab.active { color: #111; border-bottom-color: #111; }

/* ── Filter bar ──────────────────────────────────────────────────────────── */
#webpossum-app .wp-filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
#webpossum-app .wp-fbtn {
	font-family: 'DM Sans', sans-serif; font-size: 13px; padding: 6px 14px;
	border-radius: 40px; border: 1px solid #e5e5e5;
	background: #fff; color: #666; cursor: pointer; font-weight: 500; transition: all 0.15s;
}
#webpossum-app .wp-fbtn:hover  { border-color: #ccc; color: #111; }
#webpossum-app .wp-fbtn.active { background: #111; color: #fff; border-color: #111; }

/* ── Issues ──────────────────────────────────────────────────────────────── */
#webpossum-app .wp-issue-list { display: flex; flex-direction: column; gap: 10px; }
#webpossum-app .wp-issue {
	background: #fff; border: 1px solid #e5e5e5;
	border-left: 4px solid #ccc; border-radius: 12px;
	padding: 16px 18px; transition: box-shadow 0.15s;
}
#webpossum-app .wp-issue:hover    { box-shadow: 0 4px 16px rgba(0,0,0,0.06); }
#webpossum-app .wp-issue.critical { border-left-color: #dc2626; }
#webpossum-app .wp-issue.serious  { border-left-color: #ea580c; }
#webpossum-app .wp-issue.moderate { border-left-color: #ca8a04; }
#webpossum-app .wp-issue.minor    { border-left-color: #d4d4d4; }

#webpossum-app .wp-issue-top {
	display: flex; align-items: flex-start; justify-content: space-between;
	gap: 10px; margin-bottom: 6px;
}
#webpossum-app .wp-issue-title  { font-size: 14px; font-weight: 600; flex: 1; line-height: 1.4; }
#webpossum-app .wp-issue-badges { display: flex; gap: 5px; flex-shrink: 0; flex-wrap: wrap; }
#webpossum-app .wp-bdg {
	font-size: 11px; padding: 2px 9px; border-radius: 40px;
	font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em;
}
#webpossum-app .wp-bdg-critical { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
#webpossum-app .wp-bdg-serious  { background: #fff7ed; color: #ea580c; border: 1px solid #fed7aa; }
#webpossum-app .wp-bdg-moderate { background: #fefce8; color: #ca8a04; border: 1px solid #fef08a; }
#webpossum-app .wp-bdg-minor    { background: #f5f5f5; color: #666;    border: 1px solid #e5e5e5; }
#webpossum-app .wp-bdg-count    { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }
#webpossum-app .wp-bdg-wcag     { background: #f5f5f5; color: #888;    border: 1px solid #e5e5e5; font-family: monospace; }

#webpossum-app .wp-issue-meta {
	font-size: 12px; color: #aaa; margin-bottom: 6px;
	display: flex; gap: 6px; flex-wrap: wrap; align-items: center;
}
#webpossum-app .wp-issue-meta code { font-size: 11px; background: #f5f5f5; padding: 1px 7px; border-radius: 4px; color: #666; }
#webpossum-app .wp-issue-desc      { font-size: 13px; color: #555; line-height: 1.6; }
#webpossum-app .wp-issue-desc a    { color: #111; }
#webpossum-app .wp-issue-nodes     { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
#webpossum-app .wp-inode           { background: #f8f8f8; border: 1px solid #e5e5e5; border-radius: 8px; padding: 10px 12px; }
#webpossum-app .wp-inode-html      { font-family: monospace; font-size: 11px; color: #333; word-break: break-all; line-height: 1.6; }
#webpossum-app .wp-inode-msg       { font-size: 12px; color: #888; margin-top: 4px; white-space: pre-wrap; line-height: 1.5; }

#webpossum-app .wp-pass-row,
#webpossum-app .wp-rev-row {
	display: flex; align-items: center; justify-content: space-between;
	border-radius: 8px; padding: 10px 14px; margin-bottom: 6px; font-size: 13px;
}
#webpossum-app .wp-pass-row { background: #f0fdf4; border: 1px solid #bbf7d0; color: #005f23; }
#webpossum-app .wp-rev-row  { background: #fefce8; border: 1px solid #fef08a; color: #ca8a04; }

#webpossum-app .wp-empty      { text-align: center; padding: 32px; color: #aaa; font-size: 14px; }
#webpossum-app .wp-empty-icon { font-size: 32px; display: block; margin-bottom: 8px; color: #005f23; }

/* ── CTA footer ──────────────────────────────────────────────────────────── */
#webpossum-app .wp-cta-footer {
	background: #f8f8f8; border: 1px solid #e5e5e5; border-radius: 20px;
	padding: 28px; margin-top: 24px;
	display: flex; align-items: center; justify-content: space-between;
	gap: 24px; flex-wrap: wrap;
}
#webpossum-app .wp-cta-left h3 { font-size: 18px; font-weight: 700; margin: 0 0 8px; }
#webpossum-app .wp-cta-left p  { font-size: 14px; color: #555; line-height: 1.6; margin: 0 0 16px; max-width: 520px; }
#webpossum-app .wp-btn-cta {
	display: inline-block; background: #111; color: #fff !important;
	padding: 11px 22px; border-radius: 40px; font-size: 14px; font-weight: 600;
	text-decoration: none !important; transition: background 0.15s;
}
#webpossum-app .wp-btn-cta:hover    { background: #333; }
#webpossum-app .wp-external-link    { font-size: 13px; color: #888; text-decoration: none; }
#webpossum-app .wp-external-link:hover { color: #111; }

/* ── Live Preview panel ──────────────────────────────────────────────────── */
#webpossum-app .wp-preview-wrap {
	background: #fff; border: 1px solid #e5e5e5; border-radius: 20px;
	overflow: hidden; margin-bottom: 24px;
	box-shadow: 0 4px 20px rgba(0,0,0,0.04);
}
#webpossum-app .wp-preview-bar {
	display: flex; align-items: center; gap: 10px;
	padding: 10px 18px; background: #f8f8f8; border-bottom: 1px solid #e5e5e5;
}
#webpossum-app .wp-preview-label    { font-size: 12px; font-weight: 600; color: #111; white-space: nowrap; }
#webpossum-app .wp-preview-url-text {
	flex: 1; font-size: 12px; color: #888; font-family: monospace;
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#webpossum-app .wp-preview-bar-right {
	display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}
#webpossum-app .wp-preview-status { font-size: 12px; color: #888; white-space: nowrap; }

/* Shared pill button style for Collapse / Hide Overlay */
#webpossum-app .wp-preview-toggle {
	font-family: 'DM Sans', sans-serif; font-size: 12px; font-weight: 500;
	color: #888; background: none; border: 1px solid #e5e5e5; border-radius: 40px;
	padding: 4px 12px; cursor: pointer; white-space: nowrap;
	transition: color 0.15s, border-color 0.15s;
}
#webpossum-app .wp-preview-toggle:hover { color: #111; border-color: #bbb; }

/* Overlay legend */
#webpossum-app .wp-overlay-legend {
	display: inline-flex; align-items: center; gap: 6px;
	font-size: 11px; color: #666; font-weight: 500;
}
#webpossum-app .wp-legend-dot {
	width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex-shrink: 0;
}

/* Preview body + iframe */
#webpossum-app .wp-preview-body    { width: 100%; height: 520px; position: relative; background: #f0f0f1; }
#webpossum-app .wp-preview-loading {
	position: absolute; inset: 0;
	display: flex; flex-direction: column; align-items: center; justify-content: center;
	background: #f8f8f8;
}
#webpossum-app .wp-preview-loading .wp-spinner { margin: 0; animation: webpossum-spin 0.8s linear infinite; }
#webpossum-app .wp-preview-iframe  { width: 100%; height: 100%; border: none; display: block; }

/* ── Add these rules to the bottom of your existing admin.css ── */

/* Shadow DOM host — fills the preview body, clips overflow */
#webpossum-app .wp-preview-shadow {
	width: 100%;
	height: 100%;
	overflow: auto;
	background: #fff;
	border-radius: 0 0 20px 20px;
}

/* Scale the rendered page to fit the 520px preview height */
#webpossum-app .wp-preview-shadow > * {
	transform-origin: top left;
}

/* ── Append these to the bottom of admin/css/admin.css ── */

#webpossum-app .wp-preview-shadow {
	width: 100%;
	height: 520px;
	overflow: auto;
	background: #fff;
	display: block;
}