/**
 * Testing Walkthrough Styles
 *
 * All selectors scoped under #yoko-testing-app to avoid theme conflicts.
 * Uses CSS custom properties with fallback chain:
 *   theme var (--wp--preset--*) → generic var → hardcoded default
 * Typography inherits from theme — no hardcoded font stack.
 * Accounts for WP admin bar with .admin-bar offset.
 *
 * @package Yoko_Custom
 * @since 1.2.0
 */

/* ============================================================
   CSS Custom Properties
   ============================================================ */
#yoko-testing-app {
	/* Typography — inherit from theme, base size from WP preset */
	font-family: inherit;
	font-size: var(--wp--preset--font-size--body-default, inherit);
	line-height: 1.6;
	color: var(--twk-color-text);
	-webkit-font-smoothing: antialiased;

	/* Text colors */
	--twk-color-text: var(--wp--preset--color--contrast, #1a1a2e);
	--twk-color-text-secondary: var(--wp--preset--color--contrast-2, #4b5563);
	--twk-color-text-muted: #9ca3af;
	--twk-color-heading: var(--wp--preset--color--contrast, #111827);

	/* Backgrounds */
	--twk-color-bg: var(--wp--preset--color--base, #fff);
	--twk-color-bg-alt: var(--wp--preset--color--base-2, #f9fafb);
	--twk-color-bg-subtle: #f0f1f3;

	/* Borders */
	--twk-color-border: #e5e7eb;
	--twk-color-border-light: #e2e4ea;
	--twk-color-border-hover: #9ca3af;

	/* Primary / interactive */
	--twk-color-primary: var(--wp--preset--color--primary, #2563eb);
	--twk-color-primary-hover: #1d4ed8;
	--twk-color-primary-light: #eff6ff;
	--twk-color-primary-border: #93c5fd;

	/* Status: pass */
	--twk-color-pass: #22c55e;
	--twk-color-pass-dark: #16a34a;
	--twk-color-pass-darker: #15803d;
	--twk-color-pass-bg: #f0fdf4;
	--twk-color-pass-bg-mid: #dcfce7;
	--twk-color-pass-border: #86efac;
	--twk-color-pass-border-light: #bbf7d0;
	--twk-color-pass-text: #166534;
	--twk-color-pass-text-dark: #14532d;

	/* Status: fail */
	--twk-color-fail: #ef4444;
	--twk-color-fail-dark: #dc2626;
	--twk-color-fail-darker: #b91c1c;
	--twk-color-fail-bg: #fef2f2;
	--twk-color-fail-bg-mid: #fee2e2;
	--twk-color-fail-border: #fca5a5;
	--twk-color-fail-border-light: #fecaca;

	/* Status: skip */
	--twk-color-skip: #6b7280;
	--twk-color-skip-light: #d1d5db;
	--twk-color-skip-bg: #f3f4f6;

	/* Custom / project-specific */
	--twk-color-custom: #8b5cf6;
	--twk-color-custom-dark: #7c3aed;
	--twk-color-custom-bg: #f5f3ff;
	--twk-color-custom-border: #ede9fe;

	/* Setup / warning */
	--twk-color-setup-bg: #fffbeb;
	--twk-color-setup-border: #fde68a;
	--twk-color-setup-accent: #f59e0b;
	--twk-color-setup-text: #92400e;
	--twk-color-setup-text-dark: #78350f;

	/* Credentials */
	--twk-color-cred-bg: #eff6ff;
	--twk-color-cred-border: #bfdbfe;
	--twk-color-cred-accent: #3b82f6;
	--twk-color-cred-label: #1e40af;
	--twk-color-cred-value-bg: var(--twk-color-bg);
	--twk-color-cred-value-border: #dbeafe;
	--twk-color-cred-value-text: #1e3a5f;

	/* Border radius */
	--twk-radius: 8px;
	--twk-radius-sm: 6px;
	--twk-radius-lg: 12px;
	--twk-radius-xl: 16px;
	--twk-radius-pill: 10px;

	/* Focus ring */
	--twk-focus-ring: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

#yoko-testing-app *,
#yoko-testing-app *::before,
#yoko-testing-app *::after {
	box-sizing: border-box;
}

/* ============================================================
   Top Bar
   ============================================================ */
#yoko-testing-app .twk-top-bar {
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--twk-color-bg);
	border-bottom: 1px solid var(--twk-color-border-light);
	padding: 14px 28px;
	display: grid;
	grid-template-columns: 1fr auto auto;
	align-items: center;
	gap: 16px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.admin-bar #yoko-testing-app .twk-top-bar {
	top: 32px;
}

@media screen and (max-width: 782px) {
	.admin-bar #yoko-testing-app .twk-top-bar {
		top: 46px;
	}
}

#yoko-testing-app .twk-top-bar h2 {
	font-size: 1.15em;
	font-weight: 700;
	letter-spacing: -0.01em;
	color: var(--twk-color-heading);
	margin: 0;
	padding: 0;
}

#yoko-testing-app .twk-progress-summary {
	display: flex;
	gap: 14px;
	font-size: 0.8em;
	font-weight: 500;
	color: var(--twk-color-skip);
	align-items: center;
}

#yoko-testing-app .twk-stat {
	display: flex;
	align-items: center;
	gap: 4px;
}

#yoko-testing-app .twk-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	display: inline-block;
}

#yoko-testing-app .twk-dot-pass { background: var(--twk-color-pass); }
#yoko-testing-app .twk-dot-fail { background: var(--twk-color-fail); }
#yoko-testing-app .twk-dot-skip { background: var(--twk-color-skip-light); }

#yoko-testing-app .twk-count {
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

#yoko-testing-app .twk-count-pass { color: var(--twk-color-pass-dark); }
#yoko-testing-app .twk-count-fail { color: var(--twk-color-fail-dark); }
#yoko-testing-app .twk-count-skip { color: var(--twk-color-text-muted); }

#yoko-testing-app .twk-empty-state {
	padding: 40px;
	text-align: center;
	color: var(--twk-color-text-muted);
}

#yoko-testing-app .twk-progress-label {
	color: var(--twk-color-text-muted);
}

#yoko-testing-app .twk-progress-total {
	color: var(--twk-color-text-secondary);
}

/* Segmented Progress Bar */
#yoko-testing-app .twk-progress-bar {
	width: 180px;
	height: 8px;
	background: var(--twk-color-bg-subtle);
	border-radius: var(--twk-radius-sm);
	overflow: hidden;
	display: flex;
}

#yoko-testing-app .twk-seg {
	height: 100%;
	transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#yoko-testing-app .twk-seg-pass { background: var(--twk-color-pass); }
#yoko-testing-app .twk-seg-fail { background: var(--twk-color-fail); }
#yoko-testing-app .twk-seg-skip { background: var(--twk-color-skip-light); }

#yoko-testing-app .twk-top-actions {
	display: flex;
	gap: 8px;
}

/* ============================================================
   Buttons
   ============================================================ */
#yoko-testing-app .twk-btn {
	padding: 7px 16px;
	border-radius: var(--twk-radius);
	border: 1px solid var(--twk-color-skip-light);
	background: var(--twk-color-bg);
	font-size: 0.85em;
	cursor: pointer;
	font-weight: 600;
	font-family: inherit;
	transition: all 0.15s;
	color: var(--twk-color-text-secondary);
}

#yoko-testing-app .twk-btn:hover {
	background: var(--twk-color-bg-alt);
	border-color: var(--twk-color-border-hover);
}

#yoko-testing-app .twk-btn:active {
	transform: scale(0.97);
}

#yoko-testing-app .twk-btn-primary {
	background: var(--twk-color-primary);
	color: #fff;
	border-color: var(--twk-color-primary);
	box-shadow: 0 1px 2px rgba(37, 99, 235, 0.2);
}

#yoko-testing-app .twk-btn-primary:hover {
	background: var(--twk-color-primary-hover);
	border-color: var(--twk-color-primary-hover);
}

/* ============================================================
   Phase Tabs
   ============================================================ */
#yoko-testing-app .twk-phase-tabs {
	display: flex;
	gap: 0;
	background: var(--twk-color-bg);
	border-bottom: 1px solid var(--twk-color-border-light);
	padding: 0 28px;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

#yoko-testing-app .twk-phase-tab {
	padding: 10px 20px 8px;
	font-size: 0.85em;
	font-weight: 600;
	color: var(--twk-color-text-muted);
	cursor: pointer;
	border-bottom: 3px solid transparent;
	white-space: nowrap;
	transition: all 0.15s;
	letter-spacing: -0.01em;
	background: none;
	border-top: none;
	border-left: none;
	border-right: none;
	font-family: inherit;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	line-height: 1.3;
}

#yoko-testing-app .twk-phase-tab:hover {
	color: var(--twk-color-skip);
}

#yoko-testing-app .twk-phase-tab.active {
	color: var(--twk-color-primary);
	border-bottom-color: var(--twk-color-primary);
}

/* Tab detail row — stats + count on one line below the label */
#yoko-testing-app .twk-tab-detail {
	display: flex;
	align-items: center;
	gap: 6px;
	justify-content: center;
}

#yoko-testing-app .twk-tab-count {
	font-size: 0.8em;
	font-weight: 700;
	padding: 1px 6px;
	border-radius: var(--twk-radius-pill);
	background: var(--twk-color-skip-bg);
	color: var(--twk-color-text-muted);
	font-variant-numeric: tabular-nums;
}

#yoko-testing-app .twk-phase-tab.active .twk-tab-count {
	background: var(--twk-color-primary-light);
	color: var(--twk-color-primary);
}

/* Tab progress stats */
#yoko-testing-app .twk-tab-stats {
	display: flex;
	gap: 4px;
	font-size: 0.8em;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

#yoko-testing-app .twk-tab-stat-pass { color: var(--twk-color-pass-dark); }
#yoko-testing-app .twk-tab-stat-fail { color: var(--twk-color-fail-dark); }
#yoko-testing-app .twk-tab-stat-skip { color: var(--twk-color-text-muted); }

/* ============================================================
   Content Area
   ============================================================ */
#yoko-testing-app .twk-content {
	max-width: 760px;
	margin: 0 auto;
	padding: 28px 16px;
}

#yoko-testing-app .twk-phase-section {
	display: none;
}

#yoko-testing-app .twk-phase-section.active {
	display: block;
}

/* ============================================================
   Test Cards
   ============================================================ */
#yoko-testing-app .twk-test-card {
	background: var(--twk-color-bg);
	border: 1px solid var(--twk-color-border);
	border-radius: var(--twk-radius-lg);
	margin-bottom: 20px;
	overflow: hidden;
	transition: all 0.2s;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

#yoko-testing-app .twk-test-card:hover {
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

#yoko-testing-app .twk-test-card.result-pass {
	border-color: var(--twk-color-pass-border);
	background: linear-gradient(to right, var(--twk-color-pass-bg) 0%, var(--twk-color-bg) 4px);
}

#yoko-testing-app .twk-test-card.result-fail {
	border-color: var(--twk-color-fail-border);
	background: linear-gradient(to right, var(--twk-color-fail-bg) 0%, var(--twk-color-bg) 4px);
}

#yoko-testing-app .twk-test-card.result-skip {
	border-color: var(--twk-color-skip-light);
}

#yoko-testing-app .twk-test-card.custom-test {
	border-left: 3px solid var(--twk-color-custom);
}

#yoko-testing-app .twk-card-header {
	padding: 16px 20px 12px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

#yoko-testing-app .twk-card-title {
	font-size: 1em;
	font-weight: 700;
	letter-spacing: -0.01em;
}

#yoko-testing-app .twk-card-number {
	color: #c4c8d0;
	font-weight: 600;
	margin-right: 6px;
	font-size: 0.85em;
}

#yoko-testing-app .twk-card-badge {
	font-size: 0.7em;
	font-weight: 700;
	padding: 3px 10px;
	border-radius: var(--twk-radius-sm);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

#yoko-testing-app .twk-badge-pass { background: var(--twk-color-pass-bg-mid); color: var(--twk-color-pass-darker); }
#yoko-testing-app .twk-badge-fail { background: var(--twk-color-fail-bg-mid); color: var(--twk-color-fail-darker); }
#yoko-testing-app .twk-badge-skip { background: var(--twk-color-skip-bg); color: var(--twk-color-skip); }

#yoko-testing-app .twk-card-body {
	padding: 0 20px 20px;
}

/* ============================================================
   Setup Box
   ============================================================ */
#yoko-testing-app .twk-setup-box {
	background: var(--twk-color-setup-bg);
	border: 1px solid var(--twk-color-setup-border);
	border-left: 3px solid var(--twk-color-setup-accent);
	border-radius: var(--twk-radius);
	padding: 10px 14px;
	margin-bottom: 16px;
	font-size: 0.85em;
	color: var(--twk-color-setup-text);
}

#yoko-testing-app .twk-setup-box strong {
	font-weight: 700;
	color: var(--twk-color-setup-text-dark);
}

/* ============================================================
   Credentials Box
   ============================================================ */
#yoko-testing-app .twk-cred-box {
	background: var(--twk-color-cred-bg);
	border: 1px solid var(--twk-color-cred-border);
	border-left: 3px solid var(--twk-color-cred-accent);
	border-radius: var(--twk-radius);
	padding: 12px 14px;
	margin-bottom: 16px;
	font-size: 0.85em;
}

#yoko-testing-app .twk-cred-row {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 6px;
}

#yoko-testing-app .twk-cred-row:last-child {
	margin-bottom: 0;
}

#yoko-testing-app .twk-cred-label {
	font-weight: 700;
	min-width: 72px;
	color: var(--twk-color-cred-label);
	font-size: 0.7em;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

#yoko-testing-app .twk-cred-value {
	font-family: 'SF Mono', 'Fira Code', Consolas, monospace;
	font-size: 0.85em;
	background: var(--twk-color-cred-value-bg);
	padding: 4px 10px;
	border-radius: var(--twk-radius-sm);
	border: 1px solid var(--twk-color-cred-value-border);
	flex: 1;
	word-break: break-all;
	color: var(--twk-color-cred-value-text);
}

#yoko-testing-app .twk-copy-btn {
	padding: 4px 10px;
	font-size: 0.7em;
	font-weight: 600;
	border: 1px solid var(--twk-color-primary-border);
	border-radius: var(--twk-radius-sm);
	background: var(--twk-color-bg);
	cursor: pointer;
	color: var(--twk-color-primary);
	white-space: nowrap;
	font-family: inherit;
	transition: all 0.15s;
}

#yoko-testing-app .twk-copy-btn:hover {
	background: var(--twk-color-cred-value-border);
	border-color: var(--twk-color-primary-border);
}

#yoko-testing-app .twk-copy-btn:active {
	transform: scale(0.95);
}

#yoko-testing-app .twk-cred-fallback {
	color: var(--twk-color-text-secondary);
}

#yoko-testing-app .twk-cred-fallback strong {
	font-weight: 700;
	color: var(--twk-color-cred-label);
}

/* ============================================================
   Steps
   ============================================================ */
#yoko-testing-app .twk-steps-list {
	list-style: none;
	counter-reset: step;
	margin: 0 0 16px;
	padding: 0;
}

#yoko-testing-app .twk-steps-list li {
	counter-increment: step;
	padding: 5px 0 5px 32px;
	position: relative;
	font-size: 0.9em;
	color: var(--twk-color-text-secondary);
}

#yoko-testing-app .twk-steps-list li::before {
	content: counter(step);
	position: absolute;
	left: 0;
	top: 5px;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--twk-color-bg-subtle);
	color: var(--twk-color-skip);
	font-size: 0.7em;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
}

#yoko-testing-app .twk-steps-list a {
	color: var(--twk-color-primary);
	text-decoration: none;
	font-weight: 500;
}

#yoko-testing-app .twk-steps-list a:hover {
	text-decoration: underline;
}

/* ============================================================
   Expected Result
   ============================================================ */
#yoko-testing-app .twk-expected-result {
	background: var(--twk-color-pass-bg);
	border: 1px solid var(--twk-color-pass-border-light);
	border-left: 3px solid var(--twk-color-pass);
	border-radius: var(--twk-radius);
	padding: 10px 14px;
	margin-bottom: 16px;
	font-size: 0.85em;
	color: var(--twk-color-pass-text);
}

#yoko-testing-app .twk-expected-result strong {
	font-weight: 700;
	color: var(--twk-color-pass-text-dark);
}

/* ============================================================
   Result Buttons
   ============================================================ */
#yoko-testing-app .twk-result-actions {
	display: flex;
	gap: 8px;
	margin-bottom: 4px;
	flex-wrap: wrap;
}

#yoko-testing-app .twk-result-btn {
	padding: 8px 20px;
	border-radius: var(--twk-radius);
	border: 1px solid var(--twk-color-border);
	background: var(--twk-color-bg);
	font-size: 0.85em;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.15s;
	font-family: inherit;
	color: var(--twk-color-skip);
}

#yoko-testing-app .twk-result-btn:hover {
	border-color: var(--twk-color-border-hover);
	color: var(--twk-color-text-secondary);
	background: var(--twk-color-bg-alt);
}

#yoko-testing-app .twk-result-btn:active {
	transform: scale(0.97);
}

#yoko-testing-app .twk-result-btn.active-pass {
	background: var(--twk-color-pass);
	color: #fff;
	border-color: var(--twk-color-pass);
	box-shadow: 0 1px 3px rgba(34, 197, 94, 0.3);
}

#yoko-testing-app .twk-result-btn.active-fail {
	background: var(--twk-color-fail);
	color: #fff;
	border-color: var(--twk-color-fail);
	box-shadow: 0 1px 3px rgba(239, 68, 68, 0.3);
}

#yoko-testing-app .twk-result-btn.active-skip {
	background: var(--twk-color-skip);
	color: #fff;
	border-color: var(--twk-color-skip);
	box-shadow: 0 1px 3px rgba(107, 114, 128, 0.3);
}

/* ============================================================
   Notes
   ============================================================ */
#yoko-testing-app .twk-notes-area {
	margin-top: 12px;
}

#yoko-testing-app .twk-notes-toggle {
	font-size: 0.8em;
	font-weight: 600;
	color: var(--twk-color-skip);
	cursor: pointer;
	border: 1px solid var(--twk-color-border);
	background: var(--twk-color-bg-alt);
	padding: 4px 12px;
	border-radius: var(--twk-radius-sm);
	font-family: inherit;
	transition: all 0.15s;
}

#yoko-testing-app .twk-notes-toggle:hover {
	border-color: var(--twk-color-border-hover);
	color: var(--twk-color-text-secondary);
	background: var(--twk-color-skip-bg);
}

#yoko-testing-app .twk-notes-textarea {
	width: 100%;
	margin-top: 8px;
	padding: 10px 14px;
	border: 1px solid var(--twk-color-skip-light);
	border-radius: var(--twk-radius);
	font-size: 0.85em;
	font-family: inherit;
	resize: vertical;
	min-height: 68px;
	display: none;
	transition: border-color 0.15s;
}

#yoko-testing-app .twk-notes-textarea:focus {
	outline: none;
	border-color: var(--twk-color-primary-border);
	box-shadow: var(--twk-focus-ring);
}

#yoko-testing-app .twk-notes-textarea.visible {
	display: block;
}

/* ============================================================
   Custom test group divider
   ============================================================ */
#yoko-testing-app .twk-custom-divider {
	font-size: 0.8em;
	font-weight: 700;
	color: var(--twk-color-custom-dark);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	margin: 28px 0 14px;
	padding: 9px 16px;
	background: var(--twk-color-custom-bg);
	border-radius: var(--twk-radius);
	border: 1px solid var(--twk-color-custom-border);
}

/* ============================================================
   Team Results (collaborative)
   ============================================================ */
#yoko-testing-app .twk-team-section {
	margin-top: 12px;
	border-top: 1px solid var(--twk-color-border);
	padding-top: 8px;
}

#yoko-testing-app .twk-team-toggle {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 0.8em;
	font-weight: 600;
	color: var(--twk-color-text-muted);
	cursor: pointer;
	border: none;
	background: none;
	padding: 4px 0;
	font-family: inherit;
	transition: color 0.15s;
}

#yoko-testing-app .twk-team-toggle:hover {
	color: var(--twk-color-text-secondary);
}

#yoko-testing-app .twk-team-toggle .twk-team-arrow {
	display: inline-block;
	transition: transform 0.15s;
	font-size: 0.65em;
}

#yoko-testing-app .twk-team-toggle.expanded .twk-team-arrow {
	transform: rotate(90deg);
}

#yoko-testing-app .twk-team-list {
	display: none;
	margin-top: 8px;
}

#yoko-testing-app .twk-team-list.visible {
	display: block;
}

#yoko-testing-app .twk-team-row {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 8px 0;
	border-bottom: 1px solid var(--twk-color-border);
	font-size: 0.85em;
}

#yoko-testing-app .twk-team-row:last-child {
	border-bottom: none;
}

#yoko-testing-app .twk-team-avatar {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--twk-color-bg-subtle);
	color: var(--twk-color-skip);
	font-size: 0.65em;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	text-transform: uppercase;
}

#yoko-testing-app .twk-team-info {
	flex: 1;
	min-width: 0;
}

#yoko-testing-app .twk-team-name {
	font-weight: 600;
	color: var(--twk-color-text);
}

#yoko-testing-app .twk-team-note {
	margin-top: 2px;
	color: var(--twk-color-text-secondary);
	font-size: 0.8em;
	font-style: italic;
	word-break: break-word;
}

#yoko-testing-app .twk-team-badge {
	font-size: 0.65em;
	font-weight: 700;
	padding: 2px 8px;
	border-radius: var(--twk-radius-sm);
	text-transform: uppercase;
	letter-spacing: 0.04em;
	flex-shrink: 0;
}

#yoko-testing-app .twk-team-badge-pass { background: var(--twk-color-pass-bg-mid); color: var(--twk-color-pass-darker); }
#yoko-testing-app .twk-team-badge-fail { background: var(--twk-color-fail-bg-mid); color: var(--twk-color-fail-darker); }
#yoko-testing-app .twk-team-badge-skip { background: var(--twk-color-skip-bg); color: var(--twk-color-skip); }

/* --- Team Results: inline status dots --- */
#yoko-testing-app .twk-team-dots {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin-left: 8px;
}

#yoko-testing-app .twk-team-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	flex-shrink: 0;
}

#yoko-testing-app .twk-team-dot-pass { background: var(--twk-color-pass); }
#yoko-testing-app .twk-team-dot-fail { background: var(--twk-color-fail); }
#yoko-testing-app .twk-team-dot-skip { background: var(--twk-color-skip-light); }
#yoko-testing-app .twk-team-dot-unknown { background: var(--twk-color-skip); }

#yoko-testing-app .twk-team-notes-indicator {
	margin-left: 4px;
	font-size: 0.85em;
	line-height: 1;
}

#yoko-testing-app .twk-team-toggle-attention {
	color: var(--twk-color-fail-dark);
}

#yoko-testing-app .screen-reader-text {
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	width: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	word-wrap: normal !important;
}

/* ============================================================
   Login Prompt & Access Restricted (moved from inline styles)
   ============================================================ */
.yoko-testing-login-prompt,
.yoko-testing-notice-restricted {
	max-width: 480px;
	margin: 40px auto;
	padding: 32px;
	text-align: center;
	background: var(--twk-color-bg, #fff);
	border: 1px solid var(--twk-color-border, #e5e7eb);
	border-radius: var(--twk-radius-lg, 12px);
}

.yoko-testing-login-prompt h2,
.yoko-testing-notice-restricted h2 {
	margin: 0 0 12px;
	font-size: 1.3em;
}

.yoko-testing-login-prompt p,
.yoko-testing-notice-restricted p {
	margin: 0 0 20px;
	color: var(--twk-color-skip, #6b7280);
}

.yoko-testing-notice-restricted p {
	margin-bottom: 0;
}

.yoko-testing-login-prompt .twk-login-btn {
	display: inline-block;
	padding: 10px 28px;
	background: var(--twk-color-primary, #2563eb);
	color: #fff;
	border-radius: var(--twk-radius, 8px);
	text-decoration: none;
	font-weight: 600;
}

.yoko-testing-login-prompt .twk-login-btn:hover {
	opacity: 0.9;
}

/* ============================================================
   Export Modal
   ============================================================ */
#yoko-testing-app .twk-modal-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	backdrop-filter: blur(2px);
	z-index: 200;
	align-items: center;
	justify-content: center;
}

#yoko-testing-app .twk-modal-overlay.visible {
	display: flex;
}

#yoko-testing-app .twk-modal {
	background: var(--twk-color-bg);
	border-radius: var(--twk-radius-xl);
	padding: 28px;
	max-width: 620px;
	width: 90%;
	max-height: 80vh;
	display: flex;
	flex-direction: column;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

#yoko-testing-app .twk-modal h3 {
	font-size: 1.15em;
	font-weight: 700;
	margin: 0 0 14px;
}

#yoko-testing-app .twk-modal textarea {
	flex: 1;
	min-height: 220px;
	font-family: 'SF Mono', 'Fira Code', monospace;
	font-size: 0.8em;
	border: 1px solid var(--twk-color-skip-light);
	border-radius: var(--twk-radius);
	padding: 14px;
	resize: vertical;
	line-height: 1.6;
}

#yoko-testing-app .twk-modal textarea:focus {
	outline: none;
	border-color: var(--twk-color-primary-border);
	box-shadow: var(--twk-focus-ring);
}

#yoko-testing-app .twk-modal-actions {
	display: flex;
	gap: 8px;
	margin-top: 14px;
	justify-content: flex-end;
}

/* ============================================================
   Save Error Banner
   ============================================================ */
#yoko-testing-app .twk-save-error {
	background: var(--twk-color-fail-bg);
	color: var(--twk-color-fail-darker);
	border: 1px solid var(--twk-color-fail-border-light);
	padding: 10px 20px;
	font-size: 0.85em;
	font-weight: 600;
	text-align: center;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 640px) {
	#yoko-testing-app .twk-top-bar {
		padding: 12px 16px;
		grid-template-columns: 1fr 1fr;
		grid-template-rows: auto auto;
		gap: 10px;
	}

	#yoko-testing-app .twk-top-bar h2 {
		font-size: 1em;
	}

	#yoko-testing-app .twk-progress-summary {
		grid-column: 1 / -1;
		order: 3;
		justify-content: space-between;
	}

	#yoko-testing-app .twk-progress-bar {
		flex: 1;
		min-width: 0;
	}

	#yoko-testing-app .twk-top-actions {
		justify-content: flex-end;
	}

	#yoko-testing-app .twk-phase-tabs {
		padding: 0 12px;
	}

	#yoko-testing-app .twk-phase-tab {
		padding: 8px 12px 6px;
		font-size: 0.8em;
	}

	#yoko-testing-app .twk-content {
		padding: 18px 12px;
	}

	#yoko-testing-app .twk-card-header {
		padding: 14px 16px 10px;
	}

	#yoko-testing-app .twk-card-body {
		padding: 0 16px 16px;
	}

	#yoko-testing-app .twk-result-actions {
		gap: 6px;
	}

	#yoko-testing-app .twk-result-btn {
		padding: 8px 14px;
		font-size: 0.8em;
		flex: 1;
		text-align: center;
	}

	#yoko-testing-app .twk-copy-btn {
		padding: 6px 12px;
		font-size: 0.8em;
	}

	#yoko-testing-app .twk-cred-row {
		flex-wrap: wrap;
	}

	#yoko-testing-app .twk-cred-value {
		min-width: 0;
	}

	#yoko-testing-app .twk-tab-stats {
		display: none;
	}
}

/* -----------------------------------------------------------------------------
 * Admin dashboard styles
 *
 * Scoped helpers for the wp-admin "Testing Walkthrough" page (under Yoko
 * Dashboard). Replaces inline `style="..."` attributes that used to live in
 * `Admin::render_results_dashboard()`.
 * ---------------------------------------------------------------------------*/

.yoko-testing-admin__table {
	max-width: 900px;
}

.yoko-testing-admin__detail-table {
	margin: 8px 0;
}

.yoko-testing-admin__col--count {
	width: 60px;
	text-align: center;
}

.yoko-testing-admin__col--remaining {
	width: 80px;
	text-align: center;
}

.yoko-testing-admin__col--status {
	width: 60px;
}

.yoko-testing-admin__col--updated {
	width: 140px;
}

.yoko-testing-admin__col--actions {
	width: 60px;
}

.yoko-testing-admin__cell--count {
	text-align: center;
	font-weight: 700;
}

.yoko-testing-admin__cell--status {
	font-weight: 700;
}

.yoko-testing-admin__status--pass {
	color: #16a34a;
}

.yoko-testing-admin__status--fail {
	color: #dc2626;
}

.yoko-testing-admin__status--skip {
	color: #9ca3af;
}

.yoko-testing-admin__detail-row[hidden] {
	display: none;
}

.yoko-testing-admin__config-editor {
	width: 100%;
	max-width: 900px;
	font-family: monospace;
	font-size: 13px;
	tab-size: 2;
}
