/**
 * Options Page Builder - Admin Styles
 * Options Page Builder admin UI
 *
 * @package OptionsPageBuilder
 * @since 1.0.0
 */

/* Theme-aware tokens — aligned with other PowerSuite admin modules */
.wpps-opb-page,
.wpps-opb-live-page,
.wpps-opb-modal {
	--wpps-accent: var(--wp-admin-theme-color, #2271b1);
	--wpps-accent-hover: var(--wp-admin-theme-color-darker-10, #135e96);
	--wpps-accent-surface: color-mix(in srgb, var(--wp-admin-theme-color, #2271b1) 12%, #fff);
	--opb-blue: var(--wpps-accent);
	--opb-blue-hover: var(--wpps-accent-hover);
	--opb-black: #1d2327;
	--opb-gray: #646970;
	--opb-border: #c3c4c7;
	--opb-bg: #f6f7f7;
	--opb-radius: 4px;
	--opb-radius-sm: 4px;
	--opb-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
	--opb-shadow-md: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Layout — margins match other PowerSuite module wraps (width: app.css). */
.wrap.wpps-opb-page,
.wrap.wpps-opb-live-page,
.wpps-opb-wrap {
	margin: 20px 20px 20px 0;
}

.wpps-opb-page .wpps-opb-container,
.wpps-opb-page .wpps-opb-form,
.wpps-opb-page .wpps-opb-main,
.wpps-opb-live-page .wp-powersuite-settings {
	width: 100%;
	max-width: 100%;
}

.wrap.wpps-opb-page .wpps-page-hero__meta,
.wrap.wpps-opb-live-page .wpps-page-hero__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
}

.wrap.wpps-opb-page .wpps-page-hero__meta .button,
.wrap.wpps-opb-live-page .wpps-page-hero__meta .button {
	margin: 0;
	min-height: 30px;
	line-height: 1.4;
	vertical-align: middle;
}

/* Header */
.wpps-opb-header-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: #fff;
	border: 1px solid var(--opb-border);
	box-shadow: var(--opb-shadow);
	margin-bottom: 32px;
	padding: 20px 24px;
}

.wpps-opb-header-left {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.wpps-opb-header-left:has(.wpps-opb-header-icon) {
	flex-direction: row;
	align-items: center;
	gap: 16px;
}

.wpps-opb-header-right {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	gap: 10px;
}

.wpps-opb-header-icon {
	width: 48px;
	height: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f0f0f1;
	color: #1d2327;
}

.wpps-opb-header-icon .dashicons {
	font-size: 24px;
	width: 24px;
	height: 24px;
}

.wpps-opb-title {
	margin: 0;
	font-size: 1.5rem;
	font-weight: 600;
	color: var(--opb-black);
}

.wpps-opb-subtitle {
	margin: 0;
	font-size: 0.875rem;
	color: var(--opb-gray);
}

.wpps-opb-back {
	display: inline-block;
	margin-bottom: 8px;
	color: var(--opb-blue);
	text-decoration: none;
	font-size: 0.875rem;
}

.wpps-opb-back:hover {
	color: var(--opb-blue-hover);
	text-decoration: underline;
}

/* Buttons */
.wpps-opb-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 0 16px;
	min-height: 40px;
	line-height: 1;
	border-radius: 2px;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	border: none;
	text-decoration: none;
	transition: background 0.2s, color 0.2s, border-color 0.2s;
	box-sizing: border-box;
}

.wpps-opb-btn .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
}

.wpps-opb-btn-primary {
	background: #2271b1;
	border: 1px solid #2271b1;
	color: #fff;
}

.wpps-opb-btn-primary:hover {
	background: #135e96;
	border-color: #135e96;
	color: #fff;
}

.wpps-opb-btn-primary:focus {
	box-shadow: 0 0 0 1.5px #2271b1, inset 0 0 0 1px #fff;
	outline: 1px solid transparent;
}

.wpps-opb-btn-secondary {
	background: transparent;
	border: 1px solid #2271b1;
	color: #2271b1;
}

.wpps-opb-btn-secondary:hover {
	background: rgba(34, 113, 177, 0.04);
	border-color: #135e96;
	color: #135e96;
}

.wpps-opb-btn-secondary:focus {
	box-shadow: 0 0 0 1.5px #2271b1;
	outline: 1px solid transparent;
}

.wpps-opb-btn-danger {
	background: transparent;
	color: #b91c1c;
}

.wpps-opb-btn-danger:hover {
	background: #fef2f2;
	color: #991b1b;
}

/* Empty State */
.wpps-opb-empty-state {
	text-align: center;
	padding: 64px 40px;
	background: #fff;
	border: 1px solid var(--opb-border);
	box-shadow: var(--opb-shadow);
}

.wpps-opb-empty-icon {
	width: 80px;
	height: 80px;
	margin: 0 auto 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f0f0f1;
	color: #1d2327;
}

.wpps-opb-empty-icon .dashicons {
	font-size: 40px;
	width: 40px;
	height: 40px;
}

.wpps-opb-empty-title {
	margin: 0 0 8px;
	font-size: 1.5rem;
	font-weight: 600;
	color: var(--opb-black);
}

.wpps-opb-empty-desc {
	margin: 0 0 32px;
	font-size: 0.9375rem;
	color: var(--opb-gray);
}

.wpps-opb-empty-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 0 16px;
	min-height: 40px;
	line-height: 2.92307692;
	font-size: 13px;
	font-weight: 500;
	background: #2271b1;
	border: 1px solid #2271b1;
	color: #fff;
	border-radius: 2px;
	text-decoration: none;
	transition: background 0.2s, border-color 0.2s;
}

.wpps-opb-empty-btn:hover {
	background: #135e96;
	border-color: #135e96;
	color: #fff;
}

.wpps-opb-empty-btn:focus {
	box-shadow: 0 0 0 1.5px #2271b1, inset 0 0 0 1px #fff;
	outline: 1px solid transparent;
}

.wpps-opb-empty-btn .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
}

/* Stats */
.wpps-opb-stats {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
	margin-bottom: 32px;
}

.wpps-opb-stat {
	background: #fff;
	border: 1px solid var(--opb-border);
	padding: 20px 24px;
	box-shadow: var(--opb-shadow);
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.wpps-opb-stat-label {
	font-size: 0.8125rem;
	color: var(--opb-gray);
}

.wpps-opb-stat-value {
	font-size: 1.75rem;
	font-weight: 700;
	color: var(--opb-black);
}

/* Page Cards Grid */
.wpps-opb-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 24px;
	align-items: stretch;
}

.wpps-opb-card {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 32px 24px;
	background: #fff;
	border: 1px solid var(--opb-border);
	box-shadow: var(--opb-shadow);
	text-decoration: none;
	transition: border-color 0.2s, box-shadow 0.2s;
	min-height: 200px;
}

.wpps-opb-card-status {
	position: absolute;
	top: 12px;
	right: 12px;
	font-size: 0.6875rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--opb-blue);
	background: #f0f6fc;
	padding: 4px 8px;
}

.wpps-opb-card-title {
	margin: 0 0 8px;
	font-size: 1.125rem;
	font-weight: 600;
	color: var(--opb-black);
}

.wpps-opb-card-slug {
	display: inline-block;
	font-size: 0.75rem;
	font-family: ui-monospace, monospace;
	background: var(--opb-bg);
	color: var(--opb-gray);
	padding: 4px 10px;
	margin-bottom: 12px;
}

.wpps-opb-card-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
}

.wpps-opb-badge {
	font-size: 0.75rem;
	color: var(--opb-gray);
	background: var(--opb-bg);
	padding: 4px 10px;
}

.wpps-opb-card-actions {
	display: flex;
	gap: 12px;
	justify-content: center;
	margin-top: 16px;
	padding-top: 16px;
	border-top: 1px solid var(--opb-border);
}

.wpps-opb-card-edit {
	font-size: 0.8125rem;
	color: var(--opb-blue);
	text-decoration: none;
}

.wpps-opb-card-edit:hover {
	text-decoration: underline;
	color: var(--opb-blue-hover);
}

.wpps-opb-card-export {
	position: absolute;
	top: 12px;
	left: 12px;
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	color: var(--opb-gray);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity 0.2s ease;
}

.wpps-opb-card:hover .wpps-opb-card-export {
	opacity: 1;
}

.wpps-opb-card-export .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
}

.wpps-opb-card-export:hover {
	color: var(--opb-blue);
}

.wpps-opb-card-delete {
	background: none;
	border: none;
	font-size: 0.8125rem;
	color: var(--opb-gray);
	cursor: pointer;
	padding: 0;
}

.wpps-opb-card-delete:hover {
	color: #b91c1c;
}

/* Add Card - match page card size and alignment */
.wpps-opb-card-add {
	border: 2px dashed var(--opb-border);
	background: var(--opb-bg);
	color: var(--opb-gray);
}

.wpps-opb-card-add:hover {
	border-color: #72aee6;
	background: #f0f6fc;
	color: var(--opb-blue);
}

.wpps-opb-card-add-title {
	margin: 0 0 4px;
	font-size: 1.125rem;
	font-weight: 600;
	color: inherit;
}

.wpps-opb-card-add-desc {
	margin: 0 0 12px;
	font-size: 0.8125rem;
}

.wpps-opb-card-add-icon {
	width: 48px;
	height: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--opb-border);
}

.wpps-opb-card-add .wpps-opb-card-add-icon .dashicons {
	font-size: 24px;
	width: 24px;
	height: 24px;
}

.wpps-opb-card-add:hover .wpps-opb-card-add-icon {
	background: #c5d9ed;
}

/* Form / Edit View */
.wpps-opb-form {
	display: flex;
	flex-direction: column;
	gap: 24px;
	width: 100%;
	min-width: 0;
}

.wpps-opb-section {
	margin-bottom: 0;
	width: 100%;
	min-width: 0;
}

.wpps-opb-card-panel,
.wpps-opb-panel {
	background: #fff;
	border: 1px solid #ccd0d4;
	box-shadow: var(--opb-shadow);
	border-radius: var(--opb-radius);
	padding: 20px;
	width: 100%;
	box-sizing: border-box;
}

.wpps-opb-panel > h2 {
	margin: 0 0 4px;
	font-size: 14px;
	font-weight: 600;
	color: #1d2327;
}

.wpps-opb-panel > .description {
	margin: 0 0 16px;
}

.wpps-opb-panel-title {
	margin: 0 0 4px;
	font-size: 1.125rem;
	font-weight: 600;
	color: var(--opb-black);
}

.wpps-opb-panel-desc {
	margin: 0 0 20px;
	font-size: 0.875rem;
	color: var(--opb-gray);
}

/* Settings Grid */
.wpps-opb-settings-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px;
	width: 100%;
}

.wpps-opb-settings-grid > .wpps-opb-form-group {
	min-width: 0;
}

.wpps-opb-settings-grid-3col {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.wpps-opb-settings-grid-4col {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* Icon Picker */
.wpps-opb-icon-picker-wrap {
	display: flex;
	flex: 1;
	min-width: 0;
	position: relative;
	min-height: 40px;
}

.wpps-opb-section .wpps-opb-card-panel {
	overflow: visible;
}

.wpps-opb-icon-picker-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	min-height: 40px;
	height: 100%;
	background: #f0f0f1;
	border: 1px solid var(--opb-border);
	border-right: none;
	border-radius: 2px 0 0 2px;
	cursor: pointer;
	transition: all 0.2s;
}

.wpps-opb-icon-picker-btn:hover {
	background: #e5e5e5;
	border-color: var(--opb-gray);
}

.wpps-opb-icon-picker-btn .dashicons {
	font-size: 20px;
	width: 20px;
	height: 20px;
	color: #1d2327;
}

.wpps-opb-icon-picker-wrap .wpps-opb-icon-input {
	border-radius: 0 2px 2px 0;
	border-left: none;
	flex: 1;
}

/* Icon Picker Dropdown */
.wpps-opb-icon-picker-dropdown {
	position: absolute;
	top: 100%;
	left: 0;
	width: min(420px, calc(100vw - 48px));
	max-height: 380px;
	overflow: hidden;
	display: none;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--opb-border);
	border-radius: var(--opb-radius);
	box-shadow: var(--opb-shadow-md);
	z-index: 100000;
	margin-top: 4px;
}

.wpps-opb-icon-picker-dropdown.is-open {
	display: flex;
}

.wpps-opb-icon-picker-search-wrap {
	padding: 10px 12px 0;
	flex-shrink: 0;
}

.wpps-opb-icon-picker-search {
	width: 100%;
	min-height: 36px;
	box-sizing: border-box;
}

.wpps-opb-icon-picker-grid {
	display: grid;
	grid-template-columns: repeat(8, 1fr);
	gap: 4px;
	padding: 10px 12px 12px;
	overflow-y: auto;
	flex: 1;
	min-height: 0;
}

.wpps-opb-icon-picker-empty {
	margin: 0;
	padding: 0 12px 12px;
	font-size: 12px;
	color: var(--opb-gray);
	text-align: center;
}

.wpps-opb-icon-picker-item {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	background: transparent;
	border: 1px solid transparent;
	border-radius: 6px;
	cursor: pointer;
	transition: all 0.15s;
}

.wpps-opb-icon-picker-item:hover {
	background: #f0f6fc;
	border-color: #c5d9ed;
}

.wpps-opb-icon-picker-item .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
	color: var(--opb-gray);
}

.wpps-opb-icon-picker-item:hover .dashicons {
	color: var(--opb-blue);
}

.wpps-opb-icon-picker-item.is-selected {
	background: #f0f6fc;
	border-color: var(--wpps-accent, var(--opb-blue));
}

.wpps-opb-icon-picker-item.is-selected .dashicons {
	color: var(--wpps-accent, var(--opb-blue));
}

/* Toast Notifications */
.wpps-opb-toast {
	position: fixed;
	bottom: 24px;
	right: 24px;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 20px;
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
	z-index: 99999;
	opacity: 0;
	transform: translateY(20px);
	transition: all 0.3s ease;
}

.wpps-opb-toast.is-visible {
	opacity: 1;
	transform: translateY(0);
}

.wpps-opb-toast-icon {
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
}

.wpps-opb-toast-success .wpps-opb-toast-icon {
	background: var(--opb-border);
	color: var(--opb-blue);
}

.wpps-opb-toast-error .wpps-opb-toast-icon {
	background: #fee2e2;
	color: #dc2626;
}

.wpps-opb-toast-message {
	font-size: 14px;
	font-weight: 500;
	color: var(--opb-black);
}

/* Save Indicator */
.wpps-opb-save-indicator {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: var(--opb-gray);
	font-weight: 500;
}

.wpps-opb-save-indicator.is-saving {
	color: #f59e0b;
}

.wpps-opb-save-indicator.is-saved {
	color: var(--opb-blue);
}

.wpps-opb-save-spinner {
	width: 14px;
	height: 14px;
	border: 2px solid var(--opb-border);
	border-top-color: var(--opb-blue);
	border-radius: 50%;
	animation: wpps-opb-spin 0.6s linear infinite;
}

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

/* Card Footer */
.wpps-opb-card-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: 24px;
	padding-top: 20px;
	border-top: 1px solid var(--opb-border);
}

.wpps-opb-form-group {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.wpps-opb-form-full {
	grid-column: 1 / -1;
}

.wpps-opb-settings-row-3,
.wpps-opb-settings-row-4 {
	width: 100%;
	min-width: 0;
}

.wpps-opb-settings-row-3 .wpps-opb-settings-grid,
.wpps-opb-settings-row-4 .wpps-opb-settings-grid {
	width: 100%;
	min-width: 0;
}

.wpps-opb-form-group label {
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--opb-black);
}

.wpps-opb-required {
	color: #dc2626;
}

.wpps-opb-input,
.wpps-opb-select {
	box-sizing: border-box;
	width: 100%;
	min-width: 0;
	padding: 10px 12px;
	border: 1px solid var(--opb-border);
	border-radius: var(--opb-radius-sm);
	font-size: 0.875rem;
}

/* Page Settings - taller inputs, consistent 2px radius (WordPress default) */
.wpps-opb-page-settings .wpps-opb-input,
.wpps-opb-page-settings .wpps-opb-select {
	min-height: 40px;
	padding: 12px 14px;
	border-radius: 2px;
}

.wpps-opb-page-settings textarea.wpps-opb-input {
	min-height: 60px;
}

.wpps-opb-input:focus,
.wpps-opb-select:focus {
	outline: none;
	border-color: var(--opb-blue);
	box-shadow: 0 0 0 1px var(--opb-blue);
}

.wpps-opb-help {
	font-size: 0.75rem;
	color: var(--opb-gray);
}

/* Editor layout — main + sidebar (matches Admin Columns Customizer) */
.wpps-opb-container {
	display: flex;
	gap: 20px;
	margin-top: 20px;
	box-sizing: border-box;
}

.wpps-opb-main {
	flex: 1;
	min-width: 0;
}

.wpps-opb-sidebar {
	width: 280px;
	flex-shrink: 0;
}

.wpps-opb-editor-container {
	align-items: flex-start;
}

.wpps-opb-editor-layout,
.wpps-opb-editor-container {
	display: flex;
	gap: 20px;
}

.wpps-opb-fields-column {
	min-width: 0;
	width: 100%;
	flex: 1;
}

.wpps-opb-quickadd-column,
.wpps-opb-sidebar {
	position: sticky;
	top: 32px;
	align-self: flex-start;
}

.wpps-opb-quickadd-panel {
	position: sticky;
	top: 32px;
}

/* Quick Add Grid */
.wpps-opb-quick-add-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 10px;
}

.wpps-opb-quick-add-btn {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 14px;
	background: var(--opb-bg);
	border: 1px solid var(--opb-border);
	border-radius: 2px;
	font-size: 0.8125rem;
	font-weight: 500;
	color: var(--opb-black);
	cursor: pointer;
	transition: background 0.2s, border-color 0.2s, color 0.2s;
	text-align: left;
}

.wpps-opb-quick-add-btn:hover {
	background: #f0f6fc;
	border-color: #c5d9ed;
	color: var(--opb-blue-hover);
}

.wpps-opb-quick-add-btn svg {
	width: 20px;
	height: 20px;
	color: var(--opb-gray);
}

.wpps-opb-quick-add-btn:hover svg {
	color: var(--opb-blue);
}

.wpps-opb-quick-add-group {
	grid-column: 1 / -1;
	flex-direction: row !important;
	justify-content: center;
	padding: 14px 20px !important;
	background: #f0f6fc !important;
	border: 2px dashed #72aee6 !important;
}

.wpps-opb-quick-add-group:hover {
	background: var(--opb-border) !important;
	border-color: var(--opb-blue) !important;
	border-style: solid !important;
}

.wpps-opb-quick-add-group svg {
	color: var(--opb-blue) !important;
}

.wpps-opb-quick-add-group span {
	font-weight: 600 !important;
	color: var(--opb-blue-hover) !important;
}

/* Fields List */
.wpps-opb-fields-list {
	min-height: 120px;
	margin-bottom: 24px;
	width: 100%;
	min-width: 0;
}

.wpps-opb-empty-fields {
	padding: 32px;
	background: var(--opb-bg);
	border: 2px dashed var(--opb-border);
	border-radius: 2px;
	color: var(--opb-gray);
	text-align: center;
	font-size: 0.875rem;
}

/* Field Item — menu-organizer row style */
.wpps-opb-field-item {
	background: var(--opb-bg);
	border: 1px solid #dcdcde;
	border-radius: var(--opb-radius-sm);
	margin-bottom: 8px;
	overflow: hidden;
	width: 100%;
	min-width: 0;
	transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.wpps-opb-field-item:hover {
	background: #fff;
	border-color: var(--opb-blue);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.wpps-opb-field-header {
	display: flex;
	align-items: center;
	padding: 12px 15px;
	background: transparent;
	border-radius: var(--opb-radius-sm);
	cursor: pointer;
	transition: background 0.2s;
}

.wpps-opb-field-header:hover {
	background: transparent;
}

.wpps-opb-field-drag {
	cursor: move;
	color: var(--opb-gray);
	margin-right: 12px;
}

.wpps-opb-field-drag .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
}

.wpps-opb-field-type-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	margin-right: 10px;
	color: var(--opb-gray);
}

.wpps-opb-field-type-icon svg {
	width: 18px;
	height: 18px;
}

.wpps-opb-field-group .wpps-opb-field-type-icon {
	color: var(--opb-blue);
}

.wpps-opb-field-title {
	flex: 1;
	font-weight: 600;
	font-size: 0.9375rem;
	color: var(--opb-black);
}

.wpps-opb-field-type {
	font-size: 0.75rem;
	color: var(--opb-gray);
	background: var(--opb-border);
	padding: 4px 8px;
	border-radius: 6px;
	margin-right: 12px;
}

.wpps-opb-field-width-badge {
	display: inline-flex;
	align-items: center;
	background: var(--opb-border);
	color: var(--opb-blue-hover);
	padding: 2px 8px;
	border-radius: 4px;
	font-weight: 600;
	font-size: 0.6875rem;
	margin-right: 12px;
}

/* Group/Section field styling */
.wpps-opb-field-group {
	background: linear-gradient(135deg, #f0f6fc 0%, #fff 100%);
	border: 2px dashed #72aee6;
}

.wpps-opb-field-group .wpps-opb-field-header {
	background: transparent;
}

.wpps-opb-field-group:hover {
	border-color: var(--opb-blue);
	border-style: solid;
}

.wpps-opb-field-group .wpps-opb-field-type {
	background: var(--opb-blue);
	color: #fff;
}

.wpps-opb-field-toggle {
	background: none;
	border: none;
	cursor: pointer;
	padding: 4px;
	color: var(--opb-gray);
	margin-right: 8px;
	transition: transform 0.2s;
}

.wpps-opb-field-item.collapsed .wpps-opb-field-toggle {
	transform: rotate(-90deg);
}

.wpps-opb-field-toggle .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
}

.wpps-opb-field-header .wpps-opb-field-actions {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	flex-shrink: 0;
	margin-left: auto;
}

.opb-field-duplicate,
.opb-field-delete {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	background: none !important;
	border: none !important;
	color: var(--opb-gray) !important;
	padding: 4px !important;
	cursor: pointer;
	line-height: 1;
}

.opb-field-duplicate .dashicons,
.opb-field-delete .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
}

.opb-field-duplicate:hover {
	color: var(--opb-blue, #2271b1) !important;
}

.opb-field-delete:hover {
	color: #dc2626 !important;
}

.wpps-opb-field-body {
	padding: 20px;
	border-top: 1px solid var(--opb-border);
	width: 100%;
	box-sizing: border-box;
}

.wpps-opb-field-item.collapsed .wpps-opb-field-body {
	display: none;
}

/* Field body rows - match Page Settings grid layout, span full width */
.wpps-opb-field-body .wpps-opb-field-row {
	display: grid;
	gap: 16px;
	margin-bottom: 16px;
	width: 100%;
	min-width: 0;
	max-width: 100%;
}

.wpps-opb-field-row:last-child {
	margin-bottom: 0;
}

.wpps-opb-field-row-2col {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.wpps-opb-field-row-3col {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.wpps-opb-field-row-full {
	grid-template-columns: minmax(0, 1fr);
}

.wpps-opb-field-body .form-field {
	margin-bottom: 0;
	min-width: 0;
	width: 100%;
	display: flex;
	flex-direction: column;
}

.wpps-opb-field-body .form-field .wpps-opb-input,
.wpps-opb-field-body .form-field .wpps-opb-select {
	width: 100%;
}

.wpps-opb-field-body .form-field:last-child {
	margin-bottom: 0;
}

.wpps-opb-field-body .form-field-required {
	justify-content: center;
}

.wpps-opb-field-body label {
	display: block;
	margin-bottom: 6px;
	font-weight: 500;
	font-size: 0.8125rem;
	color: var(--opb-black);
}

.wpps-opb-field-body .required {
	color: #dc2626;
}

.wpps-opb-live-field__label .required,
.wpps-opb-checkbox-label-text .required {
	margin-left: 0.25em;
	color: #d63638;
}

.wpps-opb-live-field--checkbox-inline .wpps-opb-live-field__control {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px;
}

.wpps-opb-live-fields .wpps-color-code-input {
	width: 100% !important;
	max-width: 100%;
}

.wpps-opb-field-body .wpps-opb-help {
	display: block;
	margin-top: 6px;
}

.opb-field-conditional-value-wrap .opb-field-conditional-value-hint {
	margin: 6px 0 0;
}

.opb-field-conditional-value-wrap .opb-field-conditional-value,
.opb-field-conditional-value-wrap select.opb-field-conditional-value {
	width: 100%;
	max-width: 100%;
}

.opb-field-default-color-wrap {
	display: flex;
	align-items: center;
	gap: 10px;
}

.opb-field-default-color-wrap .opb-field-default-color {
	width: 40px;
	height: 40px;
	padding: 2px;
	border: 1px solid #c3c4c7;
	border-radius: 2px;
	cursor: pointer;
	background: #fff;
}

.opb-field-default-color-wrap .opb-field-default {
	flex: 1;
	min-width: 0;
}

/* Field body inputs - match Page Settings style; lock single-line control height */
.wpps-opb-field-body input.wpps-opb-input:not([type="color"]),
.wpps-opb-field-body select.wpps-opb-select {
	max-width: 100%;
	height: 40px;
	min-height: 40px;
	max-height: 40px;
	padding: 6px 12px;
	border-radius: 2px;
	line-height: 1.4;
	box-sizing: border-box;
	vertical-align: middle;
}

.wpps-opb-field-body textarea.wpps-opb-input {
	max-width: 100%;
	min-height: 60px;
	padding: 8px 12px;
	border-radius: 2px;
	box-sizing: border-box;
}

/* WYSIWYG editor – full-featured, matches post editor */
.wpps-opb-wysiwyg-wrap {
	margin: 0;
	max-width: 100%;
}

.wpps-opb-wysiwyg-wrap .wp-editor-container {
	border: 1px solid #c3c4c7;
	border-radius: 2px;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.wpps-opb-wysiwyg-wrap .wp-editor-area {
	border: none;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	font-size: 14px;
	line-height: 1.6;
}

/* Color field: same as login page customizer (circle + hex input + reset) */
.wpps-color-field-row { display: inline-flex; align-items: center; gap: 10px; flex-wrap: nowrap; }
.wpps-color-picker-circle { width: 40px !important; height: 40px !important; min-width: 40px; min-height: 40px; flex-shrink: 0; border-radius: 50% !important; border: 2px solid #ddd !important; padding: 0 !important; cursor: pointer; -webkit-appearance: none !important; -moz-appearance: none !important; appearance: none !important; overflow: hidden; }
.wpps-color-picker-circle::-webkit-color-swatch-wrapper { padding: 0 !important; margin: 0 !important; border: none !important; border-radius: 50% !important; }
.wpps-color-picker-circle::-webkit-color-swatch { border: none !important; border-radius: 50% !important; width: 100% !important; height: 100% !important; }
.wpps-color-picker-circle::-moz-color-swatch { border: none !important; border-radius: 50% !important; width: 100% !important; height: 100% !important; }
.wpps-color-code-wrap { display: inline-block; position: relative; margin: 0; flex-shrink: 0; }
.wpps-color-code-wrap .wpps-color-reset { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); padding: 0; margin: 0; background: none; border: none; cursor: pointer; color: #646970; }
.wpps-color-code-wrap .wpps-color-reset:hover { color: #2271b1; }
.wpps-color-code-wrap .wpps-color-reset .dashicons { font-size: 16px; width: 16px; height: 16px; }

/* Toggle switch for checkbox */
.wpps-opb-toggle {
	position: relative;
	display: inline-block;
	width: 44px;
	height: 24px;
}

.wpps-opb-toggle input {
	opacity: 0;
	width: 0;
	height: 0;
}

.wpps-opb-toggle-slider {
	position: absolute;
	cursor: pointer;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: var(--opb-border);
	transition: 0.2s;
	border-radius: 24px;
}

.wpps-opb-toggle-slider:before {
	position: absolute;
	content: "";
	height: 18px;
	width: 18px;
	left: 3px;
	bottom: 3px;
	background-color: white;
	transition: 0.2s;
	border-radius: 50%;
	box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.wpps-opb-toggle input:checked + .wpps-opb-toggle-slider {
	background-color: var(--opb-blue);
}

.wpps-opb-toggle input:checked + .wpps-opb-toggle-slider:before {
	transform: translateX(20px);
}

.wpps-opb-radio-group {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.wpps-opb-radio-item {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	font-weight: 400;
	line-height: 1.4;
	cursor: pointer;
}

.wpps-opb-radio-item input[type="radio"] {
	margin: 0;
	flex-shrink: 0;
}

.wpps-opb-radio-item-text {
	display: inline-block;
	line-height: 1.4;
}

.wpps-opb-live-fields .wpps-opb-radio-group--inline {
	flex-direction: row;
	flex-wrap: wrap;
	gap: 12px 24px;
}

.wpps-opb-live-fields .wpps-opb-radio-group--buttons {
	flex-direction: row;
	flex-wrap: wrap;
	gap: 8px;
}

.wpps-opb-live-fields .wpps-opb-radio-group--buttons .wpps-opb-radio-item {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	border: 1px solid #8c8f94;
	border-radius: 3px;
	padding: 7px 14px;
	background: #f6f7f7;
	color: #1d2327;
	transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.wpps-opb-live-fields .wpps-opb-radio-group--buttons .wpps-opb-radio-item input[type="radio"] {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
	margin: 0;
	pointer-events: none;
}

.wpps-opb-live-fields .wpps-opb-radio-group--buttons .wpps-opb-radio-item.is-selected,
.wpps-opb-live-fields .wpps-opb-radio-group--buttons .wpps-opb-radio-item:has(input:checked) {
	background: var(--wpps-accent, #2271b1);
	border-color: var(--wpps-accent, #2271b1);
	color: #fff;
}

.wpps-opb-live-fields .wpps-opb-radio-group--columns-2 {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px 16px;
}

.wpps-opb-live-fields .wpps-opb-radio-group--columns-3 {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 8px 16px;
}

.wpps-opb-select-group {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.wpps-opb-select-item {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	border: 1px solid #8c8f94;
	border-radius: 3px;
	padding: 7px 14px;
	background: #f6f7f7;
	color: #1d2327;
	font-size: 13px;
	line-height: 1.4;
	cursor: pointer;
	text-align: left;
	transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.wpps-opb-select-item:hover:not(:disabled) {
	border-color: var(--wpps-accent, #2271b1);
}

.wpps-opb-select-item.is-selected {
	background: var(--wpps-accent, #2271b1);
	border-color: var(--wpps-accent, #2271b1);
	color: #fff;
}

.wpps-opb-select-item:disabled {
	opacity: 0.65;
	cursor: not-allowed;
}

.wpps-opb-live-fields .wpps-opb-select-group--inline {
	flex-direction: row;
	flex-wrap: wrap;
	gap: 8px 12px;
}

.wpps-opb-live-fields .wpps-opb-select-group--buttons {
	flex-direction: row;
	flex-wrap: wrap;
	gap: 8px;
}

.wpps-opb-live-fields .wpps-opb-select-group--columns-2 {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px 16px;
}

.wpps-opb-live-fields .wpps-opb-select-group--columns-3 {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 8px 16px;
}

/* Options editor for select/radio */
.wpps-opb-options-editor .wpps-opb-options-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-bottom: 10px;
}
.wpps-opb-option-row {
	display: flex;
	align-items: center;
	gap: 10px;
}
.wpps-opb-option-row .opb-opt-value {
	flex: 0 0 140px;
	min-width: 0;
}
.wpps-opb-option-row .opb-opt-label {
	flex: 1;
	min-width: 0;
}
.wpps-opb-option-row .opb-opt-set-default {
	flex-shrink: 0;
	white-space: nowrap;
}
.wpps-opb-option-row .opb-opt-remove {
	flex-shrink: 0;
	width: 32px;
	height: 32px;
	padding: 0;
	font-size: 18px;
	line-height: 1;
	color: #646970;
	background: transparent;
	border: 1px solid #c3c4c7;
	border-radius: 2px;
	cursor: pointer;
}
.wpps-opb-option-row .opb-opt-remove:hover {
	color: #b32d2e;
	border-color: #b32d2e;
}
.opb-opt-add {
	margin-top: 4px;
}

.wpps-opb-image-wrap {
	display: flex;
	flex-direction: column;
	gap: 12px;
	align-items: flex-start;
}

.wpps-opb-image-preview {
	position: relative;
	display: inline-block;
}

.wpps-opb-image-preview img {
	display: block;
	max-width: 200px;
	border-radius: 2px;
}

.wpps-opb-upload-btn {
	width: auto;
	min-width: 120px;
	padding: 10px 20px;
}

.wpps-opb-image-remove {
	position: absolute;
	top: 6px;
	right: 6px;
	width: 28px;
	height: 28px;
	padding: 0;
	margin: 0;
	border: none;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.6);
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s ease;
}

.wpps-opb-image-remove:hover {
	background: rgba(0, 0, 0, 0.85);
	color: #fff;
}

.wpps-opb-image-remove .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
}

/* Sortable */
.ui-sortable-helper {
	box-shadow: var(--opb-shadow-md) !important;
	border-radius: var(--opb-radius-sm) !important;
}

.wpps-opb-field-placeholder {
	border: 2px dashed var(--opb-blue);
	background: #f0f6fc;
	margin-bottom: 12px;
	height: 60px;
	border-radius: var(--opb-radius-sm);
}

/* ===================================
   Live options page (rendered admin screen)
   =================================== */

.wpps-opb-live-settings {
	margin-top: 20px;
}

.wpps-opb-live-fields {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	gap: 18px 20px;
	margin-top: 0;
	align-items: stretch;
}

.wpps-opb-live-field {
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-width: 0;
	height: 100%;
}

.wpps-opb-live-field--full {
	grid-column: span 12;
}

.wpps-opb-live-field--2-3 {
	grid-column: span 8;
}

.wpps-opb-live-field--1-2 {
	grid-column: span 6;
}

.wpps-opb-live-field--1-3 {
	grid-column: span 4;
}

.wpps-opb-live-field__label {
	flex-shrink: 0;
	min-height: 22px;
}

.wpps-opb-live-field__label label {
	display: inline-flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0;
	margin: 0;
	font-weight: 600;
	font-size: 13px;
	color: #1d2327;
}

.wpps-opb-accordion-tooltip {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-left: 6px;
	cursor: help;
}

.wpps-opb-accordion-tooltip-trigger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	font-size: 12px;
	font-weight: 600;
	color: var(--opb-gray);
	background: var(--opb-bg);
	border-radius: 50%;
	line-height: 1;
	transition: color 0.2s, background 0.2s;
}

.wpps-opb-accordion-tooltip:hover .wpps-opb-accordion-tooltip-trigger,
.wpps-opb-accordion-tooltip.is-active .wpps-opb-accordion-tooltip-trigger {
	color: var(--opb-blue);
	background: #e8f0fe;
}

.wpps-opb-accordion-tooltip-panel {
	position: absolute;
	left: 0;
	bottom: calc(100% + 10px);
	transform: translateY(4px);
	min-width: 220px;
	max-width: min(320px, calc(100vw - 32px));
	padding: 12px 14px;
	font-size: 0.8125rem;
	font-weight: 400;
	line-height: 1.5;
	color: var(--opb-black);
	background: #fff;
	border: 1px solid var(--opb-border);
	border-radius: 6px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.06);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
	z-index: 100000;
}

.wpps-opb-accordion-tooltip-panel.is-positioned {
	position: fixed !important;
	bottom: auto !important;
	transform: none !important;
	transition: opacity 0.12s ease, visibility 0.12s ease;
}

.wpps-opb-accordion-tooltip-panel::before {
	content: "";
	position: absolute;
	top: 100%;
	left: var(--wpps-tip-x, 14px);
	margin-left: -7px;
	border: 7px solid transparent;
	border-top-color: var(--opb-border);
}

.wpps-opb-accordion-tooltip-panel::after {
	content: "";
	position: absolute;
	top: 100%;
	left: var(--wpps-tip-x, 14px);
	margin-left: -6px;
	margin-top: -1px;
	border: 6px solid transparent;
	border-top-color: #fff;
}

.wpps-opb-accordion-tooltip-panel.wpps-accordion-tooltip-panel--below::before {
	top: auto;
	bottom: 100%;
	margin-top: 0;
	margin-bottom: -1px;
	border-top-color: transparent;
	border-bottom-color: var(--opb-border);
}

.wpps-opb-accordion-tooltip-panel.wpps-accordion-tooltip-panel--below::after {
	top: auto;
	bottom: 100%;
	margin-top: 0;
	margin-bottom: -2px;
	border-top-color: transparent;
	border-bottom-color: #fff;
}

.wpps-opb-accordion-tooltip.is-active .wpps-opb-accordion-tooltip-panel {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

@media (hover: hover) {
	html:not(.wpps-accordion-tooltips-ready) .wpps-opb-accordion-tooltip:hover .wpps-opb-accordion-tooltip-panel:not(.is-positioned) {
		opacity: 1;
		visibility: visible;
		transform: translateY(0);
	}
}

.wpps-opb-live-field__control {
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	flex: 1;
}

.wpps-opb-live-fields .wpps-opb-radio-fieldset {
	margin: 0;
	padding: 0;
	border: 0;
	min-width: 0;
}

.wpps-opb-live-fields .wpps-opb-select-wrap,
.wpps-opb-live-fields .wpps-opb-radio-group,
.wpps-opb-live-fields .wpps-opb-affix-wrap {
	width: 100%;
	max-width: 100%;
}

.wpps-opb-live-fields .regular-text,
.wpps-opb-live-fields .large-text,
.wpps-opb-live-fields select.regular-text,
.wpps-opb-live-fields input.small-text {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

.wpps-opb-live-fields select.regular-text,
.wpps-opb-live-fields input.regular-text:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="hidden"]),
.wpps-opb-live-fields input.small-text,
.wpps-opb-live-fields .wpps-opb-radio-group--buttons .wpps-opb-radio-item,
.wpps-opb-live-fields .wpps-opb-select-item {
	min-height: 36px;
}

.wpps-opb-live-fields select.regular-text {
	padding: 6px 10px;
	line-height: 1.4;
}

.wpps-opb-live-fields .wpps-color-field-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	width: 100%;
	max-width: 100%;
}

.wpps-opb-live-fields .wpps-color-code-wrap {
	display: block;
	position: relative;
	flex: 1 1 120px;
	min-width: 0;
	margin: 0;
}

.wpps-opb-live-fields textarea.large-text {
	width: 100%;
	max-width: 100%;
	min-height: 120px;
}

.wpps-opb-live-fields .wpps-opb-wysiwyg-wrap,
.wpps-opb-live-fields .wpps-opb-wysiwyg-wrap .wp-editor-wrap,
.wpps-opb-live-fields .wpps-opb-wysiwyg-wrap .wp-editor-container {
	width: 100% !important;
	max-width: 100%;
	box-sizing: border-box;
}

.wpps-opb-page-form .form-table {
	margin-top: 0;
}

/* Sidebar layout for grouped pages (2+ sections) */
.wpps-opb-page-layout {
	display: grid;
	grid-template-columns: 220px minmax(0, 1fr);
	gap: 50px;
	align-items: start;
}

.wpps-opb-sidebar-nav {
	position: sticky;
	top: 32px;
	width: 100%;
	margin: 0;
	background: #f6f7f7;
	border: 1px solid #dcdcde;
	border-radius: 0;
	padding: 20px 16px 16px;
	box-shadow: none;
}

.wpps-opb-sidebar-nav__title {
	margin: 0 0 12px;
	padding: 0 0 10px;
	font-size: 11px;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: #646970;
	border-bottom: 1px solid #dcdcde;
}

.wpps-opb-sidebar-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.wpps-opb-sidebar-nav li {
	margin: 0;
}

.wpps-opb-sidebar-nav .wpps-opb-nav-link {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 12px;
	color: #1d2327;
	text-decoration: none;
	font-size: 0.875rem;
	font-weight: 500;
	line-height: 1.35;
	border-radius: 0;
	border: 1px solid transparent;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.wpps-opb-sidebar-nav .wpps-opb-nav-link::before {
	content: "";
	flex-shrink: 0;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #c3c4c7;
	transition: background 0.15s ease, transform 0.15s ease;
}

.wpps-opb-sidebar-nav .wpps-opb-nav-link:hover {
	background: #fff;
	color: var(--opb-blue-hover, #135e96);
	border-color: #dcdcde;
}

.wpps-opb-sidebar-nav .wpps-opb-nav-link.is-active {
	background: #fff;
	color: var(--wpps-accent, var(--opb-blue, #2271b1));
	border-color: #c3c4c7;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.wpps-opb-sidebar-nav .wpps-opb-nav-link.is-active::before {
	background: var(--wpps-accent, var(--opb-blue, #2271b1));
	transform: scale(1.15);
}

.wpps-opb-page-content {
	min-width: 0;
	margin: 0;
	padding: 0;
}

.wpps-opb-page-layout .wpps-opb-page-content > .wpps-opb-section-card.is-active {
	margin-top: 0;
	margin-bottom: 0;
}

.wpps-opb-live-settings .wpps-opb-section-card {
	margin-bottom: 20px;
}

.wpps-opb-live-settings .wpps-opb-page-layout .wpps-opb-section-card {
	margin-bottom: 0;
}

@media (max-width: 782px) {
	.wpps-opb-page-layout {
		grid-template-columns: 1fr;
	}

	.wpps-opb-sidebar-nav {
		position: static;
		width: 100%;
	}

	.wpps-opb-live-fields {
		grid-template-columns: 1fr;
	}

	.wpps-opb-live-field--full,
	.wpps-opb-live-field--2-3,
	.wpps-opb-live-field--1-2,
	.wpps-opb-live-field--1-3 {
		grid-column: span 12;
	}

	.wpps-opb-live-fields .wpps-opb-radio-group--columns-2,
	.wpps-opb-live-fields .wpps-opb-radio-group--columns-3 {
		grid-template-columns: 1fr;
	}
}

.wpps-opb-page-form .description {
	margin-top: 6px;
	color: #646970;
}

.wpps-opb-page-form .submit.wpps-opb-page-actions {
	margin-top: 0;
	padding-top: 0;
	border-top: none;
	display: flex;
	gap: 8px;
	align-items: center;
}

/* How to use modal — WordPress admin theme colors */
.wpps-opb-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	visibility: hidden;
	opacity: 0;
	pointer-events: none;
	transition: visibility 0.2s, opacity 0.2s;
}

.wpps-opb-modal.is-open {
	visibility: visible;
	opacity: 1;
	pointer-events: auto;
}

.wpps-opb-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	cursor: pointer;
}

.wpps-opb-modal-content {
	position: relative;
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
	max-width: 520px;
	width: 100%;
	min-width: 0;
	max-height: 90vh;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	z-index: 100001;
}

.wpps-opb-modal-content-wide {
	max-width: 800px;
}

.wpps-opb-modal-tabs {
	display: flex;
	gap: 0;
	border-bottom: 1px solid #c3c4c7;
	padding: 0 20px;
	flex-shrink: 0;
	background: #f6f7f7;
}

.wpps-opb-modal-tab {
	padding: 12px 16px;
	background: none;
	border: none;
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
	font-size: 13px;
	font-weight: 500;
	color: #646970;
	cursor: pointer;
	transition: color 0.15s, border-color 0.15s;
}

.wpps-opb-modal-tab:hover {
	color: #1d2327;
}

.wpps-opb-modal-tab.is-active {
	color: var(--wp-admin-theme-color, #2271b1);
	border-bottom-color: var(--wp-admin-theme-color, #2271b1);
}

.wpps-opb-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px;
	border-bottom: 1px solid #c3c4c7;
	flex-shrink: 0;
	background: #fff;
}

.wpps-opb-modal-header h2 {
	margin: 0;
	font-size: 1.2em;
	font-weight: 600;
	color: #1d2327;
}

.wpps-opb-modal-close {
	background: none;
	border: none;
	font-size: 24px;
	line-height: 1;
	color: #646970;
	cursor: pointer;
	padding: 0;
	width: 30px;
	height: 30px;
	transition: color 0.15s;
}

.wpps-opb-modal-close:hover {
	color: #1d2327;
}

.wpps-opb-modal-body {
	padding: 20px;
	overflow-x: auto;
	overflow-y: auto;
	flex: 1;
	min-width: 0;
	min-height: 0;
	max-height: calc(100vh - 200px);
	background: #fff;
}

.wpps-opb-modal-intro {
	margin: 0 0 16px !important;
}

.wpps-opb-modal-body h3 {
	margin: 0 0 8px;
	font-size: 14px;
	font-weight: 600;
	color: #1d2327;
}

.wpps-opb-modal-body h3:not(:first-child) {
	margin-top: 20px;
}

.wpps-opb-modal-body p {
	margin: 0 0 12px;
	font-size: 13px;
	line-height: 1.5;
	color: #646970;
}

.wpps-opb-modal-body p:last-child {
	margin-bottom: 0;
}

.wpps-opb-modal-integration {
	margin-bottom: 20px;
	padding-bottom: 20px;
	border-bottom: 1px solid #dcdcde;
}

.wpps-opb-modal-integration:last-of-type {
	margin-bottom: 0;
	padding-bottom: 0;
	border-bottom: none;
}

.wpps-opb-modal-integration__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 8px;
}

.wpps-opb-modal-integration__head h3 {
	margin: 0;
}

.wpps-opb-modal-badge {
	display: inline-flex;
	align-items: center;
	padding: 2px 8px;
	border-radius: 3px;
	font-size: 11px;
	font-weight: 600;
	line-height: 1.5;
	white-space: nowrap;
}

.wpps-opb-modal-badge.is-active {
	color: #1d2327;
	background: #d7f0db;
	border: 1px solid #68de7c;
}

.wpps-opb-modal-badge.is-inactive {
	color: #646970;
	background: #f6f7f7;
	border: 1px solid #c3c4c7;
}

.wpps-opb-modal-actions {
	display: flex;
	gap: 12px;
	justify-content: flex-end;
	margin-top: 20px;
	padding-top: 16px;
	border-top: 1px solid #ddd;
}

/* Code blocks – match Header & Footer module (wp-powersuite-hfc-panel) */
.wpps-opb-modal-code-wrap {
	position: relative;
	margin: 12px 0;
	padding: 12px;
	background: #1e1e1e;
	border-radius: 6px;
	border: 1px solid #3c3c3c;
}

.wpps-opb-modal-code {
	margin: 0;
	padding: 12px 48px 12px 16px;
	background: transparent;
	border: none;
	font-family: "Cascadia Code", "Fira Code", "JetBrains Mono", "SF Mono", Consolas, Monaco, monospace;
	font-size: 13px;
	line-height: 1.5;
	overflow-x: auto;
	color: #d4d4d4;
}

.wpps-opb-modal-code code {
	font-family: inherit;
	color: #d4d4d4;
	background: transparent;
	padding: 0;
}

.wpps-opb-modal-copy {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 1;
}

.wpps-opb-modal-code-wrap--table {
	position: static;
	display: flex;
	align-items: flex-start;
	gap: 6px;
	max-width: 100%;
	min-width: 0;
	margin: 0;
	padding: 8px 10px;
}

.wpps-opb-modal-code-wrap--table .wpps-opb-snippet-code {
	flex: 1;
	min-width: 0;
	margin: 0;
	padding: 0;
	font-family: ui-monospace, monospace;
	font-size: 11px;
	line-height: 1.45;
	color: #d4d4d4;
	background: transparent;
	white-space: normal;
	word-break: break-word;
	overflow-wrap: anywhere;
}

.wpps-opb-modal-code-wrap--table .wpps-opb-modal-copy {
	position: static;
	flex-shrink: 0;
	padding: 0 2px !important;
	min-height: 0;
	line-height: 1;
}

.wpps-opb-modal-code-wrap--table .wpps-opb-modal-copy .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
}

.wpps-opb-modal-code-wrap--table .wpps-opb-modal-copy.is-copied {
	color: #00a32a;
}

.wpps-opb-modal-step {
	display: flex;
	gap: 16px;
	margin-bottom: 20px;
	align-items: flex-start;
}

.wpps-opb-modal-step:last-of-type {
	margin-bottom: 0;
}

.wpps-opb-modal-step-num {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: #f0f0f1;
	color: var(--wp-admin-theme-color, #2271b1);
	font-size: 0.875rem;
	font-weight: 600;
	flex-shrink: 0;
}

.wpps-opb-modal-step strong {
	display: block;
	margin-bottom: 4px;
	color: var(--opb-black);
}

.wpps-opb-modal-step p {
	margin: 0;
	font-size: 0.875rem;
	line-height: 1.5;
	color: var(--opb-gray);
}

.wpps-opb-modal-tip {
	margin-top: 16px;
	padding: 12px 14px;
	background: #f6f7f7;
	border-left: 4px solid var(--wp-admin-theme-color, #2271b1);
	border-radius: 0 2px 2px 0;
}

.wpps-opb-modal-tip strong {
	display: block;
	margin-bottom: 4px;
	color: var(--opb-black);
}

.wpps-opb-modal-tip p {
	margin: 0 0 8px;
	font-size: 0.875rem;
	color: var(--opb-gray);
}

.wpps-opb-modal-link {
	display: inline-block;
	font-size: 0.875rem;
	color: var(--wp-admin-theme-color, #2271b1);
	text-decoration: none;
}

.wpps-opb-modal-link:hover {
	text-decoration: underline;
	color: var(--wp-admin-theme-color-darker-10, #135e96);
}

.wpps-opb-modal-list {
	margin: 0 0 16px;
	padding-left: 20px;
}

.wpps-opb-modal-list li {
	margin-bottom: 12px;
	font-size: 0.875rem;
	line-height: 1.5;
	color: var(--opb-gray);
}

.wpps-opb-modal-list li strong {
	color: var(--opb-black);
}

.wpps-opb-modal-fields-table-wrap {
	overflow-x: auto;
	max-width: 100%;
	margin: 12px 0;
	-webkit-overflow-scrolling: touch;
}

.wpps-opb-modal-fields-table {
	width: 100%;
	min-width: 0;
	margin: 0;
	border-collapse: collapse;
	font-size: 0.8125rem;
	table-layout: fixed;
}

.wpps-opb-modal-fields-table th,
.wpps-opb-modal-fields-table td {
	padding: 8px 12px;
	text-align: left;
	border: 1px solid var(--opb-border);
	vertical-align: top;
	word-wrap: break-word;
	overflow-wrap: anywhere;
}

.wpps-opb-modal-fields-table th:nth-child(1),
.wpps-opb-modal-fields-table td:nth-child(1) {
	width: 20%;
}

.wpps-opb-modal-fields-table th:nth-child(2),
.wpps-opb-modal-fields-table td:nth-child(2) {
	width: 22%;
}

.wpps-opb-modal-fields-table th:nth-child(3),
.wpps-opb-modal-fields-table td:nth-child(3) {
	width: 14%;
}

.wpps-opb-modal-fields-table th:nth-child(4),
.wpps-opb-modal-fields-table td:nth-child(4) {
	width: 44%;
	min-width: 0;
}

.wpps-opb-modal-fields-table th {
	background: var(--opb-bg);
	font-weight: 600;
	color: var(--opb-black);
}

.wpps-opb-modal-fields-table td code {
	font-family: ui-monospace, monospace;
	background: var(--opb-bg);
	padding: 2px 6px;
}

.wpps-opb-page-layout .wpps-opb-section-card {
	display: none;
}

.wpps-opb-page-layout .wpps-opb-section-card.is-active {
	display: block;
}

.wpps-opb-checkbox-label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	font-weight: 400;
	font-size: 13px;
	line-height: 1.4;
	color: #1d2327;
	cursor: pointer;
}

.wpps-opb-live-fields .wpps-opb-checkbox-label input[type="checkbox"] {
	margin: 0;
	flex-shrink: 0;
}

.wpps-opb-field-width-full {
	width: 100%;
}

.wpps-opb-field-width-1-2 {
	width: calc(50% - 10px);
}

.wpps-opb-field-width-1-3 {
	width: calc(33.333% - 14px);
}

.wpps-opb-field-width-2-3 {
	width: calc(66.666% - 10px);
}

@media (max-width: 782px) {
	.wpps-opb-field-width-1-2,
	.wpps-opb-field-width-1-3,
	.wpps-opb-field-width-2-3 {
		width: 100%;
	}
}

/* Responsive */
@media (max-width: 1024px) {
	.wpps-opb-editor-layout,
	.wpps-opb-editor-container {
		flex-direction: column;
	}

	.wpps-opb-quickadd-column,
	.wpps-opb-sidebar {
		width: 100%;
		position: static;
	}

	.wpps-opb-quickadd-panel {
		position: static;
	}
}

@media (max-width: 782px) {
	.wpps-opb-header-row {
		flex-direction: column;
		align-items: flex-start;
		gap: 16px;
	}

	.wpps-opb-stats {
		grid-template-columns: 1fr;
	}

	.wpps-opb-settings-grid,
	.wpps-opb-settings-grid-3col,
	.wpps-opb-settings-grid-4col {
		grid-template-columns: 1fr;
	}

	.wpps-opb-quick-add-grid {
		grid-template-columns: 1fr;
	}

	.wpps-opb-field-row-2col,
	.wpps-opb-field-row-3col {
		grid-template-columns: 1fr;
	}

	.wpps-opb-container,
	.wpps-opb-editor-container {
		flex-direction: column;
	}

	.wpps-opb-sidebar,
	.wpps-opb-quickadd-column {
		width: 100%;
		position: static;
	}

	.wpps-opb-page-item-content {
		flex-direction: column;
		align-items: flex-start;
		gap: 10px;
	}

	.wpps-opb-page-settings .form-table th,
	.wpps-opb-page-settings .form-table td {
		display: block;
		width: 100%;
		padding-left: 0;
		padding-right: 0;
	}
}

/* -------------------------------------------------------------------------
   PowerSuite workbench UI (list view, panels, page rows)
   ------------------------------------------------------------------------- */

.wpps-opb-list-header h2 {
	margin: 0 0 4px;
	font-size: 14px;
	font-weight: 600;
	color: #1d2327;
}

.wpps-opb-list-header .description {
	margin: 0 0 16px;
}

.wpps-opb-pages-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.wpps-opb-page-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 15px;
	background: var(--opb-bg);
	border: 1px solid #dcdcde;
	border-radius: var(--opb-radius);
	transition: all 0.2s;
}

.wpps-opb-page-item:hover {
	background: #fff;
	border-color: var(--opb-blue);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.wpps-opb-page-item-icon {
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 20px;
	color: #50575e;
	flex-shrink: 0;
}

.wpps-opb-page-item-content {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-width: 0;
}

.wpps-opb-page-item-info {
	min-width: 0;
}

.wpps-opb-page-item-title {
	display: block;
	font-size: 14px;
	font-weight: 600;
	color: #1d2327;
	text-decoration: none;
	margin-bottom: 2px;
}

.wpps-opb-page-item-title:hover {
	color: var(--opb-blue);
}

.wpps-opb-page-item-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	color: #646970;
}

.wpps-opb-page-item-meta code {
	font-size: 11px;
	background: #f0f0f1;
	padding: 2px 6px;
	border-radius: 3px;
}

.wpps-opb-page-item-sep {
	color: #c3c4c7;
}

.wpps-opb-page-item-actions {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-shrink: 0;
}

.wpps-opb-empty-state {
	text-align: center;
	padding: 48px 24px;
}

.wpps-opb-empty-state .wpps-opb-empty-icon {
	font-size: 48px;
	width: 48px;
	height: 48px;
	color: #c3c4c7;
	margin-bottom: 12px;
}

.wpps-opb-empty-state h3 {
	margin: 0 0 8px;
	font-size: 16px;
	color: #1d2327;
}

.wpps-opb-empty-state .description {
	margin: 0 0 20px;
	max-width: 420px;
	margin-left: auto;
	margin-right: auto;
}

/* Save / delete bars — match Login Page Customizer */
.wpps-opb-actions-wrapper {
	display: flex;
	justify-content: flex-end;
	margin: 0 0 16px;
}

.wpps-opb-actions-wrapper--bottom {
	margin: 24px 0 0;
	padding-top: 20px;
	border-top: 1px solid var(--wpps-admin-border-light, #dcdcde);
}

.wpps-opb-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
}

.wpps-opb-page .opb-save-page.is-busy {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	pointer-events: none;
	opacity: 0.9;
}

.wpps-opb-panel > h2 {
	margin: 0 0 4px;
	font-size: 14px;
	font-weight: 600;
}

.wpps-opb-panel > .description {
	margin: 0 0 16px;
}

.wpps-opb-page-settings {
	margin-bottom: 20px;
}

.wpps-opb-page-settings .form-table {
	margin-top: 0;
	width: 100%;
}

.wpps-opb-page-settings .form-table th {
	width: 200px;
	padding: 12px 10px 12px 0;
	vertical-align: top;
}

.wpps-opb-page-settings .form-table td {
	padding: 12px 10px;
	vertical-align: top;
}

.wpps-opb-page-settings .form-table tr td + th {
	padding-left: 24px;
}

.wpps-opb-page-settings .form-table .regular-text,
.wpps-opb-page-settings .form-table .large-text,
.wpps-opb-page-settings .form-table select.regular-text,
.wpps-opb-page-settings .form-table textarea.large-text {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

.wpps-opb-required {
	color: #d63638;
}

.wpps-opb-page .button .dashicons {
	margin-top: 3px;
}

.wpps-opb-form {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.wpps-opb-save-indicator {
	font-size: 12px;
	color: #646970;
	min-width: 80px;
	text-align: right;
}

.wpps-opb-save-indicator.is-saving {
	color: var(--opb-blue);
}

.wpps-opb-save-indicator.is-saved {
	color: #00a32a;
}

.wpps-opb-save-indicator.is-error {
	color: #d63638;
}

/* Quick add buttons — theme accent */
.wpps-opb-quick-add-btn:hover {
	background: var(--wpps-accent-surface);
	border-color: var(--opb-blue);
	color: var(--opb-blue-hover);
}

.wpps-opb-quick-add-group {
	background: var(--wpps-accent-surface) !important;
	border: 2px dashed var(--opb-blue) !important;
}

.wpps-opb-quick-add-group:hover {
	background: #fff !important;
	border-style: solid !important;
}

/* Shared modal pattern (Admin Menu Organizer / Admin Columns) */
.wpps-opb-page .wpps-modal,
.wpps-opb-modal.wpps-modal {
	display: none;
	position: fixed;
	z-index: 100000;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.5);
	align-items: center;
	justify-content: center;
}

.wpps-opb-page .wpps-modal.active,
.wpps-opb-modal.wpps-modal.active {
	display: flex;
}

.wpps-opb-page .wpps-modal-content,
.wpps-opb-modal .wpps-modal-content {
	background: #fff;
	border-radius: 4px;
	width: 90%;
	max-width: 600px;
	max-height: 90vh;
	overflow: auto;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.wpps-opb-page .wpps-modal-header,
.wpps-opb-modal .wpps-modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 20px;
	border-bottom: 1px solid #dcdcde;
}

.wpps-opb-page .wpps-modal-header h3,
.wpps-opb-modal .wpps-modal-header h3 {
	margin: 0;
}

.wpps-opb-page .wpps-modal-close,
.wpps-opb-modal .wpps-modal-close {
	background: none;
	border: none;
	font-size: 24px;
	cursor: pointer;
	color: #646970;
	padding: 0;
	width: 30px;
	height: 30px;
	line-height: 1;
}

.wpps-opb-page .wpps-modal-close:hover,
.wpps-opb-modal .wpps-modal-close:hover {
	color: #1d2327;
}

.wpps-opb-page .wpps-modal-body,
.wpps-opb-modal .wpps-modal-body {
	padding: 20px;
}

.wpps-opb-page .wpps-modal-footer,
.wpps-opb-modal .wpps-modal-footer {
	padding: 15px 20px;
	border-top: 1px solid #dcdcde;
	display: flex;
	justify-content: flex-end;
	gap: 10px;
}

/* Extended field types & builder extras */
.wpps-opb-live-field--hidden {
	display: none !important;
}

.wpps-opb-affix-wrap {
	display: flex;
	align-items: stretch;
	max-width: 100%;
}

.wpps-opb-affix-wrap > .regular-text,
.wpps-opb-affix-wrap > input[type="number"],
.wpps-opb-affix-wrap > input[type="email"],
.wpps-opb-affix-wrap > input[type="url"] {
	flex: 1;
	min-width: 0;
}

.wpps-opb-affix {
	display: inline-flex;
	align-items: center;
	padding: 0 10px;
	background: #f6f7f7;
	border: 1px solid #8c8f94;
	color: #50575e;
	font-size: 13px;
	white-space: nowrap;
}

.wpps-opb-affix--prefix {
	border-right: 0;
	border-radius: 4px 0 0 4px;
}

.wpps-opb-affix--suffix {
	border-left: 0;
	border-radius: 0 4px 4px 0;
}

.wpps-opb-affix-wrap > .regular-text + .wpps-opb-affix--suffix,
.wpps-opb-affix-wrap > input + .wpps-opb-affix--suffix {
	border-radius: 0;
}

.wpps-opb-affix-wrap > .wpps-opb-affix--prefix + .regular-text,
.wpps-opb-affix-wrap > .wpps-opb-affix--prefix + input {
	border-radius: 0 4px 4px 0;
}

.wpps-opb-color-palette {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 8px;
}

.wpps-opb-color-swatch {
	width: 28px;
	height: 28px;
	padding: 0;
	border: 2px solid #fff;
	border-radius: 4px;
	box-shadow: 0 0 0 1px #c3c4c7;
	cursor: pointer;
}

.wpps-opb-color-swatch:hover {
	box-shadow: 0 0 0 2px var(--opb-blue, #2271b1);
}

.wpps-opb-media-wrap .wpps-opb-image-preview {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 8px;
}

.wpps-opb-media-item {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 12px 8px 8px;
	background: #f6f7f7;
	border: 1px solid #dcdcde;
	border-radius: 6px;
	max-width: 100%;
}

.wpps-opb-media-item img {
	display: block;
	max-width: 120px;
	height: auto;
	border-radius: 4px;
}

.wpps-opb-file-name {
	font-size: 13px;
	color: #1d2327;
	word-break: break-word;
}

.wpps-opb-media-item .wpps-opb-image-remove {
	position: absolute;
	top: -6px;
	right: -6px;
	width: 22px;
	height: 22px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: #d63638;
	color: #fff;
	cursor: pointer;
	line-height: 1;
}

.wpps-opb-media-item .wpps-opb-image-remove .dashicons {
	font-size: 14px;
	width: 14px;
	height: 14px;
	line-height: 14px;
}

.wpps-opb-message-field {
	padding: 12px 14px;
	background: #f6f7f7;
	border: 1px solid #dcdcde;
	border-radius: 6px;
	font-size: 14px;
	line-height: 1.5;
}

.wpps-opb-message-field p:first-child {
	margin-top: 0;
}

.wpps-opb-message-field p:last-child {
	margin-bottom: 0;
}

.wpps-opb-radio-clear {
	margin-top: 6px;
	padding-left: 0 !important;
}

.wpps-opb-select-wrap--inline select.regular-text {
	width: auto;
	min-width: 200px;
}

.wpps-opb-field-actions {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.wpps-opb-snippet-code {
	font-size: 11px;
}

/* Toggle */
.wpps-opb-toggle {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	user-select: none;
}

.wpps-opb-toggle input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

.wpps-opb-toggle__slider {
	position: relative;
	width: 44px;
	height: 24px;
	background: #c3c4c7;
	border-radius: 24px;
	transition: background 0.2s ease;
	flex-shrink: 0;
}

.wpps-opb-toggle__slider::before {
	content: '';
	position: absolute;
	top: 3px;
	left: 3px;
	width: 18px;
	height: 18px;
	background: #fff;
	border-radius: 50%;
	transition: transform 0.2s ease;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.wpps-opb-toggle input:checked + .wpps-opb-toggle__slider {
	background: #2271b1;
}

.wpps-opb-toggle input:checked + .wpps-opb-toggle__slider::before {
	transform: translateX(20px);
}

.wpps-opb-toggle--compact .wpps-opb-toggle__slider {
	width: 36px;
	height: 20px;
}

.wpps-opb-toggle--compact .wpps-opb-toggle__slider::before {
	width: 14px;
	height: 14px;
}

.wpps-opb-toggle--compact input:checked + .wpps-opb-toggle__slider::before {
	transform: translateX(16px);
}

/* Link */
.wpps-opb-link-field p {
	margin: 0 0 12px;
}

.wpps-opb-link-field p:last-child {
	margin-bottom: 0;
}

.wpps-opb-link-field label {
	display: block;
	font-weight: 600;
	margin-bottom: 4px;
}

/* Gallery */
.wpps-opb-gallery-preview {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 10px;
}

.wpps-opb-gallery-preview .wpps-opb-media-item {
	cursor: move;
}

.wpps-opb-gallery-placeholder {
	width: 120px;
	height: 80px;
	border: 2px dashed #c3c4c7;
	border-radius: 4px;
	background: #f6f7f7;
}

/* Repeater */
.wpps-opb-repeater__rows {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-bottom: 12px;
}

.wpps-opb-repeater__row {
	border: 1px solid #dcdcde;
	border-radius: 6px;
	background: #fff;
}

.wpps-opb-repeater__row-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 8px 12px;
	background: #f6f7f7;
	border-bottom: 1px solid #dcdcde;
}

.wpps-opb-repeater__row-body {
	padding: 12px;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 12px;
}

.wpps-opb-repeater__subfield-label {
	display: block;
	font-weight: 600;
	margin-bottom: 4px;
	font-size: 12px;
}

.wpps-opb-subfields-editor {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-bottom: 8px;
}

.wpps-opb-subfield-row {
	display: grid;
	grid-template-columns: 1fr 1fr 140px 32px;
	gap: 8px;
	align-items: center;
}
