/**
 * Opti-Behavior A/B Testing Admin Styles
 *
 * Standardized to match the Heatmaps / Recordings / Funnels design system.
 *
 * @package opti-behavior
 * @since   1.3.0
 */

/* =========================================================================
   Base & Layout — matches .opti-behavior-heatmaps-modern
   ========================================================================= */

.opti-ab-wrap {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
	background: #f8f9fa;
	margin: 0;
	padding: 0;
	max-width: none;
}

.opti-ab-wrap.wrap {
	margin: 0;
	padding: 0;
}

/* =========================================================================
   Page Header — purple gradient matching Heatmaps / Funnels
   ========================================================================= */

.opti-ab-page-header {
	background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #6d28d9 100%);
	color: white;
	padding: 28px 32px;
	margin: -1px 0 24px -20px;
	box-shadow: 0 4px 20px rgba(79, 70, 229, 0.25);
	border-radius: 0;
	overflow: visible;
	position: relative;
}

.opti-ab-page-header__content {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 16px;
}

.opti-ab-page-header__title-section {
	display: flex;
	align-items: center;
	gap: 16px;
}

.opti-ab-page-header__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	background: rgba(255, 255, 255, 0.15);
	border-radius: 12px;
	color: #fff;
	flex-shrink: 0;
}

.opti-ab-page-header__icon svg {
	width: 24px;
	height: 24px;
}

.opti-ab-page-header__title {
	color: #fff;
	font-size: 22px;
	font-weight: 700;
	margin: 0;
	display: flex;
	align-items: center;
	gap: 10px;
}

.opti-ab-page-header__subtitle {
	color: rgba(255, 255, 255, 0.8);
	font-size: 13px;
	margin: 4px 0 0 0;
}

.opti-ab-page-header__actions {
	display: flex;
	align-items: center;
	gap: 10px;
}

/* "New Test" button — white on purple header */
.opti-ab-btn-create {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 10px 20px !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	height: auto !important;
	border-radius: 8px !important;
	background: rgba(255, 255, 255, 0.18) !important;
	border: 1px solid rgba(255, 255, 255, 0.3) !important;
	color: #fff !important;
	text-decoration: none !important;
	cursor: pointer;
	transition: all 0.2s ease;
	line-height: 1.4 !important;
}

.opti-ab-btn-create:hover,
.opti-ab-btn-create:focus {
	background: rgba(255, 255, 255, 0.28) !important;
	border-color: rgba(255, 255, 255, 0.5) !important;
	color: #fff !important;
}

.opti-ab-btn-create svg {
	width: 16px;
	height: 16px;
}

/* =========================================================================
   Sub-page header (Builder + Results) — purple gradient, smaller
   ========================================================================= */

.opti-ab-subpage-header {
	background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #6d28d9 100%);
	color: white;
	padding: 22px 32px;
	margin: -1px 0 24px -20px;
	box-shadow: 0 4px 20px rgba(79, 70, 229, 0.25);
	position: relative;
}

.opti-ab-subpage-header__content {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
}

.opti-ab-subpage-header__left {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.opti-ab-subpage-header__right {
	display: flex;
	align-items: center;
	gap: 8px;
}

.opti-ab-back-link {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 13px;
	color: rgba(255, 255, 255, 0.75);
	text-decoration: none;
	margin-bottom: 4px;
	transition: color 0.2s;
}

.opti-ab-back-link:hover {
	color: #fff;
}

.opti-ab-back-link svg {
	width: 14px;
	height: 14px;
}

.opti-ab-subpage-header__title {
	color: #fff;
	font-size: 20px;
	font-weight: 700;
	margin: 0;
	line-height: 1.3;
	display: flex;
	align-items: center;
	gap: 10px;
}

/* Badge on purple header */
.opti-ab-subpage-header .opti-ab-badge {
	font-size: 11px;
	padding: 3px 10px;
}

/* Action buttons on purple header */
.opti-ab-header-action-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 16px !important;
	font-size: 13px !important;
	font-weight: 500 !important;
	border-radius: 8px !important;
	background: rgba(255, 255, 255, 0.18) !important;
	border: 1px solid rgba(255, 255, 255, 0.3) !important;
	color: #fff !important;
	cursor: pointer;
	transition: all 0.2s ease;
	line-height: 1.4 !important;
	height: auto !important;
}

.opti-ab-header-action-btn:hover,
.opti-ab-header-action-btn:focus {
	background: rgba(255, 255, 255, 0.28) !important;
	border-color: rgba(255, 255, 255, 0.5) !important;
	color: #fff !important;
}

.opti-ab-header-action-btn--danger {
	background: rgba(239, 68, 68, 0.25) !important;
	border-color: rgba(239, 68, 68, 0.4) !important;
}

.opti-ab-header-action-btn--danger:hover {
	background: rgba(239, 68, 68, 0.4) !important;
	border-color: rgba(239, 68, 68, 0.6) !important;
}

/* =========================================================================
   Content Wrapper — padding below header
   ========================================================================= */

.opti-ab-content {
	padding: 0 30px 30px;
}

/* =========================================================================
   Stats Bar — matches Heatmaps stat-card design
   ========================================================================= */

.opti-ab-stats-bar {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 20px;
	margin-bottom: 24px;
}

.opti-ab-stat-card {
	background: #ffffff;
	border-radius: 12px;
	padding: 20px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	display: flex;
	align-items: center;
	gap: 16px;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	border: none;
	position: relative;
	overflow: visible;
}

.opti-ab-stat-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.opti-ab-stat-card__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border-radius: 12px;
	flex-shrink: 0;
	font-size: 24px;
}

.opti-ab-stat-card__icon svg {
	width: 24px;
	height: 24px;
}

.opti-ab-stat-card__icon--running {
	background: #dcfce7;
	color: #16a34a;
}

.opti-ab-stat-card__icon--draft {
	background: #fef3c7;
	color: #d97706;
}

.opti-ab-stat-card__icon--completed {
	background: #dbeafe;
	color: #2563eb;
}

.opti-ab-stat-card__icon--impressions {
	background: #f3e8ff;
	color: #7c3aed;
}

.opti-ab-stat-card__body {
	display: flex;
	flex-direction: column;
	flex: 1;
}

.opti-ab-stat-card__value {
	font-size: 24px;
	font-weight: 700;
	color: #1a1a1a;
	line-height: 1.2;
	margin-bottom: 4px;
}

.opti-ab-stat-card__label {
	font-size: 14px;
	color: #6c757d;
	text-transform: none;
	letter-spacing: 0;
}

/* =========================================================================
   Filters — panel card style matching Heatmaps panel-header
   ========================================================================= */

.opti-ab-filters {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 20px;
	flex-wrap: wrap;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	padding: 16px 24px;
}

.opti-ab-filters__left {
	display: flex;
	gap: 10px;
}

.opti-ab-filters__right {
	display: flex;
	align-items: center;
}

.opti-ab-select,
.opti-ab-input {
	padding: 8px 14px;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	font-size: 13px;
	color: #1e293b;
	background: #fff;
	height: auto;
	line-height: 1.4;
	transition: all 0.2s ease;
}

.opti-ab-input--full,
.opti-ab-select--full {
	width: 100%;
}

.opti-ab-select:focus,
.opti-ab-input:focus {
	border-color: #6366f1;
	box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
	outline: none;
}

.opti-ab-search-wrapper {
	position: relative;
	display: inline-flex;
	align-items: center;
}

.opti-ab-search-wrapper .opti-ab-search-icon {
	position: absolute;
	left: 12px;
	top: 50%;
	transform: translateY(-50%);
	width: 16px;
	height: 16px;
	color: #94a3b8;
	pointer-events: none;
}

.opti-ab-search-wrapper .opti-ab-input {
	padding-left: 36px;
	width: 260px;
}

/* =========================================================================
   Test List
   ========================================================================= */

.opti-ab-test-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.opti-ab-test-card {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 20px;
	background: #fff;
	border-radius: 12px;
	padding: 20px 24px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	border: none;
}

.opti-ab-test-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.opti-ab-test-card__main {
	min-width: 0;
}

.opti-ab-test-card__name {
	font-size: 15px;
	font-weight: 600;
	color: #1a1a1a;
	margin: 0 0 4px;
}

.opti-ab-test-card__name a {
	color: inherit;
	text-decoration: none;
}

.opti-ab-test-card__name a:hover {
	color: #6366f1;
}

.opti-ab-test-card__meta {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 13px;
	color: #6c757d;
}

.opti-ab-test-card__meta span {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.opti-ab-test-card__stats {
	display: flex;
	gap: 12px;
	justify-self: center;
}

.opti-ab-test-card__stat {
	text-align: center;
	padding: 10px 18px;
	border-radius: 10px;
	min-width: 100px;
}

.opti-ab-test-card__stat--impressions {
	background: #f3e8ff;
}

.opti-ab-test-card__stat--conversions {
	background: #dbeafe;
}

.opti-ab-test-card__stat--rate {
	background: #dcfce7;
}

.opti-ab-test-card__stat-value {
	font-size: 20px;
	font-weight: 700;
	color: #1a1a1a;
	display: block;
	line-height: 1.2;
}

.opti-ab-test-card__stat--impressions .opti-ab-test-card__stat-value {
	color: #7c3aed;
}

.opti-ab-test-card__stat--conversions .opti-ab-test-card__stat-value {
	color: #2563eb;
}

.opti-ab-test-card__stat--rate .opti-ab-test-card__stat-value {
	color: #15803d;
}

/* Winner chip shown next to the test name for concluded tests. */
.opti-ab-test-card__winner {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin-left: 10px;
	padding: 3px 10px;
	border-radius: 12px;
	background: linear-gradient(135deg, #fef3c7, #fde68a);
	color: #92400e;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.2px;
	vertical-align: middle;
}

.opti-ab-test-card__winner svg {
	flex-shrink: 0;
}

.opti-ab-test-card__stat-label {
	font-size: 10px;
	color: #6c757d;
	text-transform: uppercase;
	letter-spacing: 0.3px;
	margin-top: 2px;
}

.opti-ab-test-card__actions {
	display: flex;
	gap: 8px;
	justify-self: end;
}

.opti-ab-test-card__actions .button {
	padding: 6px 14px !important;
	font-size: 12px !important;
	border-radius: 6px !important;
	border: 1px solid #e2e8f0 !important;
	background: #fff !important;
	color: #374151 !important;
	transition: all 0.2s ease;
}

.opti-ab-test-card__actions .button:hover {
	border-color: #6366f1 !important;
	color: #6366f1 !important;
	background: #f5f3ff !important;
}

.opti-ab-test-card__actions .button-primary {
	background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
	border-color: transparent !important;
	color: #fff !important;
}

.opti-ab-test-card__actions .button-primary:hover {
	background: linear-gradient(135deg, #4f46e5, #7c3aed) !important;
	color: #fff !important;
}

.opti-ab-test-card__actions .button-link-delete {
	border-color: #fecaca !important;
	color: #ef4444 !important;
	background: #fff !important;
}

.opti-ab-test-card__actions .button-link-delete:hover {
	background: #fef2f2 !important;
	border-color: #ef4444 !important;
}

/* =========================================================================
   Badges — pill-shaped, consistent
   ========================================================================= */

.opti-ab-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 4px 12px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 600;
	text-transform: capitalize;
	letter-spacing: 0;
}

.opti-ab-badge--draft {
	background: #fef3c7;
	color: #92400e;
}

.opti-ab-badge--running {
	background: #dcfce7;
	color: #166534;
}

.opti-ab-badge--paused {
	background: #fee2e2;
	color: #991b1b;
}

.opti-ab-badge--completed {
	background: #dbeafe;
	color: #1e40af;
}

.opti-ab-badge--archived {
	background: #ede9fe;
	color: #5b21b6;
}

.opti-ab-badge--deleted {
	background: #f3f4f6;
	color: #6b7280;
}

.opti-ab-pro-badge {
	display: inline-block;
	background: linear-gradient(135deg, #6366f1, #8b5cf6);
	color: #fff;
	padding: 2px 6px;
	border-radius: 9999px;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	vertical-align: middle;
	line-height: 1;
}

/* =========================================================================
   Empty State — panel style
   ========================================================================= */

.opti-ab-empty-state {
	text-align: center;
	padding: 60px 24px;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	border: none;
}

.opti-ab-empty-state__icon {
	color: #c7d2fe;
	margin-bottom: 16px;
}

.opti-ab-empty-state h2 {
	font-size: 20px;
	margin: 0 0 8px;
	color: #1a1a1a;
}

.opti-ab-empty-state p {
	color: #6c757d;
	max-width: 420px;
	margin: 0 auto 24px;
	font-size: 14px;
}

.opti-ab-empty-state .button-hero {
	background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
	border-color: transparent !important;
	color: #fff !important;
	border-radius: 8px !important;
	font-weight: 600 !important;
	padding: 12px 28px !important;
	font-size: 14px !important;
	height: auto !important;
	line-height: 1.4 !important;
	transition: all 0.2s ease;
}

.opti-ab-empty-state .button-hero:hover {
	background: linear-gradient(135deg, #4f46e5, #7c3aed) !important;
	box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* =========================================================================
   Limits Notice
   ========================================================================= */

.opti-ab-limits-notice {
	background: #eff6ff;
	border: 1px solid #bfdbfe;
	border-radius: 12px;
	padding: 14px 20px;
	margin-top: 20px;
	font-size: 13px;
	color: #1e40af;
}

.opti-ab-limits-notice a {
	color: #6366f1;
	font-weight: 600;
}

/* =========================================================================
   Loading / Spinner
   ========================================================================= */

.opti-ab-loading {
	text-align: center;
	padding: 40px;
	color: #6c757d;
}

.opti-ab-spinner {
	display: inline-block;
	width: 32px;
	height: 32px;
	border: 3px solid #e2e8f0;
	border-top-color: #6366f1;
	border-radius: 50%;
	animation: opti-ab-spin 0.6s linear infinite;
	margin-bottom: 12px;
}

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

/* =========================================================================
   Wizard Steps
   ========================================================================= */

.opti-ab-wizard-steps {
	display: flex;
	align-items: center;
	gap: 0;
	margin-bottom: 24px;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	overflow: hidden;
	border: none;
}

.opti-ab-wizard-step {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 14px 12px;
	font-size: 13px;
	color: #9ca3af;
	border-right: 1px solid #f1f5f9;
	transition: all 0.2s;
	cursor: pointer;
}

.opti-ab-wizard-step:last-child {
	border-right: none;
}

.opti-ab-wizard-step.active {
	color: #6366f1;
	background: #eef2ff;
	font-weight: 600;
}

.opti-ab-wizard-step.completed {
	color: #16a34a;
	background: #f0fdf4;
}

.opti-ab-wizard-step__number {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: #e5e7eb;
	color: #6b7280;
	font-size: 12px;
	font-weight: 700;
	flex-shrink: 0;
}

.opti-ab-wizard-step.active .opti-ab-wizard-step__number {
	background: #6366f1;
	color: #fff;
}

.opti-ab-wizard-step.completed .opti-ab-wizard-step__number {
	background: #16a34a;
	color: #fff;
}

.opti-ab-wizard-step__label {
	white-space: nowrap;
}

/* =========================================================================
   Wizard Panels
   ========================================================================= */

.opti-ab-wizard {
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	overflow: visible; /* defensive: prevent geometric clipping of tooltip popups that overflow wizard bounds */
	border: none;
}

.opti-ab-wizard-panel {
	display: none;
	padding: 32px;
}

.opti-ab-wizard-panel.active {
	display: block;
}

.opti-ab-wizard-panel h2 {
	font-size: 20px;
	margin: 0 0 6px;
	color: #1a1a1a;
}

.opti-ab-wizard-panel__desc {
	color: #6c757d;
	margin: 0 0 24px;
	font-size: 14px;
}

/* =========================================================================
   Test Type Grid
   ========================================================================= */

.opti-ab-type-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 14px;
}

.opti-ab-type-card {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding: 24px 16px;
	border: 2px solid #e5e7eb;
	border-radius: 12px;
	cursor: pointer;
	transition: all 0.2s ease;
	background: #fff;
}

.opti-ab-type-card input[type="radio"] {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.opti-ab-type-card:hover {
	border-color: #c7d2fe;
	background: #f5f3ff;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
	z-index: 1; /* lift hovered card's stacking context above z-index:auto siblings so tooltip paints on top */
}

.opti-ab-type-card:has(input:checked) {
	border-color: #6366f1;
	background: #eef2ff;
	box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

/* Pro card — dim card content but keep badge fully visible (opacity applied to children, not card). */
.opti-ab-type-card--pro {
	background: #faf9ff;
	border-color: #e9e5ff;
}

.opti-ab-type-card--pro .opti-ab-type-card__icon,
.opti-ab-type-card--pro > strong,
.opti-ab-type-card--pro > span:not(.opti-ab-pro-badge) {
	opacity: 0.6;
	transition: opacity 0.2s ease;
}

.opti-ab-type-card--pro:hover .opti-ab-type-card__icon,
.opti-ab-type-card--pro:hover > strong,
.opti-ab-type-card--pro:hover > span:not(.opti-ab-pro-badge) {
	opacity: 0.9;
}

/* Pro badge placement inside test-type cards — pinned top-right, clear pill. */
.opti-ab-type-card .opti-ab-pro-badge {
	position: absolute;
	top: 10px;
	right: 10px;
	padding: 3px 8px;
	font-size: 10px;
	line-height: 1;
	font-weight: 700;
	letter-spacing: 0.6px;
	color: #fff;
	background: linear-gradient(135deg, #6366f1, #8b5cf6);
	border-radius: 6px;
	box-shadow: 0 1px 2px rgba(99, 102, 241, 0.35);
	text-transform: uppercase;
	pointer-events: none;
	z-index: 2;
}

.opti-ab-type-card__icon {
	color: #6366f1;
	margin-bottom: 10px;
}

.opti-ab-type-card strong {
	display: block;
	font-size: 14px;
	margin-bottom: 4px;
	color: #1a1a1a;
}

.opti-ab-type-card span {
	font-size: 12px;
	color: #6c757d;
	line-height: 1.4;
}

/* =========================================================================
   Form Groups
   ========================================================================= */

.opti-ab-form-group {
	margin-bottom: 20px;
}

.opti-ab-form-group label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: #1a1a1a;
	margin-bottom: 6px;
}

.opti-ab-help-text {
	font-size: 12px;
	color: #94a3b8;
	margin: 4px 0 0;
}

.opti-ab-settings-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 20px;
}

/* =========================================================================
   Variants List
   ========================================================================= */

.opti-ab-variants-list {
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin-bottom: 16px;
}

.opti-ab-variant-row {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	background: #f9fafb;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	padding: 16px;
}

.opti-ab-variant-row--control {
	border-color: #bbf7d0;
	background: #f0fdf4;
}

.opti-ab-variant-row__badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 3px 8px;
	border-radius: 6px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	flex-shrink: 0;
	background: #e5e7eb;
	color: #374151;
}

.opti-ab-variant-row--control .opti-ab-variant-row__badge {
	background: #bbf7d0;
	color: #166534;
}

.opti-ab-variant-row__fields {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.opti-ab-variant-row__remove {
	color: #ef4444;
	cursor: pointer;
	flex-shrink: 0;
	padding: 4px;
	background: none;
	border: none;
}

.opti-ab-variant-row__remove:hover {
	color: #dc2626;
}

/* ---- Control variant info label ---- */
.opti-ab-ve-control-info {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	font-size: 11.5px;
	font-weight: 500;
	color: #16a34a;
	background: rgba(22, 163, 74, 0.06);
	border: 1px solid rgba(22, 163, 74, 0.18);
	border-radius: 8px;
	letter-spacing: -0.01em;
}
.opti-ab-ve-control-info svg {
	flex-shrink: 0;
	color: #16a34a;
}

/* ====================================================================
   Variant Card (ob-vcard) — side-by-side: preview LEFT, content RIGHT
   ==================================================================== */
.ob-vcard {
	display: flex;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	background: #fff;
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(0,0,0,0.04);
	height: 220px;
}

/* ---- LEFT: preview thumbnail ---- */
.ob-vcard__left {
	width: 280px;
	flex-shrink: 0;
	position: relative;
	overflow: hidden;
	background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
	border-right: 1px solid #e2e8f0;
}
.ob-vcard__left--empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	color: rgba(255,255,255,0.45);
	background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
	padding: 16px;
	text-align: center;
}
.ob-vcard__left--empty svg { opacity: 0.3; color: #94a3b8; margin-bottom: 2px; }
.ob-vcard__empty-title {
	font-size: 11px;
	font-weight: 600;
	color: #64748b;
	line-height: 1.3;
}
.ob-vcard__empty-hint {
	font-size: 10px;
	font-weight: 400;
	color: #94a3b8;
	line-height: 1.4;
}
.ob-vcard__left-iframe {
	width: 1440px;
	height: 900px;
	border: none;
	position: absolute;
	top: 0;
	left: 0;
	transform-origin: top left;
	transform: scale(0.244);
}
.ob-vcard__left-loading {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
}
/* Loading overlay — covers iframe until it finishes loading */
.ob-vcard__left-loader {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}
.ob-vcard__spinner {
	width: 22px;
	height: 22px;
	border: 2.5px solid #cbd5e1;
	border-top-color: #6366f1;
	border-radius: 50%;
	animation: ob-spin 0.7s linear infinite;
}
@keyframes ob-spin { to { transform: rotate(360deg); } }

/* ---- RIGHT: controls + changes list ---- */
.ob-vcard__right {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

/* Toolbar row */
.ob-vcard__toolbar {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	padding: 12px 16px;
	border-bottom: 1px solid #f1f5f9;
}
.ob-vcard__pills {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	margin-left: auto;
}
.ob-vcard__pill {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	padding: 3px 10px;
	border-radius: 100px;
	font-size: 10.5px;
	font-weight: 600;
	letter-spacing: -0.01em;
}
.ob-vcard__pill--style { background: rgba(99,102,241,0.08); color: #6366f1; }
.ob-vcard__pill--insert { background: rgba(16,185,129,0.08); color: #059669; }
.ob-vcard__pill--hide { background: rgba(239,68,68,0.08); color: #dc2626; }
.ob-vcard__pill--other { background: rgba(107,114,128,0.08); color: #6b7280; }

/* Changes list — always visible, scrollable, fills remaining height */
.ob-vcard__changelist {
	flex: 1;
	overflow-y: auto;
	padding: 4px 0;
	scrollbar-width: thin;
	scrollbar-color: #cbd5e1 transparent;
}
.ob-vcard__changelist::-webkit-scrollbar { width: 4px; }
.ob-vcard__changelist::-webkit-scrollbar-track { background: transparent; }
.ob-vcard__changelist::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }

.ob-vcard__ch {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 5px 16px;
	font-size: 11px;
	color: #475569;
	line-height: 1.5;
}
.ob-vcard__ch:hover { background: #f8fafc; }
.ob-vcard__ch-icon {
	flex-shrink: 0;
	width: 18px;
	height: 18px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 4px;
	font-size: 11px;
	font-weight: 700;
}
.ob-vcard__ch--style .ob-vcard__ch-icon { background: rgba(99,102,241,0.1); color: #6366f1; }
.ob-vcard__ch--insert .ob-vcard__ch-icon { background: rgba(16,185,129,0.1); color: #059669; }
.ob-vcard__ch--hide .ob-vcard__ch-icon { background: rgba(239,68,68,0.1); color: #dc2626; }
.ob-vcard__ch--other .ob-vcard__ch-icon { background: rgba(107,114,128,0.1); color: #6b7280; }
.ob-vcard__ch-text {
	flex: 1; min-width: 0;
	overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
	font-weight: 500;
}
.ob-vcard__sel {
	font-family: 'SF Mono','Monaco','Menlo','Consolas',monospace;
	font-size: 10px; font-weight: 400; color: #94a3b8;
}

/* Control card description */
.ob-vcard__control-desc {
	flex: 1;
	display: flex;
	align-items: center;
	padding: 0 16px;
}
.ob-vcard__control-desc p {
	margin: 0;
	font-size: 12px;
	line-height: 1.6;
	color: #94a3b8;
}

/* Responsive: stack on mobile */
@media (max-width: 782px) {
	.ob-vcard { flex-direction: column; height: auto; }
	.ob-vcard__left {
		width: 100%; height: 120px;
		border-right: none; border-bottom: 1px solid #e2e8f0;
	}
}

/* ====================================================================
   Results-page Visual Card (ob-res-vcard) — stacked: preview on top,
   changes below. Fits inside narrow variant-card columns.
   ==================================================================== */
.ob-res-vcard {
	display: flex;
	flex-direction: column;
	border-top: 1px solid #e2e8f0;
	overflow: hidden;
	/* Fill the full card width inside parents that use `align-items: center`
	   (e.g. `.opti-ab-vs-card`), preventing shrink-wrap to intrinsic content. */
	width: 100%;
	box-sizing: border-box;
}

/* ---- TOP: preview thumbnail ---- */
.ob-res-vcard__left {
	width: 100%;
	height: 160px;
	position: relative;
	overflow: hidden;
	background: #1e1b4b;
	border-bottom: 1px solid #e2e8f0;
}
.ob-res-vcard__left--empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	color: rgba(255,255,255,0.45);
	background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}
.ob-res-vcard__left--empty span {
	font-size: 10.5px;
	font-weight: 500;
	color: #94a3b8;
}
.ob-res-vcard__left--empty svg { opacity: 0.25; color: #94a3b8; }
.ob-res-vcard__iframe {
	width: 1440px;
	height: 900px;
	border: none;
	position: absolute;
	top: 0;
	left: 50%;
	transform-origin: top center;
	transform: translateX(-50%) scale(0.2);
	pointer-events: none;
}
.ob-res-vcard__loader {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

/* ---- BOTTOM: changes list ---- */
.ob-res-vcard__right {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}
.ob-res-vcard__toolbar {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	padding: 10px 14px;
	border-bottom: 1px solid #f1f5f9;
}
.ob-res-vcard__ve-btn {
	display: inline-flex !important;
	align-items: center;
	gap: 6px;
	font-size: 12px !important;
	padding: 5px 14px !important;
	border-radius: 6px !important;
}
.ob-res-vcard__control-info {
	display: flex;
	align-items: center;
	gap: 8px;
	color: #059669;
	font-size: 12px;
	font-weight: 600;
}
.ob-res-vcard__control-info svg { color: #059669; }
.ob-res-vcard__control-desc {
	flex: 1;
	display: flex;
	align-items: center;
	padding: 8px 14px;
}
.ob-res-vcard__control-desc p {
	margin: 0;
	font-size: 11.5px;
	line-height: 1.6;
	color: #94a3b8;
}
.ob-res-vcard__changelist {
	flex: 1;
	overflow-y: auto;
	padding: 4px 0;
	scrollbar-width: thin;
	scrollbar-color: #cbd5e1 transparent;
	max-height: 160px;
}
.ob-res-vcard__changelist::-webkit-scrollbar { width: 4px; }
.ob-res-vcard__changelist::-webkit-scrollbar-track { background: transparent; }
.ob-res-vcard__changelist::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }

.opti-ab-btn-add-variant,
.opti-ab-btn-add-goal {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 16px !important;
	border: 1px solid #e2e8f0 !important;
	border-radius: 8px !important;
	background: #fff !important;
	color: #374151 !important;
	font-size: 13px !important;
	transition: all 0.2s ease;
}

.opti-ab-btn-add-variant:hover,
.opti-ab-btn-add-goal:hover {
	border-color: #6366f1 !important;
	color: #6366f1 !important;
	background: #f5f3ff !important;
}

/* =========================================================================
   Goals List
   ========================================================================= */

.opti-ab-goals-list {
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin-bottom: 16px;
}

.opti-ab-goal-row {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	background: #f9fafb;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	padding: 16px;
}

.opti-ab-goal-row__fields {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.opti-ab-goal-row__remove {
	color: #ef4444;
	cursor: pointer;
	flex-shrink: 0;
	padding: 4px;
	background: none;
	border: none;
}

/* =========================================================================
   Goal Config Fields
   ========================================================================= */

/* Dynamic config container — populated by updateGoalConfigFields() in JS. */
.opti-ab-goal-config-fields {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

/* Field label inside goal config container. */
.opti-ab-goal-config-fields .opti-ab-field-label {
	display: block;
	font-size: 12px;
	font-weight: 600;
	color: #374151;
	margin-bottom: 2px;
}

/* Help text under goal config inputs. */
.opti-ab-field-help {
	font-size: 12px;
	color: #6b7280;
	margin: 2px 0 0;
}

/* URL input wrapper — used to position validation status icon. */
.opti-ab-goal-url-wrap {
	position: relative;
	display: flex;
	align-items: center;
	gap: 8px;
}

.opti-ab-goal-url-wrap .opti-ab-goal-url {
	flex: 1;
}

/* URL validation status indicator. */
.opti-ab-goal-url-status {
	flex-shrink: 0;
	font-size: 16px;
	line-height: 1;
	display: none;
}

.opti-ab-goal-url-wrap.is-valid .opti-ab-goal-url-status {
	display: inline;
	color: #16a34a;
}

.opti-ab-goal-url-wrap.is-valid .opti-ab-goal-url-status::before {
	content: '✓';
}

.opti-ab-goal-url-wrap.is-invalid .opti-ab-goal-url-status {
	display: inline;
	color: #dc2626;
}

.opti-ab-goal-url-wrap.is-invalid .opti-ab-goal-url-status::before {
	content: '✕';
}

.opti-ab-goal-url-wrap.is-invalid .opti-ab-goal-url {
	border-color: #fca5a5;
	box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Form mode dropdown wrapper. */
.opti-ab-goal-form-custom-wrap {
	margin-top: 4px;
}

/* =========================================================================
   Click Goal — Multi-Selector List
   ========================================================================= */

/* Container for all selector entries. */
.opti-ab-goal-selectors-list {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 4px 0;
}

/* Individual selector entry row. */
.opti-ab-goal-selector-entry {
	display: flex;
	align-items: center;
	gap: 6px;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 6px;
	padding: 6px 8px;
	transition: border-color 0.15s;
}

.opti-ab-goal-selector-entry:hover {
	border-color: #cbd5e1;
}

/* Main area: input + optional Pro select button (injected by Pro JS). */
.opti-ab-goal-selector-entry__main {
	flex: 1;
	display: flex;
	align-items: center;
	gap: 6px;
	min-width: 0;
}

.opti-ab-goal-selector-entry__main .opti-ab-goal-selector-input {
	flex: 1;
	min-width: 0;
	border: none;
	box-shadow: none;
	padding: 4px 6px;
	font-size: 13px;
	background: transparent;
}

.opti-ab-goal-selector-entry__main .opti-ab-goal-selector-input:focus {
	outline: none;
	box-shadow: none;
}

/* Remove (×) button for each entry. */
.opti-ab-goal-selector-entry__remove {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border: none;
	background: none;
	color: #9ca3af;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	border-radius: 4px;
	padding: 0;
	transition: color 0.15s, background 0.15s;
}

.opti-ab-goal-selector-entry__remove:hover {
	color: #ef4444;
	background: #fef2f2;
}

/* Wrapper for the two click-goal action buttons. */
.opti-ab-goal-click-actions {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
	margin-top: 2px;
}

/* "+ Add CSS Selector" and "✦ Pick Element Visually" buttons. */
.opti-ab-goal-add-selector,
.opti-ab-goal-pick-selector {
	display: inline-flex !important;
	align-items: center;
	gap: 4px;
	font-size: 12px !important;
	padding: 4px 10px !important;
	margin-top: 0;
}

/* Disabled Pro visual-picker button — visually distinct but not hidden. */
.opti-ab-goal-pick-selector[disabled],
.opti-ab-goal-pick-selector[aria-disabled="true"] {
	cursor: not-allowed !important;
	opacity: 0.7;
}

/* Pro help text — slightly muted to signal the field is locked. */
.opti-ab-field-help--pro {
	font-style: italic;
	color: #9ca3af;
}

/* =========================================================================
   Goal Config Fields — Pro disabled states
   ========================================================================= */

/* Scroll-depth: slider + number input side by side. */
.opti-ab-goal-scroll-wrap {
	display: flex;
	align-items: center;
	gap: 10px;
}

.opti-ab-goal-scroll-slider {
	flex: 1;
	height: 4px;
	accent-color: #6366f1;
	cursor: not-allowed;
	opacity: 0.5;
}

/* Wrapper for the numeric percentage input + '%' label. */
.opti-ab-goal-scroll-number-wrap {
	display: flex;
	align-items: center;
	gap: 4px;
	flex-shrink: 0;
}

.opti-ab-goal-scroll-number-wrap .opti-ab-goal-scroll-number {
	width: 60px;
	text-align: right;
}

/* Time-on-page: number input + unit select side by side. */
.opti-ab-goal-time-wrap {
	display: flex;
	align-items: center;
	gap: 8px;
}

.opti-ab-goal-time-wrap .opti-ab-goal-time-value {
	width: 80px;
}

.opti-ab-goal-time-wrap .opti-ab-goal-time-unit {
	flex-shrink: 0;
}

/* Unit label (e.g., '%' after a number input). */
.opti-ab-goal-unit-label {
	font-size: 13px;
	color: #6b7280;
	font-weight: 500;
}

/* Disabled input appearance within a goal config container. */
.opti-ab-goal-config-fields input:disabled,
.opti-ab-goal-config-fields select:disabled {
	opacity: 0.55;
	cursor: not-allowed;
	background-color: #f3f4f6;
}

/* "Requires Pro" placeholder shown for Pro-only goal types. */
.opti-ab-goal-pro-required {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 14px;
	background: #f5f3ff;
	border: 1px dashed #c4b5fd;
	border-radius: 8px;
}

.opti-ab-goal-pro-required__msg {
	margin: 0;
	font-size: 13px;
	color: #5b21b6;
}

/* =========================================================================
   Wizard Navigation
   ========================================================================= */

.opti-ab-wizard-nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 32px;
	border-top: 1px solid #f1f5f9;
	background: #f9fafb;
}

.opti-ab-wizard-nav__right {
	display: flex;
	gap: 8px;
	margin-left: auto;
}

/* Wizard nav buttons */
.opti-ab-wizard-nav .button {
	padding: 8px 18px !important;
	border-radius: 8px !important;
	font-size: 13px !important;
	font-weight: 500 !important;
	height: auto !important;
	line-height: 1.4 !important;
	border: 1px solid #e2e8f0 !important;
	transition: all 0.2s ease;
}

.opti-ab-wizard-nav .button-primary {
	background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
	border-color: transparent !important;
	color: #fff !important;
}

.opti-ab-wizard-nav .button-primary:hover {
	background: linear-gradient(135deg, #4f46e5, #7c3aed) !important;
	box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

/* =========================================================================
   Review Summary
   ========================================================================= */

/* Use high specificity to override the admin-notices.css rule that hides
   div[class*="review"]. Without !important the notice-hider wins. */
#opti-ab-wizard .opti-ab-review-summary {
	display: flex !important;
	flex-direction: column;
	gap: 16px;
	visibility: visible !important;
	opacity: 1 !important;
	height: auto !important;
	overflow: visible !important;
}

.opti-ab-review-section {
	background: #f9fafb;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	padding: 18px;
}

.opti-ab-review-section h4 {
	font-size: 14px;
	color: #374151;
	margin: 0 0 10px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.opti-ab-review-section table {
	width: 100%;
	border-collapse: collapse;
}

.opti-ab-review-section td {
	padding: 4px 8px;
	font-size: 13px;
	color: #1a1a1a;
	vertical-align: top;
}

.opti-ab-review-section td:first-child {
	font-weight: 600;
	color: #6c757d;
	width: 160px;
}

/* =========================================================================
   Results Page
   ========================================================================= */

/* Hero Metric Strip */
.opti-ab-results-hero {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
	margin-bottom: 20px;
}

.opti-ab-hero-card {
	background: rgba(255, 255, 255, 0.92);
	backdrop-filter: blur(12px);
	border: 1px solid rgba(99, 102, 241, 0.1);
	border-radius: 16px;
	padding: 24px 20px;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(0, 0, 0, 0.05);
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 8px;
	transition: transform 300ms ease, box-shadow 300ms ease;
	position: relative;
	overflow: hidden;
}

/* Top accent bar removed — icons now carry the color via tinted backgrounds */

.opti-ab-hero-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 8px 32px rgba(99, 102, 241, 0.15);
}

.opti-ab-hero-card__icon {
	width: 48px;
	height: 48px;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f8f9fa;
	flex-shrink: 0;
}

.opti-ab-hero-card__icon i[data-lucide],
.opti-ab-hero-card__icon svg {
	width: 24px;
	height: 24px;
	stroke-width: 2;
}

/* Hero icon color variants — matching errors page pattern */
.opti-ab-hero-card__icon--purple { background: rgba(139, 92, 246, 0.1); color: #8b5cf6; }
.opti-ab-hero-card__icon--blue { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.opti-ab-hero-card__icon--green { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.opti-ab-hero-card__icon--orange { background: rgba(249, 115, 22, 0.1); color: #f97316; }
.opti-ab-hero-card__icon--red { background: rgba(239, 68, 68, 0.1); color: #ef4444; }
.opti-ab-hero-card__icon--warning { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }

.opti-ab-hero-card__value {
	font-size: 40px;
	font-weight: 800;
	color: #1a1a1a;
	line-height: 1;
	font-variant-numeric: tabular-nums;
}

.opti-ab-hero-card__label {
	font-size: 12px;
	font-weight: 600;
	color: #6b7280;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

/* Target URL pill below hero strip */
.opti-ab-target-pill {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 16px;
	border-radius: 99px;
	background: #f5f3ff;
	border: 1px solid #e0e7ff;
	font-size: 13px;
	margin-bottom: 20px;
	color: #6366f1;
}

.opti-ab-target-pill a {
	color: #6366f1;
	text-decoration: none;
	font-weight: 500;
}

.opti-ab-target-pill a:hover {
	text-decoration: underline;
}

.opti-ab-target-pill i[data-lucide],
.opti-ab-target-pill svg {
	width: 14px;
	height: 14px;
	stroke-width: 2;
	flex-shrink: 0;
}

/* Legacy backward-compat: keep old summary/meta classes inert */
/* .opti-ab-results-summary — superseded by .opti-ab-results-hero */
/* .opti-ab-results-meta, .opti-ab-results-meta__item,
   .opti-ab-results-meta__label, .opti-ab-results-meta__value,
   .opti-ab-results-meta__link — superseded by hero card layout */

/* =========================================================================
   Goal Selector
   ========================================================================= */

.opti-ab-goal-selector {
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	padding: 16px 24px;
	margin-bottom: 20px;
	border: 1px solid rgba(99, 102, 241, 0.12);
}

.opti-ab-goal-selector__inner {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.opti-ab-goal-selector__inner label {
	font-size: 14px;
	font-weight: 600;
	color: #374151;
	margin: 0;
}

.opti-ab-goal-selector__inner select {
	min-width: 220px;
	padding: 6px 12px;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	font-size: 14px;
	color: #1a1a1a;
	background: #fff;
	cursor: pointer;
}

.opti-ab-goal-selector__inner select:focus {
	border-color: #6366f1;
	outline: none;
	box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}

#opti-ab-goal-type-badge {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	padding: 3px 10px;
	border-radius: 12px;
	background: #ede9fe;
	color: #6366f1;
}

.opti-ab-goal-config-info {
	margin-top: 8px;
	font-size: 13px;
	color: #6b7280;
}

.opti-ab-goal-config-info:empty {
	display: none;
}

.opti-ab-goal-config-label {
	font-weight: 600;
	color: #374151;
}

.opti-ab-goal-config-value {
	color: #6366f1;
}

.opti-ab-goal-config-info code {
	background: #f3f4f6;
	padding: 2px 6px;
	border-radius: 4px;
	font-size: 12px;
}

/* =========================================================================
   Radial Significance Gauge
   ========================================================================= */

.opti-ab-sig-gauge-wrap {
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
	border: 1px solid rgba(99, 102, 241, 0.1);
	padding: 28px 32px;
	margin-bottom: 20px;
	display: flex;
	align-items: center;
	gap: 32px;
	flex-wrap: wrap;
}

.opti-ab-sig-gauge {
	position: relative;
	flex-shrink: 0;
}

.opti-ab-sig-gauge__svg {
	display: block;
}

.opti-ab-sig-gauge__track {
	fill: none;
	stroke: #e2e8f0;
	stroke-width: 12;
}

.opti-ab-sig-gauge__arc {
	fill: none;
	stroke: #ef4444;
	stroke-width: 12;
	stroke-linecap: round;
	stroke-dasharray: 515;
	stroke-dashoffset: 515;
	transform: rotate(-90deg);
	transform-origin: 100px 100px;
	transition: stroke-dashoffset 800ms ease, stroke 600ms ease;
}

.opti-ab-sig-gauge__center {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
}

.opti-ab-sig-gauge__pct {
	font-size: 32px;
	font-weight: 800;
	color: #1a1a1a;
	line-height: 1;
}

.opti-ab-sig-gauge__label {
	font-size: 11px;
	font-weight: 600;
	color: #9ca3af;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-top: 4px;
}

.opti-ab-sig-gauge__info {
	flex: 1 1 220px;
	min-width: 220px;
}

.opti-ab-sig-gauge__title {
	font-size: 17px;
	font-weight: 700;
	color: #1a1a1a;
	margin-bottom: 8px;
}

.opti-ab-sig-gauge__hint {
	font-size: 14px;
	color: #6b7280;
	line-height: 1.6;
	margin-bottom: 12px;
}

.opti-ab-sig-gauge__threshold-label {
	display: inline-block;
	padding: 4px 12px;
	border-radius: 99px;
	background: #f5f3ff;
	color: #6366f1;
	font-size: 12px;
	font-weight: 600;
}

/* =========================================================================
   Per-Tab Goal Configuration Card
   Sits at the right of the Statistical Significance wrap, fills the empty
   space, and updates whenever the user switches goal tabs.
   ========================================================================= */

.opti-ab-goal-config-card {
	flex: 0 0 320px;
	max-width: 360px;
	min-width: 260px;
	background: linear-gradient(135deg, #faf5ff 0%, #eef2ff 100%);
	border: 1px solid rgba(99, 102, 241, 0.18);
	border-radius: 12px;
	padding: 16px 18px;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
	align-self: stretch;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.opti-ab-goal-config-card[hidden] {
	display: none !important;
}

.opti-ab-goal-config-card__header {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}

.opti-ab-goal-config-card__icon {
	flex: 0 0 32px;
	width: 32px;
	height: 32px;
	border-radius: 8px;
	background: #eef2ff;
	color: #6366f1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.opti-ab-goal-config-card__icon svg,
.opti-ab-goal-config-card__icon i {
	width: 18px;
	height: 18px;
}

.opti-ab-goal-config-card__titles {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
	flex: 1 1 auto;
}

.opti-ab-goal-config-card__eyebrow {
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.6px;
	color: #6366f1;
}

.opti-ab-goal-config-card__name {
	font-size: 15px;
	font-weight: 700;
	color: #1f2937;
	line-height: 1.25;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.opti-ab-goal-config-card__badge {
	flex: 0 0 auto;
	padding: 2px 8px;
	border-radius: 99px;
	background: #fef3c7;
	color: #92400e;
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.4px;
}

.opti-ab-goal-config-card__badge[hidden] {
	display: none !important;
}

.opti-ab-goal-config-card__badge--primary {
	background: #dbeafe;
	color: #1d4ed8;
}

.opti-ab-goal-config-card__body {
	margin: 0;
	padding: 10px 0 0;
	border-top: 1px dashed rgba(99, 102, 241, 0.18);
	display: flex;
	flex-direction: column;
	gap: 8px;
	font-size: 12.5px;
	color: #334155;
}

.opti-ab-goal-config-card__row {
	display: grid;
	grid-template-columns: 84px 1fr;
	gap: 8px;
	align-items: baseline;
}

.opti-ab-goal-config-card__row--stacked {
	grid-template-columns: 1fr;
	gap: 4px;
}

.opti-ab-goal-config-card__row dt {
	margin: 0;
	font-size: 10.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #64748b;
	line-height: 1.5;
}

.opti-ab-goal-config-card__row dd {
	margin: 0;
	color: #1f2937;
	font-weight: 500;
	word-break: break-word;
	line-height: 1.45;
}

.opti-ab-goal-config-card__row dd a {
	color: #4338ca;
	text-decoration: none;
	border-bottom: 1px solid rgba(67, 56, 202, 0.3);
}

.opti-ab-goal-config-card__row dd a:hover {
	border-bottom-color: #4338ca;
}

.opti-ab-goal-config-card__code {
	display: inline-block;
	padding: 2px 6px;
	background: rgba(255, 255, 255, 0.8);
	border: 1px solid rgba(99, 102, 241, 0.2);
	border-radius: 5px;
	font-family: 'SF Mono', Consolas, 'Liberation Mono', monospace;
	font-size: 11px;
	color: #1e1b4b;
	word-break: break-all;
	line-height: 1.5;
}

.opti-ab-goal-config-card__chip {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 99px;
	background: #fff;
	border: 1px solid rgba(99, 102, 241, 0.25);
	color: #4338ca;
	font-size: 11px;
	font-weight: 600;
	margin-right: 4px;
	margin-bottom: 2px;
}

.opti-ab-goal-config-card__list {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.opti-ab-goal-config-card__list li {
	margin: 0;
	padding: 0;
}

.opti-ab-goal-config-card__hint {
	font-size: 11.5px;
	color: #64748b;
	font-style: italic;
	line-height: 1.45;
}

/* Responsive: stack below the significance info on tablet/mobile. */
@media (max-width: 1024px) {
	.opti-ab-goal-config-card {
		flex: 1 1 100%;
		max-width: 100%;
	}
}

/* =========================================================================
   Variant Cards (Results)
   ========================================================================= */

.opti-ab-variant-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 16px;
	margin-bottom: 24px;
	/* Cap at 3 columns so 4+ variants wrap into multiple rows */
	max-width: 100%;
}
@media (min-width: 960px) {
	.opti-ab-variant-cards {
		grid-template-columns: repeat(3, 1fr);
	}
}

.opti-ab-variant-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	padding: 0;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	border: 2px solid #e2e8f0;
	overflow: hidden;
}

/* Stats body — height equalized by JS to align visual cards across columns */
.opti-ab-variant-card__body {
	padding: 20px;
}

.opti-ab-variant-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.opti-ab-variant-card--winner {
	border-color: #16a34a;
	background: #f0fdf4;
}

.opti-ab-variant-card--control {
	border-color: #93c5fd;
}

.opti-ab-variant-card__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 16px;
}

.opti-ab-variant-card__url {
	margin: -10px 0 10px;
	font-size: 12px;
	line-height: 1.4;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: 100%;
}
.opti-ab-variant-card__url a {
	color: #6366f1;
	text-decoration: none;
	opacity: 0.8;
	transition: opacity 0.2s;
}
.opti-ab-variant-card__url a:hover {
	opacity: 1;
	text-decoration: underline;
}
.opti-ab-variant-card__url em {
	color: #9ca3af;
	font-style: italic;
}

.opti-ab-variant-card__name {
	font-size: 16px;
	font-weight: 600;
	color: #1a1a1a;
}

.opti-ab-variant-card__rate {
	font-size: 48px;
	font-weight: 800;
	color: #1a1a1a;
	margin-bottom: 4px;
	font-variant-numeric: tabular-nums;
	line-height: 1;
}

.opti-ab-variant-card__improvement {
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 16px;
}

.opti-ab-variant-card__improvement--positive {
	color: #16a34a;
}

.opti-ab-variant-card__improvement--negative {
	color: #ef4444;
}

.opti-ab-variant-card__improvement--neutral {
	color: #6c757d;
}

.opti-ab-variant-card__significance {
	font-size: 12px;
	font-weight: 500;
	margin-bottom: 14px;
	padding: 4px 10px;
	border-radius: 6px;
	display: inline-block;
}

.opti-ab-variant-card__significance--pending {
	background: #f0f1f3;
	color: #6c757d;
}

.opti-ab-variant-card__significance--significant {
	background: #f0fdf4;
	color: #16a34a;
}

.opti-ab-variant-card__stats {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}

.opti-ab-variant-card__stat-item {
	font-size: 12px;
	color: #6c757d;
}

.opti-ab-variant-card__stat-item strong {
	display: block;
	font-size: 15px;
	color: #1a1a1a;
}

/* =========================================================================
   WooCommerce Variant Info Button + Modal (Results Page)
   ========================================================================= */

.opti-ab-woo-info-card {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 16px;
	border-top: 1px solid #f3f4f6;
	flex-wrap: wrap;
}

.opti-ab-woo-info-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	cursor: pointer;
}

.opti-ab-woo-info-changes {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 12px;
	color: #6b7280;
}

/* Modal overlay + dialog */
.opti-ab-woo-modal {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
}

.opti-ab-woo-modal__overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.5);
}

.opti-ab-woo-modal__dialog {
	position: relative;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
	width: 90%;
	max-width: 640px;
	max-height: 85vh;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.opti-ab-woo-modal__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 24px 16px;
	border-bottom: 1px solid #e5e7eb;
}

.opti-ab-woo-modal__header h3 {
	margin: 0;
	font-size: 17px;
	font-weight: 700;
	color: #1f2937;
}

.opti-ab-woo-modal__close {
	background: none;
	border: none;
	font-size: 24px;
	cursor: pointer;
	color: #9ca3af;
	line-height: 1;
	padding: 4px 8px;
	border-radius: 6px;
}

.opti-ab-woo-modal__close:hover {
	background: #f3f4f6;
	color: #1f2937;
}

.opti-ab-woo-modal__body {
	padding: 24px;
	overflow-y: auto;
	flex: 1;
}

.opti-ab-woo-modal__image {
	text-align: center;
	margin-bottom: 20px;
}

.opti-ab-woo-modal__image img {
	max-width: 200px;
	max-height: 160px;
	border-radius: 8px;
	border: 1px solid #e5e7eb;
	object-fit: cover;
}

.opti-ab-woo-modal__field {
	margin-bottom: 16px;
}

.opti-ab-woo-modal__field label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: #374151;
	margin-bottom: 6px;
}

.opti-ab-woo-modal__field input,
.opti-ab-woo-modal__field textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	font-size: 14px;
	color: #1f2937;
	background: #fff;
	box-sizing: border-box;
	transition: border-color 0.15s;
}

.opti-ab-woo-modal__field input:focus,
.opti-ab-woo-modal__field textarea:focus {
	border-color: #6366f1;
	outline: none;
	box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.opti-ab-woo-modal__field input[readonly],
.opti-ab-woo-modal__field textarea[readonly] {
	background: #f9fafb;
	color: #6b7280;
	cursor: default;
}

.opti-ab-woo-modal__row {
	display: flex;
	gap: 16px;
}

.opti-ab-woo-modal__field--half {
	flex: 1;
}

.opti-ab-woo-modal__footer {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
	padding: 16px 24px;
	border-top: 1px solid #e5e7eb;
	background: #f9fafb;
}

/* =========================================================================
   VS Variant Comparison Layout (2-variant tests)
   ========================================================================= */

.opti-ab-vs-layout {
	display: grid;
	grid-template-columns: 1fr 80px 1fr;
	gap: 0;
	margin-bottom: 24px;
	align-items: stretch;
	/* Span the full row of the parent `.opti-ab-variant-cards` grid so the
	   2-variant VS layout does not leave unused columns on the right. */
	grid-column: 1 / -1;
}

.opti-ab-vs-card {
	background: #fff;
	border-radius: 16px 0 0 16px;
	border: 2px solid #e2e8f0;
	padding: 32px 24px;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 12px;
	transition: box-shadow 300ms ease;
	position: relative;
}

.opti-ab-vs-card:last-child {
	border-radius: 0 16px 16px 0;
}

.opti-ab-vs-card--winner {
	border-color: #10b981;
	background: linear-gradient(180deg, #f0fdf4 0%, #fff 100%);
	box-shadow: 0 8px 32px rgba(16, 185, 129, 0.15);
}

.opti-ab-vs-card__crown {
	position: absolute;
	top: -16px;
	left: 50%;
	transform: translateX(-50%);
	background: linear-gradient(135deg, #10b981, #059669);
	width: 36px;
	height: 36px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.opti-ab-vs-card__crown i[data-lucide],
.opti-ab-vs-card__crown svg {
	width: 18px;
	height: 18px;
	stroke-width: 2;
}

.opti-ab-vs-card__label {
	font-size: 11px;
	font-weight: 700;
	color: #9ca3af;
	text-transform: uppercase;
	letter-spacing: 1px;
}

.opti-ab-vs-card__name {
	font-size: 18px;
	font-weight: 700;
	color: #1a1a1a;
}

.opti-ab-vs-card__rate {
	font-size: 48px;
	font-weight: 800;
	color: #1a1a1a;
	line-height: 1;
	font-variant-numeric: tabular-nums;
}

.opti-ab-vs-card--winner .opti-ab-vs-card__rate {
	color: #059669;
}

.opti-ab-vs-card__baseline {
	font-size: 13px;
	color: #9ca3af;
	font-weight: 500;
}

.opti-ab-vs-card__url {
	font-size: 12px;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.opti-ab-vs-card__url a {
	color: #6366f1;
	text-decoration: none;
}

.opti-ab-vs-card__url a:hover {
	text-decoration: underline;
}

.opti-ab-vs-card__sig {
	font-size: 12px;
	padding: 4px 12px;
	border-radius: 99px;
	font-weight: 600;
}

.opti-ab-vs-card__sig--significant {
	background: #f0fdf4;
	color: #10b981;
}

.opti-ab-vs-card__sig--pending {
	background: #f3f4f6;
	color: #6b7280;
}

.opti-ab-vs-card__stats {
	width: 100%;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	margin-top: 8px;
	padding-top: 16px;
	border-top: 1px solid #e2e8f0;
	text-align: left;
}

.opti-ab-vs-card__stats > div {
	font-size: 12px;
	color: #6b7280;
}

.opti-ab-vs-card__stats > div strong {
	display: block;
	font-size: 16px;
	color: #1a1a1a;
	font-weight: 700;
}

/* VS Divider */
.opti-ab-vs-divider {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 16px 0;
	z-index: 1;
}

.opti-ab-vs-divider__line {
	flex: 1;
	width: 2px;
	background: #e2e8f0;
	min-height: 20px;
}

.opti-ab-vs-divider__badge {
	background: #1a1a1a;
	color: #fff;
	font-size: 14px;
	font-weight: 900;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.opti-ab-vs-divider__improvement {
	writing-mode: vertical-lr;
	transform: rotate(180deg);
	font-size: 12px;
	font-weight: 700;
	/* Prevent the vertically-oriented text from overflowing below the VS badge
	   when the divider column is short (e.g. tests with no data yet). */
	overflow: hidden;
	max-height: 80px;
}

.opti-ab-vs-divider__improvement--positive {
	color: #10b981;
}

.opti-ab-vs-divider__improvement--negative {
	color: #ef4444;
}

.opti-ab-vs-divider__improvement--neutral {
	color: #9ca3af;
}

/* Responsive: VS layout */
@media (max-width: 782px) {
	.opti-ab-vs-layout {
		grid-template-columns: 1fr;
	}

	.opti-ab-vs-divider {
		flex-direction: row;
		width: 100%;
		writing-mode: unset;
	}

	.opti-ab-vs-divider__improvement {
		writing-mode: unset;
		transform: none;
	}

	.opti-ab-vs-card {
		border-radius: 16px !important;
	}

	.opti-ab-sig-gauge-wrap {
		flex-direction: column;
		text-align: center;
	}

	.opti-ab-winner-cta__inner {
		flex-direction: column;
		text-align: center;
	}

	.opti-ab-winner-cta__actions {
		justify-content: center;
	}
}

/* Responsive: Hero strip */
@media (max-width: 1200px) {
	.opti-ab-results-hero {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 782px) {
	.opti-ab-results-hero {
		grid-template-columns: 1fr;
	}
}

/* =========================================================================
   Chart
   ========================================================================= */

.opti-ab-chart-container {
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
	padding: 24px;
	margin-bottom: 24px;
	position: relative;
	max-height: 450px;
	overflow: hidden;
	border: 1px solid rgba(99, 102, 241, 0.08);
}

.opti-ab-chart-container h3 {
	font-size: 16px;
	font-weight: 700;
	margin: 0 0 4px;
	color: #1a1a1a;
}

.opti-ab-chart-container h3 > span:not(.ob-tooltip) {
	display: block;
	font-size: 12px;
	font-weight: 400;
	color: #9ca3af;
	margin-top: 2px;
}

.opti-ab-chart-empty {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	color: #9ca3af;
}

.opti-ab-chart-empty__icon {
	margin-bottom: 12px;
	color: #d1d5db;
}

.opti-ab-chart-empty p {
	font-size: 15px;
	font-weight: 600;
	color: #6b7280;
	margin: 0 0 4px;
}

.opti-ab-chart-empty span {
	font-size: 13px;
	color: #9ca3af;
}

/* =========================================================================
   Winner Actions Banner
   ========================================================================= */

.opti-ab-winner-cta {
	background: linear-gradient(135deg, #10b981 0%, #059669 50%, #047857 100%);
	border-radius: 16px;
	padding: 28px 32px;
	margin-bottom: 24px;
	box-shadow: 0 8px 32px rgba(16, 185, 129, 0.3);
}

.opti-ab-winner-cta__inner {
	display: flex;
	align-items: center;
	gap: 24px;
	flex-wrap: wrap;
}

.opti-ab-winner-cta__icon {
	width: 56px;
	height: 56px;
	flex-shrink: 0;
	background: rgba(255, 255, 255, 0.2);
	border-radius: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-size: 28px;
}

.opti-ab-winner-cta__icon i[data-lucide],
.opti-ab-winner-cta__icon svg {
	width: 28px;
	height: 28px;
	stroke-width: 2;
}

.opti-ab-winner-cta__copy {
	flex: 1;
	color: #fff;
}

.opti-ab-winner-cta__copy h3 {
	font-size: 20px;
	font-weight: 700;
	margin: 0 0 4px;
	color: #fff;
}

.opti-ab-winner-cta__copy p {
	font-size: 14px;
	margin: 0;
	color: rgba(255, 255, 255, 0.85);
}

.opti-ab-winner-cta__actions {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}

.opti-ab-winner-pill {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 24px;
	border-radius: 99px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	border: 2px solid transparent;
	transition: all 300ms ease;
	text-decoration: none;
}

.opti-ab-winner-pill--primary {
	background: #fff;
	color: #059669;
	border-color: #fff;
}

.opti-ab-winner-pill--primary:hover {
	background: transparent;
	color: #fff;
	border-color: #fff;
}

.opti-ab-winner-pill--secondary {
	background: transparent;
	color: #fff;
	border-color: rgba(255, 255, 255, 0.6);
}

.opti-ab-winner-pill--secondary:hover {
	background: rgba(255, 255, 255, 0.15);
	border-color: #fff;
}

.opti-ab-winner-pill--danger {
	background: #fff;
	color: #dc2626;
	border-color: #fff;
}

.opti-ab-winner-pill--danger:hover {
	background: rgba(255, 255, 255, 0.15);
	color: #fff;
	border-color: #fff;
}

/* Legacy backward-compat: old winner actions classes kept inert */
/* .opti-ab-winner-actions, .opti-ab-winner-actions h3,
   .opti-ab-winner-actions__buttons — superseded by .opti-ab-winner-cta */

/* =========================================================================
   Apply Winner Diff Preview Dialog
   ========================================================================= */

body.opti-ab-diff-open {
	overflow: hidden;
}

#opti-ab-diff-dialog.opti-ab-diff-dialog-overlay,
#opti-ab-diff-dialog {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 56px 24px 24px;
	background: rgba(15, 23, 42, 0.68);
	backdrop-filter: blur(4px);
	box-sizing: border-box;
	animation: opti-ab-diff-fade-in 0.18s ease;
}

.opti-ab-diff-dialog {
	width: min(920px, 100%);
	max-height: min(760px, calc(100vh - 96px));
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background: #fff;
	border: 1px solid rgba(99, 102, 241, 0.14);
	border-radius: 18px;
	box-shadow: 0 28px 90px rgba(15, 23, 42, 0.34), 0 8px 30px rgba(15, 23, 42, 0.14);
	animation: opti-ab-diff-scale-in 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.opti-ab-diff-dialog-hdr {
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 12px;
	padding: 20px 24px 18px;
	background: linear-gradient(135deg, #f8fafc 0%, #f5f3ff 100%);
	border-bottom: 1px solid rgba(99, 102, 241, 0.12);
	flex-shrink: 0;
}

.opti-ab-diff-dialog-title {
	margin: 0;
	color: #111827;
	font-size: 18px;
	font-weight: 800;
	line-height: 1.25;
	letter-spacing: -0.01em;
}

.opti-ab-diff-type-pill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 26px;
	padding: 5px 10px;
	border-radius: 999px;
	background: linear-gradient(135deg, #ede9fe, #e0e7ff);
	color: #5b21b6;
	font-size: 10px;
	font-weight: 800;
	line-height: 1;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	white-space: nowrap;
	border: 1px solid rgba(99, 102, 241, 0.16);
}

.opti-ab-diff-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 1px solid rgba(148, 163, 184, 0.2);
	border-radius: 999px;
	background: #fff;
	color: #64748b;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	transition: all 0.18s ease;
}

.opti-ab-diff-close:hover,
.opti-ab-diff-close:focus {
	background: #fee2e2;
	border-color: #fecaca;
	color: #dc2626;
	outline: none;
	box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.16);
}

.opti-ab-diff-dialog-body {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	overflow-x: hidden;
	padding: 22px 24px;
	-webkit-overflow-scrolling: touch;
}

.opti-ab-diff-type-sentence {
	margin: 0 0 14px;
	padding: 14px 16px;
	border: 1px solid rgba(99, 102, 241, 0.14);
	border-radius: 12px;
	background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
	color: #334155;
	font-size: 14px;
	line-height: 1.55;
}

.opti-ab-diff-target {
	margin: 0 0 14px;
	padding: 12px 14px;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	background: #f9fafb;
	color: #374151;
	font-size: 13px;
	line-height: 1.5;
}

.opti-ab-diff-target strong {
	color: #111827;
}

.opti-ab-diff-edit-link {
	color: #4f46e5;
	font-weight: 700;
	text-decoration: none;
}

.opti-ab-diff-edit-link:hover,
.opti-ab-diff-edit-link:focus {
	text-decoration: underline;
}

.opti-ab-diff-warnings {
	margin: 0 0 14px;
}

.opti-ab-diff-warning {
	display: flex;
	gap: 8px;
	align-items: flex-start;
	margin: 0 0 8px;
	padding: 11px 13px;
	border: 1px solid #fde68a;
	border-radius: 10px;
	background: #fffbeb;
	color: #92400e;
	font-size: 13px;
	line-height: 1.45;
}

.opti-ab-diff-warning-icon {
	flex-shrink: 0;
}

.opti-ab-diff-table {
	width: 100%;
	table-layout: fixed;
	border-collapse: separate;
	border-spacing: 0;
	overflow: hidden;
	border: 1px solid #e5e7eb;
	border-radius: 14px;
	background: #fff;
	font-size: 13px;
}

.opti-ab-diff-table thead {
	background: #f8fafc;
}

.opti-ab-diff-table th {
	padding: 11px 14px;
	text-align: left;
	border-bottom: 1px solid #e5e7eb;
	color: #64748b;
	font-size: 11px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.07em;
}

.opti-ab-diff-table th:first-child {
	width: 20%;
}

.opti-ab-diff-table th:nth-child(2),
.opti-ab-diff-table th:nth-child(3) {
	width: 40%;
}

.opti-ab-diff-table td {
	padding: 13px 14px;
	vertical-align: top;
	border-bottom: 1px solid #f1f5f9;
	color: #334155;
	line-height: 1.5;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.opti-ab-diff-table tr:last-child td {
	border-bottom: 0;
}

.opti-ab-diff-field {
	color: #111827 !important;
	font-weight: 800;
}

.opti-ab-diff-from {
	color: #64748b !important;
	background: #f8fafc;
}

.opti-ab-diff-to {
	color: #065f46 !important;
	background: #ecfdf5;
}

.opti-ab-diff-cell-content {
	max-width: 100%;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.opti-ab-diff-row--unchanged td {
	opacity: 0.62;
}

.opti-ab-diff-row--unchanged .opti-ab-diff-to {
	background: #fff;
	color: #64748b !important;
}

.opti-ab-diff-badge {
	display: inline-flex;
	align-items: center;
	padding: 2px 7px;
	border-radius: 999px;
	border: 1px solid #e5e7eb;
	background: #f8fafc;
	color: #64748b;
	font-size: 10px;
	font-weight: 700;
	margin-left: 6px;
}

.opti-ab-diff-empty {
	color: #94a3b8;
	font-style: italic;
}

.opti-ab-diff-numeric,
.opti-ab-diff-array,
.opti-ab-diff-code {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 12px;
}

.opti-ab-diff-show-full,
.opti-ab-diff-hide-full {
	display: inline;
	margin-left: 6px;
	padding: 0;
	border: 0;
	background: transparent;
	color: #4f46e5;
	font-size: 12px;
	font-weight: 700;
	text-decoration: underline;
	cursor: pointer;
}

.opti-ab-diff-note {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin: 14px 0 0;
	padding: 12px 14px;
	border: 1px solid #dbeafe;
	border-radius: 10px;
	background: #eff6ff;
	color: #1e40af;
	font-size: 12.5px;
	line-height: 1.45;
}

.opti-ab-diff-note::before {
	content: "ⓘ";
	font-weight: 800;
}

.opti-ab-diff-no-changes {
	padding: 24px 14px !important;
	color: #64748b;
	text-align: center;
	font-style: italic;
}

.opti-ab-diff-dialog-footer {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
	padding: 16px 24px 20px;
	border-top: 1px solid rgba(99, 102, 241, 0.12);
	background: #fff;
	flex-shrink: 0;
	box-shadow: 0 -10px 24px rgba(15, 23, 42, 0.04);
}

.opti-ab-diff-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	min-width: 132px;
	padding: 10px 20px;
	border: 1px solid transparent;
	border-radius: 10px;
	font-size: 13px;
	font-weight: 800;
	line-height: 1;
	cursor: pointer;
	transition: all 0.18s ease;
	white-space: nowrap;
}

.opti-ab-diff-btn--cancel {
	background: #fff;
	border-color: #dbe3ef;
	color: #334155;
}

.opti-ab-diff-btn--cancel:hover,
.opti-ab-diff-btn--cancel:focus {
	background: #f8fafc;
	border-color: #94a3b8;
	outline: none;
}

.opti-ab-diff-btn--commit {
	background: linear-gradient(135deg, #4f46e5, #7c3aed);
	border-color: #4f46e5;
	color: #fff;
	box-shadow: 0 10px 20px rgba(79, 70, 229, 0.22);
}

.opti-ab-diff-btn--commit:hover,
.opti-ab-diff-btn--commit:focus {
	background: linear-gradient(135deg, #4338ca, #6d28d9);
	border-color: #4338ca;
	color: #fff;
	outline: none;
	transform: translateY(-1px);
}

.opti-ab-diff-btn:focus-visible {
	outline: 2px solid #6366f1;
	outline-offset: 2px;
}

.opti-ab-diff-btn:disabled {
	opacity: 0.55;
	cursor: not-allowed;
	transform: none;
}

@keyframes opti-ab-diff-fade-in {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes opti-ab-diff-scale-in {
	from {
		opacity: 0;
		transform: translateY(12px) scale(0.98);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

@media screen and (max-width: 782px) {
	#opti-ab-diff-dialog.opti-ab-diff-dialog-overlay,
	#opti-ab-diff-dialog {
		align-items: stretch;
		padding: 48px 12px 12px;
	}

	.opti-ab-diff-dialog {
		max-height: calc(100vh - 60px);
		border-radius: 14px;
	}

	.opti-ab-diff-dialog-hdr {
		grid-template-columns: 1fr auto;
		gap: 8px;
		padding: 16px;
	}

	.opti-ab-diff-type-pill {
		grid-column: 1 / -1;
		justify-self: start;
	}

	.opti-ab-diff-dialog-title {
		font-size: 16px;
	}

	.opti-ab-diff-dialog-body {
		padding: 16px;
	}

	.opti-ab-diff-table,
	.opti-ab-diff-table thead,
	.opti-ab-diff-table tbody,
	.opti-ab-diff-table tr,
	.opti-ab-diff-table th,
	.opti-ab-diff-table td {
		display: block;
		width: 100%;
	}

	.opti-ab-diff-table thead {
		display: none;
	}

	.opti-ab-diff-table tr {
		border-bottom: 1px solid #e5e7eb;
	}

	.opti-ab-diff-table tr:last-child {
		border-bottom: 0;
	}

	.opti-ab-diff-table td {
		border-bottom: 1px solid #f1f5f9;
	}

	.opti-ab-diff-table td::before {
		content: attr(data-label);
		display: block;
		margin-bottom: 4px;
		color: #64748b;
		font-size: 10px;
		font-weight: 800;
		text-transform: uppercase;
		letter-spacing: 0.07em;
	}

	.opti-ab-diff-dialog-footer {
		flex-direction: column-reverse;
		padding: 14px 16px 16px;
	}

	.opti-ab-diff-btn {
		width: 100%;
	}
}

/* =========================================================================
   Action Button (Results page)
   ========================================================================= */

.opti-ab-action-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

/* =========================================================================
   Toast Notifications
   ========================================================================= */

.opti-ab-toast {
	position: fixed;
	bottom: 24px;
	right: 24px;
	padding: 14px 24px;
	background: #1e293b;
	color: #fff;
	border-radius: 12px;
	font-size: 13px;
	font-weight: 500;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
	z-index: 99999;
	opacity: 0;
	transform: translateY(10px);
	transition: opacity 0.3s, transform 0.3s;
}

.opti-ab-toast.show {
	opacity: 1;
	transform: translateY(0);
}

.opti-ab-toast--success {
	background: #16a34a;
}

.opti-ab-toast--error {
	background: #ef4444;
}

/* =========================================================================
   Legacy Header Support (backward compat, hidden in new design)
   ========================================================================= */

.opti-ab-header {
	display: none;
}

/* =========================================================================
   Responsive
   ========================================================================= */

@media (max-width: 1200px) {
	.opti-ab-stats-bar {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 782px) {
	.opti-ab-page-header {
		padding: 20px 20px;
	}

	.opti-ab-page-header__content {
		flex-direction: column;
		text-align: center;
	}

	.opti-ab-page-header__title-section {
		flex-direction: column;
	}

	.opti-ab-subpage-header {
		padding: 18px 20px;
	}

	.opti-ab-subpage-header__content {
		flex-direction: column;
	}

	.opti-ab-content {
		padding: 0 15px 20px;
	}

	.opti-ab-stats-bar {
		grid-template-columns: 1fr;
	}

	.opti-ab-filters {
		flex-direction: column;
		align-items: stretch;
	}

	.opti-ab-filters__left {
		flex-direction: column;
	}

	.opti-ab-search-wrapper .opti-ab-input {
		width: 100%;
	}

	.opti-ab-test-card {
		grid-template-columns: 1fr;
		gap: 12px;
	}

	.opti-ab-test-card__stats {
		justify-self: start;
	}

	.opti-ab-test-card__actions {
		justify-self: start;
	}

	.opti-ab-wizard-step__label {
		display: none;
	}

	.opti-ab-type-grid {
		grid-template-columns: 1fr 1fr;
	}

	.opti-ab-settings-grid {
		grid-template-columns: 1fr;
	}

	.opti-ab-variant-cards {
		grid-template-columns: 1fr;
	}

	.opti-ab-wizard-nav {
		padding: 14px 20px;
	}
}

/* =========================================================================
   Pagination
   ========================================================================= */

.opti-ab-pagination {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	margin-top: 20px;
}

.opti-ab-pagination__controls {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 4px;
}

.opti-ab-pagination__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	padding: 0 10px;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	background: #fff;
	color: #374151;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease;
	line-height: 1;
	text-decoration: none;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.opti-ab-pagination__btn:hover:not(:disabled):not(.is-active) {
	border-color: #6366f1;
	color: #6366f1;
	background: #f5f3ff;
}

.opti-ab-pagination__btn:focus {
	outline: none;
	box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.opti-ab-pagination__btn.is-active {
	background: linear-gradient(135deg, #6366f1, #8b5cf6);
	border-color: transparent;
	color: #fff;
	font-weight: 600;
	cursor: default;
	box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}

.opti-ab-pagination__btn:disabled {
	opacity: 0.4;
	cursor: default;
	pointer-events: none;
}

.opti-ab-pagination__info {
	font-size: 12px;
	color: #6c757d;
	text-align: center;
	line-height: 1.4;
}

/* =========================================================================
   Custom Confirm Modal (Delete)
   ========================================================================= */

@keyframes opti-ab-modal-fade-in {
	from { opacity: 0; }
	to   { opacity: 1; }
}

@keyframes opti-ab-modal-scale-in {
	from {
		opacity: 0;
		transform: scale(0.93) translateY(-8px);
	}
	to {
		opacity: 1;
		transform: scale(1) translateY(0);
	}
}

.opti-ab-confirm-overlay {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.55);
	z-index: 999999;
	align-items: center;
	justify-content: center;
}

.opti-ab-confirm-overlay.is-visible {
	display: flex;
	animation: opti-ab-modal-fade-in 0.2s ease;
}

.opti-ab-confirm-modal {
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18), 0 4px 16px rgba(0, 0, 0, 0.1);
	padding: 36px 32px 32px;
	max-width: 420px;
	width: 90%;
	text-align: center;
	animation: opti-ab-modal-scale-in 0.25s ease;
	position: relative;
}

.opti-ab-confirm-modal__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: #fee2e2;
	color: #ef4444;
	margin: 0 auto 20px;
	flex-shrink: 0;
}

.opti-ab-confirm-modal__icon svg {
	width: 28px;
	height: 28px;
}

.opti-ab-confirm-modal__title {
	font-size: 18px;
	font-weight: 700;
	color: #1a1a1a;
	margin: 0 0 10px;
	line-height: 1.3;
}

.opti-ab-confirm-modal__message {
	font-size: 14px;
	color: #6c757d;
	line-height: 1.6;
	margin: 0 0 28px;
}

.opti-ab-confirm-modal__actions {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: center;
	gap: 10px;
	flex-wrap: wrap;
}

.opti-ab-confirm-modal__btn-cancel,
.opti-ab-confirm-modal__btn-delete,
.opti-ab-confirm-modal__btn-danger,
.opti-ab-confirm-modal__btn-primary {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 10px 24px;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
	line-height: 1.4;
	border: 1px solid transparent;
	text-decoration: none;
	min-width: 110px;
}

.opti-ab-confirm-modal__btn-cancel {
	background: #fff;
	border-color: #e2e8f0;
	color: #374151;
}

.opti-ab-confirm-modal__btn-cancel:hover,
.opti-ab-confirm-modal__btn-cancel:focus {
	border-color: #6366f1;
	color: #6366f1;
	background: #f5f3ff;
	outline: none;
}

.opti-ab-confirm-modal__btn-delete,
.opti-ab-confirm-modal__btn-danger {
	background: #ef4444;
	border-color: #ef4444;
	color: #fff;
}

.opti-ab-confirm-modal__btn-delete:hover,
.opti-ab-confirm-modal__btn-delete:focus,
.opti-ab-confirm-modal__btn-danger:hover,
.opti-ab-confirm-modal__btn-danger:focus {
	background: #dc2626;
	border-color: #dc2626;
	color: #fff;
	box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
	outline: none;
}

.opti-ab-confirm-modal__btn-primary {
	background: linear-gradient(135deg, #4f46e5, #7c3aed);
	border-color: #4f46e5;
	color: #fff;
}

.opti-ab-confirm-modal__btn-primary:hover,
.opti-ab-confirm-modal__btn-primary:focus {
	background: linear-gradient(135deg, #4338ca, #6d28d9);
	border-color: #4338ca;
	color: #fff;
	box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
	outline: none;
}

/* Responsive — pagination & modal on small screens */
@media (max-width: 782px) {
	.opti-ab-pagination__btn {
		min-width: 32px;
		height: 32px;
		padding: 0 8px;
		font-size: 12px;
	}

	.opti-ab-confirm-modal {
		padding: 28px 20px 24px;
	}

	.opti-ab-confirm-modal__actions {
		flex-direction: column;
	}

	.opti-ab-confirm-modal__btn-cancel,
	.opti-ab-confirm-modal__btn-delete,
	.opti-ab-confirm-modal__btn-danger,
	.opti-ab-confirm-modal__btn-primary {
		width: 100%;
	}
}

/* =========================================================================
   Results Page — Tab Bar (.opti-ab-tabs / .opti-ab-tab)
   ========================================================================= */

.opti-ab-tabs {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 0;
	margin: 0 0 24px 0;
	padding: 0;
	border-bottom: 2px solid #e5e7eb;
	list-style: none;
}

.opti-ab-tab {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 10px 18px;
	margin-bottom: -2px;          /* Overlap the tablist border so active border merges */
	background: transparent;
	border: 2px solid transparent;
	border-bottom: 2px solid transparent;
	border-radius: 6px 6px 0 0;
	font-family: inherit;
	font-size: 14px;
	font-weight: 500;
	color: #6b7280;
	cursor: pointer;
	white-space: nowrap;
	transition: color 0.15s ease, background 0.15s ease;
	outline: none;
	line-height: 1.4;
}

.opti-ab-tab:hover {
	color: #374151;
	background: rgba(99, 102, 241, 0.04);
}

.opti-ab-tab:focus-visible {
	outline: 2px solid #6366f1;
	outline-offset: 2px;
}

.opti-ab-tab--active {
	color: #6366f1;
	border-bottom-color: #6366f1;
	font-weight: 600;
	background: transparent;
}

.opti-ab-tab--active:hover {
	color: #4f46e5;
	background: transparent;
}

/* "Primary" pill badge inside a goal tab */
.opti-ab-tab__primary-badge {
	display: inline-block;
	padding: 1px 6px;
	background: #ede9fe;
	color: #5b21b6;
	border-radius: 10px;
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	vertical-align: middle;
	line-height: 1.6;
}

/* =========================================================================
   Results Page — Tab Panels (.opti-ab-tabpanel)
   ========================================================================= */

.opti-ab-tabpanel {
	display: block;
}

/* HTML hidden attribute — used by JS to toggle panels */
.opti-ab-tabpanel[hidden] {
	display: none !important;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
	.opti-ab-tab {
		padding: 8px 14px;
		font-size: 13px;
	}
}

@media (max-width: 600px) {
	/* Stack tabs vertically on very narrow screens */
	.opti-ab-tabs {
		flex-direction: column;
		align-items: stretch;
		border-bottom: none;
		margin-bottom: 12px;
		gap: 2px;
	}

	.opti-ab-tab {
		border: none;
		border-left: 3px solid transparent;
		border-radius: 4px;
		margin-bottom: 0;
		padding: 10px 14px;
		justify-content: flex-start;
	}

	.opti-ab-tab--active {
		border-left-color: #6366f1;
		background: #f5f3ff;
	}

	.opti-ab-tab--active:hover {
		background: #f5f3ff;
	}
}

/* =========================================================================
   Goal Panel Loading Overlay
   Shows a translucent overlay with spinner while fresh goal data loads.
   Cached tab switches bypass this entirely for instant feedback.
   ========================================================================= */

#opti-ab-goal-panel {
	position: relative;
}

.opti-ab-goal-loading-overlay {
	position: absolute;
	inset: 0;
	background: rgba(255, 255, 255, 0.75);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 10;
	border-radius: 12px;
	backdrop-filter: blur(2px);
	-webkit-backdrop-filter: blur(2px);
	animation: optiAbOverlayFadeIn 0.15s ease-out;
}

@keyframes optiAbOverlayFadeIn {
	from { opacity: 0; }
	to   { opacity: 1; }
}

/* =========================================================================
   WooCommerce Product Picker
   ========================================================================= */

.opti-ab-woo-product-picker {
	border: 1px solid #e0e0e0;
	border-radius: 10px;
	background: #fff;
	overflow: hidden;
}

/* Search Bar */
.opti-ab-woo-picker__search-bar {
	display: flex;
	gap: 12px;
	padding: 16px;
	border-bottom: 1px solid #eee;
	background: #fafbfc;
}

.opti-ab-woo-picker__search-wrap {
	flex: 1;
	position: relative;
	display: flex;
	align-items: center;
}

.opti-ab-woo-picker__search-wrap svg {
	position: absolute;
	left: 12px;
	color: #999;
	pointer-events: none;
}

.opti-ab-woo-picker__search-wrap input {
	padding-left: 36px !important;
}

.opti-ab-woo-picker__search-bar .opti-ab-select {
	min-width: 180px;
}

/* Product List */
.opti-ab-woo-picker__product-list {
	max-height: 400px;
	overflow-y: auto;
	padding: 8px;
}

.opti-ab-woo-picker__product-list .opti-ab-loading {
	padding: 40px 16px;
	text-align: center;
}

.opti-ab-woo-picker__product-item {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 12px 14px;
	border: 2px solid transparent;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.15s ease;
}

.opti-ab-woo-picker__product-item:hover {
	background: #f5f0ff;
	border-color: #e0d4f5;
}

.opti-ab-woo-picker__product-item.is-selected {
	background: #f0eaff;
	border-color: #7c3aed;
}

.opti-ab-woo-picker__product-thumb {
	width: 56px;
	height: 56px;
	border-radius: 8px;
	object-fit: cover;
	background: #f3f4f6;
	flex-shrink: 0;
	border: 1px solid #e5e7eb;
}

.opti-ab-woo-picker__product-info {
	flex: 1;
	min-width: 0;
}

.opti-ab-woo-picker__product-name {
	font-weight: 600;
	font-size: 14px;
	color: #1e1e1e;
	margin: 0 0 2px 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.opti-ab-woo-picker__product-meta {
	display: flex;
	gap: 12px;
	font-size: 12px;
	color: #666;
	flex-wrap: wrap;
}

.opti-ab-woo-picker__product-meta-price {
	font-weight: 600;
	color: #059669;
}

.opti-ab-woo-picker__product-meta-sku {
	color: #888;
}

.opti-ab-woo-picker__product-meta-category {
	color: #7c3aed;
}

.opti-ab-woo-picker__product-meta-stock--instock {
	color: #059669;
}

.opti-ab-woo-picker__product-meta-stock--outofstock {
	color: #dc2626;
}

.opti-ab-woo-picker__product-meta-stock--onbackorder {
	color: #d97706;
}

.opti-ab-woo-picker__product-select-btn {
	flex-shrink: 0;
	padding: 6px 14px;
	border-radius: 6px;
	font-size: 12px;
	font-weight: 600;
	border: 1px solid #7c3aed;
	background: transparent;
	color: #7c3aed;
	cursor: pointer;
	transition: all 0.15s ease;
}

.opti-ab-woo-picker__product-select-btn:hover {
	background: #7c3aed;
	color: #fff;
}

.opti-ab-woo-picker__product-item.is-selected .opti-ab-woo-picker__product-select-btn {
	background: #7c3aed;
	color: #fff;
}

/* No products / Load more */
.opti-ab-woo-picker__no-products {
	text-align: center;
	padding: 40px 16px;
	color: #888;
	font-size: 14px;
}

.opti-ab-woo-picker__no-products svg {
	display: block;
	margin: 0 auto 12px;
	color: #ccc;
}

.opti-ab-woo-picker__load-more {
	display: block;
	width: 100%;
	padding: 10px;
	text-align: center;
	border: none;
	background: #f5f0ff;
	color: #7c3aed;
	font-weight: 600;
	font-size: 13px;
	cursor: pointer;
	border-radius: 6px;
	margin-top: 8px;
	transition: background 0.15s;
}

.opti-ab-woo-picker__load-more:hover {
	background: #ede5ff;
}

/* Selected Product Preview Card */
.opti-ab-woo-picker__selected {
	padding: 16px;
	border-top: 1px solid #eee;
}

.opti-ab-woo-picker__selected-inner {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 16px;
	background: linear-gradient(135deg, #f5f0ff 0%, #ede5ff 100%);
	border-radius: 10px;
	border: 1px solid #e0d4f5;
}

.opti-ab-woo-picker__selected-inner img {
	width: 64px;
	height: 64px;
	border-radius: 8px;
	object-fit: cover;
	border: 2px solid #fff;
	box-shadow: 0 2px 6px rgba(124, 58, 237, 0.15);
	flex-shrink: 0;
}

.opti-ab-woo-picker__selected-info {
	flex: 1;
	min-width: 0;
}

.opti-ab-woo-picker__selected-info h4 {
	margin: 0 0 4px 0;
	font-size: 15px;
	font-weight: 700;
	color: #1e1e1e;
}

.opti-ab-woo-picker__selected-meta {
	display: flex;
	gap: 12px;
	font-size: 12px;
	color: #666;
	margin-bottom: 4px;
	flex-wrap: wrap;
}

.opti-ab-woo-picker__price {
	font-weight: 700;
	color: #059669;
	font-size: 13px;
}

.opti-ab-woo-picker__sku {
	color: #888;
}

.opti-ab-woo-picker__stock {
	font-weight: 500;
}

.opti-ab-woo-picker__desc {
	margin: 0;
	font-size: 12px;
	color: #666;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: 400px;
}

.opti-ab-woo-picker__selected-inner .button {
	flex-shrink: 0;
}

/* =========================================================================
   Tooltip overflow — allow .ob-tooltip-content to escape clipping containers
   ========================================================================= */

.opti-ab-wizard-panel,
.opti-ab-stats-bar,
.opti-ab-stat-card,
.opti-ab-stat-card__body,
.opti-ab-filters,
.opti-ab-filter-wrap,
.opti-ab-results-hero,
.opti-ab-hero-card,
.opti-ab-sig-gauge-wrap,
.opti-ab-sig-gauge__info,
.opti-ab-goal-selector,
.opti-ab-goal-selector__inner,
.opti-ab-chart-container,
.opti-ab-winner-cta,
.opti-ab-winner-cta__inner,
.opti-ab-winner-cta__actions,
.opti-ab-limits-notice,
.opti-ab-page-header,
.opti-ab-page-header__content,
.opti-ab-page-header__title-section,
.opti-ab-page-header__actions,
.opti-ab-subpage-header,
.opti-ab-subpage-header__content,
.opti-ab-wizard-steps,
.opti-ab-wizard-step,
.opti-ab-wizard-step__label,
.opti-ab-type-card,
.opti-ab-form-group,
.opti-ab-goal-config-card,
.opti-ab-goal-config-card__eyebrow,
.opti-ab-search-wrapper {
    overflow: visible;
}

/* Filter wrap — inline flex for tooltip icon + select */
.opti-ab-filter-wrap {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* =========================================================================
   Pro-section card — mirrored from ab-testing-pro.css to style disabled
   placeholder sections in the free plugin (Step 5 — Settings).
   When Pro is active the PHP conditional skips this markup entirely, so
   there is no conflict between these rules and the Pro plugin's own CSS.
   ========================================================================= */

.opti-ab-pro-section {
    background: #fff;
    border: 1px solid rgba(99, 102, 241, 0.08);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.opti-ab-pro-section__title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.opti-ab-pro-section__title svg {
    width: 20px;
    height: 20px;
    color: #6366f1;
    flex-shrink: 0;
    stroke-width: 2;
}

.opti-ab-pro-section__desc {
    color: #6b7280;
    font-size: 13px;
    margin: 0 0 16px 0;
}

/* Disabled placeholder overlay */
.opti-ab-pro-section--placeholder {
    opacity: 0.72;
    cursor: default;
}

.opti-ab-pro-section--placeholder input,
.opti-ab-pro-section--placeholder select,
.opti-ab-pro-section--placeholder button {
    cursor: not-allowed !important;
}

/* Schedule grid (2-col) */
.opti-ab-schedule-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.opti-ab-form-group--full {
    grid-column: 1 / -1;
}

/* Day chip picker */
.opti-ab-days-picker {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.opti-ab-day-toggle {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.opti-ab-day-toggle input[type="checkbox"] {
    display: none;
}

.opti-ab-day-toggle span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 36px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    background: #f3f4f6;
    font-size: 12px;
    font-weight: 500;
    color: #9ca3af;
}

.opti-ab-day-toggle input:checked + span {
    background: #6366f1;
    border-color: #6366f1;
    color: #fff;
    font-weight: 700;
}

/* Targeting skeleton group */
.opti-ab-targeting-group {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
}

.opti-ab-targeting-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.opti-ab-targeting-group-label {
    font-weight: 600;
    font-size: 13px;
    color: #374151;
}

.opti-ab-targeting-rule {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.opti-ab-targeting-rule .opti-ab-select {
    min-width: 140px;
}

.opti-ab-targeting-rule .opti-ab-input {
    flex: 1;
    min-width: 120px;
}

.opti-ab-btn-add-group {
    margin-top: 4px;
}
