.sdcof-filter-col {
	display: inline-block;
	margin-right: 2px;
	vertical-align: top;
	margin-bottom: 2px;
}
.sdcof-filter-col.hidden {
	display: none;
}
.tablenav .hidden,
#sdcof-selected-list-wrp.hidden {
	display: none !important;
}
.sdcof-status-helper {
	min-height: 32px;
	width: 12.5rem;
	position: relative;
	padding: 0.2rem 1.4rem 0.2rem 0.2rem;
	border-radius: 4px;
	border: 1px solid #8c8f94;
	background: white;
	box-sizing: border-box;
	cursor: pointer;
	display: flex;
	align-items: center;
}
.sdcof-status-content {
	display: none;
	position: absolute;
	width: 100%;
	z-index: 10000;
}
.sdcof-dropdown-toggle {
	position: absolute;
	top: 8px;
	right: 3px;
	padding-right: 0;
	font-size: 1rem;
	color: #555555;
}
.sdcof-status-block {
	position: relative;
	margin-bottom: 1px;
}
.sdcof-status-wrp {
	max-height: 450px;
	overflow-y: auto;
	overflow-x: hidden;
	z-index: 3;
	background: #fff;
	padding: 5px;
	border: 1px solid #8c8f94;
	border-top: none;
}
.sdcof-status-wrp.sdcof-status-wrp-hierarchical {
	max-height: 600px;
}
.sdcof-status-toggle-wrp {
	border-bottom: 1px solid #eaebec;
	font-size: 80%;
	padding-bottom: 0.2rem;
	display: flex;
	justify-content: space-between;
}
.sdcof-status-wrp label {
	font-weight: normal;
	display: block;
	width: 100%;
	cursor: pointer;
	margin: 0;
	padding: 4px 3px;
}
.sdcof-status-wrp label input[type="checkbox"] {
	height: 16px;
	width: 16px;
}
.sdcof-status-helper-text .sdcof-dropdown-option-selected {
	font-weight: normal;
	padding: 2px 5px;
	cursor: pointer;
	margin: 0;
	color: #333;
	white-space: nowrap;
	text-align: left;
	font-size: 0.625rem;
	background: white;
	border-radius: 4px;
}
.sdcof-status-block .sdcof-status-marker {
	width: 10px;
	height: 10px;
	display: inline-block;
	border-radius: 100%;
	position: relative;
	top: -1px;
	box-sizing: border-box;
}
.sdcof-status-block .sdcof-status-line-marker {
	width: 10px;
	height: 10px;
	display: inline-block;
	border-radius: 100%;
	position: relative;
	top: -1px;
	box-sizing: border-box;
	vertical-align: middle;
}
.sdcof-dropdown-option-selected .sdcof-status-marker {
	white-space: nowrap;
	margin-right: 2px;
}
.sdcof-status-marker-with-text {
	white-space: nowrap;
	display: inline-block;
}
.sdcof-status-marker-with-text .sdcof-status-name {
	white-space: normal;
}
.sdcof-status-helper-text-empty {
	padding: 0.3rem;
	color: #999;
	position: relative;
	user-select: none;
}
.sdcof-status-toggle-all:focus,
.sdcof-status-toggle-all:active,
.sdcof-status-toggle-all:hover {
	outline: none;
	box-shadow: none;
	border-color: transparent;
}

/* Custom columns styles */
.column-customer_email {
	width: 15%;
}

/* Screen options styles */
.hide-column-tog[name="customer_email-hide"] + label {
	font-weight: bold;
}
.customer-select-wrapper {
	display: inline;
}
.sdcof-filter-col-active .sdcof-range-input,
.sdcof-filter-col-active .sdcof_search_text,
.sdcof-filter-col-active .sdcof_search_date,
.sdcof-filter-col-active .sdcof-status-helper,
.sdcof-filter-col-active .sdcof_select,
.tablenav .actions .sdcof_input_with_value,
.tablenav .actions .select2-selection.sdcof_input_with_value {
	background: #f0f6fc;
	box-shadow: 0 3px 0 #72aee6;
}
#sdcof-filters {
	display: contents;
}
.sdcof-filters-spacer {
	display: inline-block;
	width: 5px;
}
.sdcof-status-arrow {
	color: #999;
	font-weight: bold;
	margin: 0 2px;
}
.sdcof-status-history-wrp .order-status {
	line-height: 1.25;
	padding: 0.2rem 0.4rem;
}
#wpbody .sdcof-reset-button {
	height: 32px;
	background-color: #f8dda7;
	color: #573b00;
	border-color: #d8b13c;
	margin-right: 3px;
	margin-left: 5px;
}
#wpbody .sdcof-reset-button:hover {
	background-color: #f0b000;
	border-color: #c39000;
}
#wpbody .sdcof-button {
	height: 32px;
}
#wpbody #sdcof-save-set-wrp .sdcof-button {
	margin-left: 2px;
	border-color: #cccccc;
	height: 30px;
	background-color: #fff;
	padding: 0 0.6rem 0 0.3rem;
}
#wpbody #sdcof-save-set-wrp .sdcof-button:hover {
	background-color: #fafafa;
}
#wpbody .sdcof-views-exist #sdcof-save-set,
#wpbody .sdcof-views-exist #sdcof-edit-set {
	padding-right: 0.3rem;
}

#sdcof-custom-views-wrp.sdcof-views-empty .sdcof-save-set-text-empty {
	display: inline-block;
}
#sdcof-custom-views-wrp.sdcof-views-empty .sdcof-save-set-text-exist {
	display: none;
}
#sdcof-custom-views-wrp.sdcof-views-exist .sdcof-save-set-text-empty {
	display: none;
}
#sdcof-custom-views-wrp.sdcof-views-exist .sdcof-save-set-text-exist {
	display: inline-block;
}

#sdcof-custom-views-wrp.sdcof-views-empty #sdcof_set_select {
	display: none;
}

.sdcof-button .dashicons {
	font-size: 0.9rem;
	line-height: 29px;
}
.sdcof_search_text::placeholder {
	color: #999;
	padding: 0;
	position: relative;
	user-select: none;
	font-size: 13px;
}
.sdcof-tooltip-wrapper {
	font-size: 11px;
	color: #888;
	cursor: default;
	border: 1px solid #999;
	border-radius: 50%;
	padding: 0;
	display: inline-block;
	width: 12px;
	height: 12px;
	text-align: center;
	line-height: 12px;
	position: relative;
}

/* Position filter col content relatively for absolute icon positioning */
.sdcof-filter-col-content {
	position: relative;
}

/* Filter hint icon - positioned inside text field */
.sdcof-filter-hint {
	position: absolute;
	right: 5px;
	top: 50%;
	transform: translateY(-50%);
	opacity: 0;
	transition: opacity 0.2s ease;
	pointer-events: all;
	z-index: 1;
}

/* Show hint icon on hover */
.sdcof-filter-col:hover .sdcof-filter-hint {
	opacity: 1;
}

#sdcof-empty-search-hint strong {
	background: white;
	color: black;
	padding: 0 3px;
	border-radius: 2px;
	display: inline-block;
	height: 1rem;
	line-height: 1rem;
	margin: 0 2px;
}

.sdcof-product-quantity {
	white-space: nowrap;
}

.sdcof-products-wrp .sdcof-product {
	line-height: 1.3;
}
.sdcof-products-wrp .sdcof-product-quantity.multiple {
	font-weight: 600;
}

/* Product Details Column */
.sdcof-product-details-wrp {
	max-width: 300px;
}

.sdcof-product-detail-item {
	display: block;
	line-height: normal;
    margin-bottom: 0;
    padding-bottom: 3px;
	border-bottom: 1px solid #f0f0f0;
}

.sdcof-product-detail-item img {
	vertical-align: text-bottom;
	margin-right: 3px;
}

.sdcof-product-detail-item:last-child {
	margin-bottom: 0;
	padding-bottom: 0;
	border-bottom: none;
}

.sdcof-product-image {
	margin-right: 5px;
	flex-shrink: 0;
	line-height: 1;
	vertical-align: text-bottom;
}

.sdcof-product-info {
	flex-grow: 1;
}

.sdcof-product-name {
	/* font-weight: bold; */
	margin-bottom: 3px;
}

.sdcof-product-reference,
.sdcof-product-supplier-reference,
.sdcof-product-ean13,
.sdcof-product-upc,
.sdcof-product-mpn,
.sdcof-product-price,
.sdcof-product-quantity {
	font-size: 12px;
	margin-bottom: 2px;
}

.sdcof-product-info .label {
	font-weight: 600;
	color: #555;
}

/* Product Preview Popup */
.sdcof-preview-button {
	white-space: nowrap;
}

.sdcof-preview-popup {
	--arrow-position: 20px;
	background: #fff;
	border-radius: 4px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
	border: 2px solid #000;
	max-width: 800px;
	overflow: visible;
	z-index: 1000;
	position: absolute;
}

.sdcof-preview-header {
	background-color: #f9f9f9;
	padding: 10px 15px;
	border-bottom: 1px solid #ddd;
}

.sdcof-preview-header h2 {
	margin: 0;
	font-size: 16px;
}

.sdcof-preview-content {
	max-height: 600px;
	overflow-y: auto;
	box-sizing: border-box;
}

.sdcof-preview-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}

.sdcof-preview-table th,
.sdcof-preview-table td {
	padding: 8px;
	text-align: left;
	border-bottom: 1px solid #eee;
}

.sdcof-preview-table th {
	background-color: #f8f8f8;
	font-weight: 600;
}

.sdcof-preview-table .product-image {
	width: 50px;
}

.sdcof-preview-table .product-image img {
	max-width: 40px;
	height: auto;
	display: block;
}

.sdcof-preview-table .product-name {
	min-width: 200px;
}

.sdcof-preview-table .product-sku,
.sdcof-preview-table .product-price,
.sdcof-preview-table .product-quantity,
.sdcof-preview-table .product-total {
	white-space: nowrap;
}

.sdcof-preview-table .product-variation {
	font-size: 11px;
	color: #555;
	margin-top: 0px;
}

.sdcof-preview-table .variation-item {
	display: block;
	line-height: normal;
}

.sdcof-preview-table .variation-item p {
	display: inline-block;
	font-weight: 600;
	padding: 0;
	margin: 0;
}

.sdcof-preview-table tfoot th,
.sdcof-preview-table tfoot td {
	border-top: 1px solid #ddd;
	border-bottom: none;
}

.sdcof-preview-table tfoot .order-total th,
.sdcof-preview-table tfoot .order-total td {
	font-weight: bold;
	color: #000;
}

.sdcof-preview-table tfoot .total-label {
	text-align: right;
}

/* Add an arrow pointing to the icon */
.sdcof-preview-popup:before {
	content: '';
	position: absolute;
	top: -10px;
	left: var(--arrow-position);
	width: 0;
	height: 0;
	border-left: 10px solid transparent;
	border-right: 10px solid transparent;
	border-bottom: 10px solid #000;
	margin-left: -10px;
}

/* Add an arrow at the bottom for when preview appears above the icon */
.sdcof-preview-popup.arrow-bottom:before {
	top: auto;
	bottom: -10px;
	border-bottom: none;
	border-top: 10px solid #000;
	position: absolute;
}

/* jQuery UI dialog styles removed - converting to WooCommerce modals */

/* Settings Modal */
.sdcof-settings-modal {
	background: #fff;
	padding: 20px;
	max-width: 500px;
	border-radius: 4px;
	box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.sdcof-settings-modal h2 {
	margin-top: 0;
	border-bottom: 1px solid #eee;
	padding-bottom: 10px;
	margin-bottom: 15px;
}

.sdcof-settings-option {
	display: block;
	margin-bottom: 10px;
	padding: 5px 0;
}

.sdcof-settings-option input[type="checkbox"] {
	margin-right: 8px;
}

.sdcof-settings-actions {
	margin-top: 20px;
	text-align: right;
	border-top: 1px solid #eee;
	padding-top: 15px;
}

.sdcof-settings-actions button {
	margin-left: 10px;
}

/* Settings Icon */
.sdcof-settings-icon {
	display: inline-block;
	width: 15px;
	height: 15px;
	cursor: pointer;
	opacity: 0.6;
	vertical-align: text-bottom;
	margin-left: 3px;
	font-size: 15px;
}

.sdcof-settings-icon:hover {
	opacity: 1;
}

/* jQuery UI Dialog customization styles removed - converting to WooCommerce modals */

/* Make sure the modal title looks good */
.sdcof-settings-modal-title {
	margin-top: 0;
	border-bottom: 1px solid #eee;
	padding-bottom: 10px;
	margin-bottom: 15px;
	font-size: 1.3em;
	font-weight: 600;
}

/* Update tooltip positioning */
.sdcof-image-preview-trigger {
	position: relative;
	display: inline-block;
}

.sdcof-image-preview-tooltip {
	position: absolute;
	z-index: 1000;
	left: 0;
	bottom: 130%;
	transform: translateX(-50%);
	margin-left: 10px;
	background: #fff;
	padding: 0;
	border-radius: 3px;
	box-shadow: 0 2px 10px rgba(0,0,0,0.2);
	max-width: 250px;
	display: none;
}

.sdcof-image-preview-tooltip.active {
	display: block;
}

.sdcof-image-preview-tooltip img {
	max-width: 250px;
	height: auto;
	display: block;
}

/* Product preview styles */
.sdcof-preview-icon {
	cursor: pointer;
	position: relative;
	color: #0073aa;
	font-size: 20px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: color 0.2s ease;
	padding: 8px;
	margin: -8px;
	z-index: 1;
}

.sdcof-preview-icon:hover {
	color: #00a0d2;
}

.sdcof-preview-count {
	font-size: 10px;
	background: #e5e5e5;
	border-radius: 50%;
	width: 16px;
	height: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	position: absolute;
	top: 3px;
	right: 3px;
	font-weight: bold;
	color: #333;
}

/* Order notes preview specific styles */
.tooltipster-sdcof .sdcof-preview-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.tooltipster-sdcof .sdcof-preview-item {
	padding: 8px;
	border-bottom: 1px solid #eee;
}

.tooltipster-sdcof .sdcof-preview-item:last-child {
	border-bottom: none;
}

.sdcof-settings-modal .settings-section {
	margin-bottom: 15px;
}

.sdcof-settings-modal .settings-section h3 {
	margin: 10px 0;
	font-size: 14px;
	font-weight: 600;
}

.sdcof-settings-modal hr {
	margin: 15px 0;
	border: 0;
	height: 1px;
	background-color: #ddd;
}

.sdcof-initialized .sdcof-drag-handle {
	position: absolute;
	left: -20px;
	top: 5px;
	opacity: 0;
	font-size: 1rem;
}

.sdcof-initialized label {
	position: relative;
}

.sdcof-initialized label:hover .sdcof-drag-handle {
	opacity: 1;
}

/* Improved drag and drop styles */
.sdcof-initialized label {
	position: relative;
	padding-left: 0;
	transition: background-color 0.2s;
	border-radius: 3px;
	user-select: none;
	box-sizing: border-box;
}

.sdcof-initialized .sdcof-drag-handle {
	position: absolute;
	left: -6px;
	top: -9px;
	opacity: 0;
	font-size: 16px;
	color: #777;
	cursor: default;
	transition: opacity 0.2s, color 0.2s;
}

.sdcof-initialized label:hover {
	background-color: #f9f9f9;
}

.sdcof-initialized label:hover .sdcof-drag-handle {
	opacity: 0.7;
}

.sdcof-initialized label:hover .sdcof-drag-handle:hover {
	opacity: 1;
	color: #0073aa;
}

.sdcof-sortable-placeholder {
	outline: 2px dashed #0073aa;
	background-color: #f0f6fc;
	border-radius: 3px;
	box-sizing: border-box;
	min-height: 24px;
	float: left;
	margin-right: 8px;
	margin-bottom: 4px;
}

.sdcof-dragging {
	background-color: #f0f6fc !important;
	outline: 1px solid #72aee6;
	border-radius: 3px;
	box-shadow: 0 2px 5px rgba(0,0,0,0.1);
	z-index: 1000 !important;
}
#sdcof-selected-list-wrp {
	max-width: 80%;
	clear: both;
}
#sdcof-selected-list {
	padding-top: 0.6rem;
	margin-bottom: 0;
}
#sdcof-selected-list .badge {
	cursor: pointer;
	background-color: #4288c1;
	display: inline-block;
	padding: .25rem .5rem;
	font-size: 0.725rem;
	font-weight: normal;
	line-height: 1;
	text-align: center;
	white-space: nowrap;
	vertical-align: top;
	border-radius: 4px;
	color: white;
	margin-left: 0.25rem;
}

/* Toggle Switch Styles */
.sdcof-filter-options .sdcof-switch-label {
	position: relative;
	display: inline-flex;
	align-items: center;
	cursor: default;
	user-select: none;
}

.sdcof-filter-options .sdcof-switch-checkbox {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

.sdcof-filter-options .sdcof-switch {
	position: relative;
	display: inline-block;
	width: 30px;
	height: 16px;
	background-color: #ccc;
	border-radius: 18px;
	margin-right: 8px;
	transition: background-color 0.2s;
	cursor: pointer;
}

.sdcof-filter-options .sdcof-switch:before {
	position: absolute;
	content: "";
	height: 12px;
	width: 12px;
	left: 2px;
	bottom: 2px;
	background-color: white;
	border-radius: 50%;
	transition: transform 0.2s;
}

.sdcof-filter-options .sdcof-switch-checkbox:checked + .sdcof-switch {
	background-color: #2271b1;
}

.sdcof-filter-options .sdcof-switch-checkbox:checked + .sdcof-switch:before {
	transform: translateX(14px);
}

.sdcof-filter-options .sdcof-switch-checkbox:focus + .sdcof-switch {
	box-shadow: 0 0 1px #2271b1;
}

/* Disabled state */
.sdcof-filter-options .sdcof-switch-checkbox:disabled + .sdcof-switch {
	opacity: 0.5;
	cursor: not-allowed;
}

.sdcof-filter-options .sdcof-switch-checkbox:disabled ~ span {
	opacity: 0.5;
	cursor: not-allowed;
}

.sdcof-filter-options .sdcof-switch-label:hover {
	background: none;
}
#sdcof-selected-list .sdcof-selected-filter-value {
	font-style: italic;
}
.sdcof-filter-metabox-prefs {
	margin-top: 5px;
}
.sdcof-filter-col .sdcof_label_range {
	display: block;
}
#wpcontent .sdcof-filter-col .sdcof-range-input {
	display: inline-block;
	width: 4rem;
	padding: 1px;
	height: 1.1rem;
	line-height: 1;
	min-height: 1rem;
	text-align: center;
	font-size: 0.8rem;
}
.sdcof-filter-col .sdcof_range_slider_wrp {
	width: 12.5rem;
	position: relative;
	top: 3px;
	padding-right: 0.6rem;
	box-sizing: border-box;
}
.sdcof_range_slider_wrp .ui-slider-horizontal {
	height: 0.5rem;
}
.sdcof_range_slider_wrp .ui-slider .ui-slider-handle {
	width: 0.6rem;
	height: 1rem;
	top: -0.3rem;
	border: 1px solid #999;
	margin-left: -1px;
}
.sdcof-label-filter {
	vertical-align: baseline;
}
.sdcof-filter-loading {
	opacity: 0.75;
}
.sdcof-dates-block {
	display: flex;
	justify-content: space-between;
	width: 12.5rem;
	align-items: center;
}
.sdcof-dates-block .input-group {
	display: block;
	align-items: center;
	width: 48%;
}
.sdcof-dates-block .sdcof_search_date {
	width: 100%;
}
body .sdcof-flatpickr-clear.button {
	margin-bottom: 4px;
	line-height: 1.45;
	min-height: 0;
	border: 1px solid #c3c4c7;
	color: #646970;
}

.sdcof-loading-indicator {
	position: fixed;
	bottom: 20px;
	right: 20px;
	background: #fff;
	padding: 10px 20px;
	border-radius: 4px;
	box-shadow: 0 2px 5px rgba(0,0,0,0.2);
	display: none;
	align-items: center;
	z-index: 9999;
}

.sdcof-loading-indicator .spinner {
	margin-right: 8px;
	float: none;
	visibility: visible;
}

.sdcof-infinite-scroll-loader .sdcof-loading-message {
	text-align: center;
	padding: 15px;
	color: #666;
}

.sdcof-infinite-scroll-loader .spinner {
	float: none;
	margin-top: -4px;
	margin-right: 5px;
}

/* Infinite scroll: Hide pagination when enabled (prevents blink on page load) */
.sdcof-infinite-scroll-enabled .tablenav-pages {
	display: none !important;
}

/* Hide status bar when infinite scroll is disabled */
body:not(.sdcof-infinite-scroll-enabled) .sdcof-infinite-status {
	display: none !important;
}

/* Infinite scroll status bar - matches WP/Woo admin pagination style */
.sdcof-infinite-status {
	display: inline-flex;
	align-items: center;
	font-size: 13px;
	color: #50575e;
	padding: 20px 0 0 8px;
	line-height: 1;
	white-space: nowrap;
	float: right;
	margin: -15px 0 10px 0;
}

.sdcof-infinite-status strong {
	color: #2c3338;
	font-weight: 600;
	padding: 0 4px;
}

/* Bottom status bar */
.tablenav.bottom .sdcof-infinite-status {
	margin: 9px 0 0 8px;
}

/* Mobile responsive */
@media screen and (max-width: 782px) {
	.sdcof-infinite-status {
		display: block !important;
		float: none !important;
		text-align: center;
		margin: 10px 0;
		padding: 8px 12px;
		background: #f6f7f7;
		border-radius: 4px;
		font-size: 14px;
	}
}

.sdcof_search_input.flatpickr-input {
	background-color: #fff;
}

.sdcof-preview-popup.arrow-side:before {
	content: '';
	position: absolute;
	top: var(--arrow-offset, 50%); /* defaults to 50% if --arrow-offset isn't defined */
	left: -10px;
	width: 0;
	height: 0;
	border-top: 10px solid transparent;
	border-bottom: 10px solid transparent;
	border-right: 10px solid #000;
	margin-top: -10px;
}

.alignleft.actions.bulkactions {
	margin-bottom: 3px;
}

.sdcof-screen-options-info {
	font-size: 0.75rem;
	color: #666;
	font-style: italic;
	margin-bottom: 1rem;
}

.sdcof-parent-item {
	margin-bottom: 8px;
}

.sdcof-toggle-children {
	cursor: pointer;
	margin-left: 5px;
	color: #999;
	font-size: 1rem;
	position: relative;
	top: 1px;
}

.sdcof-toggle-children:hover {
	color: #2271b1;
}

.sdcof-children-container {
	margin-top: 5px;
}

.sdcof-children-container label {
	padding: 2px 0;
	margin-bottom: 3px;
	font-size: 0.9em;
}

.sdcof-status-wrp .sdcof-parent-item > label {
	font-weight: 600;
}

.sdcof-shipping-country {
	line-height: normal;
}

.sdcof-shipping-country.f16 .flag {
	vertical-align: sub;
	margin-right: 0.25rem;
}

.sdcof-recipient-wrp {
	line-height: 1.4;
}

.sdcof-recipient-wrp .sdcof-recipient-name a {
	color: #50575e;
	font-weight: 500;
}

.sdcof-recipient-wrp .sdcof-recipient-email,
.sdcof-recipient-wrp .sdcof-recipient-phone {
	display: flex;
	align-items: baseline;
	word-break: break-all;
}

.sdcof-recipient-wrp .dashicons {
	font-size: 0.8rem;
	flex-shrink: 0;
	margin-right: 0;
	position: relative;
	top: 2px;
	vertical-align: baseline;
	width: auto;
	height: auto;
}

.sdcof-recipient-wrp a:hover {
	text-decoration: underline;
}

.column-sdcof_employee,
#wpbody .column-sdcof_employee {
	line-height: 1.5;
}

.column-sdcof_new_client .dashicons {
	vertical-align: text-top;
}

.column-sdcof_new_client .dashicons-image-rotate {
	font-size: 0.8rem;
	vertical-align: baseline;
	position: relative;
	top: 2px;
}

#wpbody .sdcof_select.sdcof_empty_select {
	color: #999;
}
#wpbody .sdcof_select.sdcof_empty_select option {
	color: #333;
}
.column-sdcof_customer_type .dashicons {
	font-size: 0.8rem;
	vertical-align: baseline;
	position: relative;
	top: 2px;
}

#sdcof-save-set-form {
	padding: 10px;
	position: absolute;
	background: white;
	border: 3px solid #000;
	border-radius: 4px;
	z-index: 1000;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
	transform: translateY(8px);
	left: 0;
	max-width: calc(100vw - 40px);
}

#sdcof-save-set-form .sdcof-set-form-wrp {
	display: flex;
	align-items: center;
	gap: 8px;
	white-space: nowrap;
	width: 100%;
}

#sdcof-save-set-form .sdcof-set-hint {
	margin: 0 0 10px 0;
	font-style: italic;
}

#sdcof-save-set-form .sdcof-set-hint-edit {
	display: none;
}

#sdcof-save-set-form.sdcof-edit .sdcof-set-hint-edit {
	display: block;
}

#sdcof-save-set-form.sdcof-edit .sdcof-set-hint-new {
	display: none;
}

/* View limit message for Lite version */
#sdcof-save-set-form .sdcof-view-limit-message {
	margin-top: 10px;
	padding-top: 10px;
	border-top: 1px solid #c3c4c7;
}

#sdcof-save-set-form .sdcof-view-limit-text {
	margin: 0;
	color: #646970;
	font-size: 12px;
	font-style: italic;
}

#sdcof-save-set-form .sdcof-view-limit-text a {
	color: #2271b1;
	text-decoration: none;
}

#sdcof-save-set-form .sdcof-view-limit-text a:hover {
	color: #135e96;
	text-decoration: underline;
}

/* Grey out form when view limit reached */
#sdcof-save-set-form.sdcof-view-limit .sdcof-set-form-wrp {
	opacity: 0.6;
	pointer-events: none;
}

#sdcof-save-set-form.sdcof-view-limit .sdcof-set-hint {
	display: none;
}

/* Update the arrow positioning in the form */
#sdcof-save-set-form:before {
	content: '';
	position: absolute;
	top: -10px;
	left: var(--arrow-offset, 20px);
	width: 0;
	height: 0;
	border-left: 10px solid transparent;
	border-right: 10px solid transparent;
	border-bottom: 10px solid #000;
	transform: translateX(-50%);
}

#sdcof-save-set-form.right-aligned:before {
	left: auto;
	right: auto;
}

#sdcof-save-set-form input[type="text"] {
	margin-right: 8px;
}

#sdcof-save-set-form input[type="checkbox"] {
	margin: 0 4px 0 0;
}
@media (min-width: 783px) {
	#sdcof-save-set-form input[type="checkbox"] {
		width: 1rem;
		height: 1rem;
	}
}

#sdcof-save-set-form .sp-replacer {
	vertical-align: middle;
	height: 30px;
	margin-right: 8px;
}

/* Make the checkbox and Pin label display nicely inline */
#sdcof-save-set-form .sdcof-pin-set-new {
	display: flex;
	align-items: center;
	margin-right: 8px;
}

#sdcof-save-set-form h4 {
	margin-top: 0;
	font-size: 1rem;
	margin-bottom: 0.1rem;
}

body .tooltipster-sdcof .tooltipster-box {
	background: white;
	border-width: 3px;
}

body .tooltipster-sdcof.tooltipster-sidetip .tooltipster-content {
	color: #333;
	line-height: 1.25;
	padding: 0;
}

body .tooltipster-sdcof1 .tooltipster-box {
	border: 1px solid #ccc;
}
body .tooltipster-sdcof1 .tooltipster-content {
	padding: 0;
	line-height: 0;
}
body .tooltipster-sdcof1.tooltipster-sidetip .tooltipster-arrow {
	display: none;
}

.tooltipster-content .sdcof-pd-image {
	width: 250px;
	height: auto;
}

#sdcof-save-set-wrp {
	display: inline-flex;
	vertical-align: bottom;
}

/* Toast Notifications - Simplified */
.sdcof-toast-container {
	position: fixed;
	top: 32px; /* Positioned below the WordPress admin bar */
	right: 20px;
	z-index: 99999;
	max-width: 300px;
}

.sdcof-toast {
	display: flex;
	align-items: center;
	padding: 10px 15px;
	border-radius: 4px;
	margin-bottom: 10px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
	transform: translateX(120%);
	opacity: 0;
	transition: transform 0.4s ease, opacity 0.4s ease;
	color: white;
}

.sdcof-toast.show {
	transform: translateX(0);
	opacity: 1;
}

.sdcof-toast-success {
	background-color: #00a32a; /* WordPress green */
	border-left: 4px solid #008a20;
}

.sdcof-toast-error {
	background-color: #d63638; /* WordPress red */
	border-left: 4px solid #b32d2e;
}

.sdcof-toast-icon {
	margin-right: 10px;
	font-size: 18px;
}

.sdcof-toast-message {
	flex-grow: 1;
	font-size: 14px;
	line-height: 1.4;
	word-wrap: break-word;
    overflow-wrap: anywhere;
}

/* Custom Views Dropdown */
#sdcof-custom-views-container {
	vertical-align: bottom;
	margin-left: 12px;
	display: inline-block;
}

.sdcof-select {
	position: relative;
	min-width: 150px;
	user-select: none;
}

.sdcof-select-current {
	padding: 5px 30px 5px 10px;
	border: 1px solid #ccc;
	background: #fff;
	cursor: pointer;
	border-radius: 4px;
	position: relative;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.sdcof-select-current.sdcof-expanded {
	border-radius: 4px 4px 0 0;
}

.sdcof-set-select-options {
	position: absolute;
	left: 0;
	/* right: 0; */
	top: 100%;
	border: 1px solid #ccc;
	border-top: none;
	background: #fff;
	z-index: 1000;
	max-height: 300px;
	overflow-y: auto;
	display: none;
	min-width: calc(100% - 2px);
}

.sdcof-set-select-option {
	padding: 3px 4px 3px 10px;
	cursor: pointer;
	position: relative;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.sdcof-set-select-option:hover {
	background: #f0f0f0;
}

.sdcof-set-select-option.sdcof-selected {
	background: #f5f5f5;
	font-weight: bold;
}

.sdcof-set-select-option-name {
	flex-grow: 1;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	display: flex;
	align-items: center;
}

#sdcof-pinned-sets .sdcof-set-select-option-name {
	display: inline-block;
}

.sdcof-set-select-option .sdcof-select-pin,
.sdcof-set-select-option .sdcof-select-del {
	margin-left: 0;
	cursor: pointer;
	width: 1.2rem;
	height: 1.2rem;
	text-align: center;
	border-radius: 3px;
}

.sdcof-set-select-option .sdcof-select-pin {
	filter: grayscale(100%);
	opacity: 0.8;
}
.sdcof-set-select-option .sdcof-select-pin:hover,
.sdcof-set-select-option .sdcof-select-pin.sdcof-set-pinned {
	filter: grayscale(0%);
	opacity: 1;
}

.sdcof-expanded .sdcof-status-helper {
	border-radius: 4px 4px 0 0;
}

.sdcof-select-pin:hover,
.sdcof-select-del:hover {
	background: #ccc;
	color: red;
}

#sdcof-custom-views-wrp {
	display: inline-flex;
	vertical-align: bottom;
	position: relative;
	top: -3px;
	margin-left: 10px;
}

#sdcof-custom-views-wrp::before {
	content: '';
	position: absolute;
	left: 0px; /* Half of the margin-left to center the line in the gap */
	top: 15%;   /* Start slightly below the top */
	height: 70%; /* End slightly above the bottom */
	width: 1px;  /* Width of the divider line */
	background-color: #ccc; /* Color of the divider line - adjust as needed */
}

.sdcof-select-current-name.sdcof-changed::after {
	content: '*';
	display: inline-block;
	margin-left: 3px;
}

#sdcof-reset-screen-options {
	float: right;
}

#wpcontent .sdcof_select.sdcof_search_input {
	margin-right: 0;
}

#screen-options-wrap .sdcof-column-metabox-prefs::after,
#screen-options-wrap .sdcof-filter-metabox-prefs::after {
	content: "";
	display: table;
	clear: both;
}

/* Style labels for float layout */
#screen-options-wrap .sdcof-column-metabox-prefs label,
#screen-options-wrap .sdcof-filter-metabox-prefs label {
	float: left;
	margin-right: 4px;
	margin-bottom: 4px;
	min-height: 24px;
}

/* Upsell link in screen options */
.sdcof-upsell-link {
	clear: both;
	margin: 8px 0 10px;
	font-size: 12px;
	color: #666;
}
.sdcof-upsell-link a {
	color: #2271b1;
}

#sdcof-pinned-sets {
	clear: both;
	display: flex;
}
#sdcof-pinned-sets.hidden {
	display: none;
}
#sdcof-pinned-sets .sdcof-set-select-option {
	display: flex;
	border-radius: 4px;
	cursor: pointer;
	margin: 2px 5px 2px 0;
	padding: 3px 6px 3px 4px;
	line-height: 1.25;
}
#sdcof-pinned-sets .sdcof-set-icon {
	border-radius: 5px;
	background: white;
	color: #333;
	font-weight: bold;
}
#sdcof-pinned-sets .sdcof-set-icon-loader {
	border: 2px dotted #777;
}
#sdcof-pinned-sets .sdcof-set-select-option.sdcof-selected {
	outline: 2px solid black;
}
.sdcof_set_color {
	display: inline-block;
	width: 20px;
	vertical-align: top;
	padding: 0;
	height: 1rem;
}
.sdcof-set-icon {
	display: inline-block;
	min-width: 12px;
	height: 17px;
	border-radius: 3px;
	vertical-align: middle;
	margin-right: 1px;
	position: relative;
	line-height: 17px;
	padding: 0 3px;
	font-size: 90%;
	text-align: center;
	top: -1px;
}
.sdcof-set-icon-loader {
	border: 2px solid #f3f3f3;
	border-top: 2px solid transparent;
	border-radius: 50%;
	width: 9px;
	height: 9px;
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	animation: set_spin 0.8s linear infinite;
	will-change: transform;
	backface-visibility: hidden;
	perspective: 1000;
}
@keyframes set_spin {
	0% {
		transform: translate(-50%, -50%) rotate(0deg);
	}
	100% {
		transform: translate(-50%, -50%) rotate(360deg);
	}
}
#sdcof-custom-views-container .sdcof-set-icon {
	margin-right: 5px;
	top: 0;
}

#sdcof-custom-views-container .sdcof-set-select-option-name {
	padding-right: 3px;
}

#sdcof-pinned-sets.sdcof-pinned-sets-active-filters {
	margin-top: 0.8rem;
}

/* Loading indicator on set icons */
.sdcof-set-icon.sdcof-loading {
	position: relative;
	overflow: hidden;
}

.sdcof-set-icon.sdcof-loading::after {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(
		90deg,
		rgba(255,255,255,0) 0%,
		rgba(255,255,255,0.5) 50%,
		rgba(255,255,255,0) 100%
	);
	animation: shimmer 1.5s infinite;
	transform: skewX(-20deg);
}

@keyframes shimmer {
	0% {
		transform: translateX(-100%) skewX(-20deg);
	}
	100% {
		transform: translateX(100%) skewX(-20deg);
	}
}

/* Make sure the loading effect works well on both light and dark backgrounds */
#sdcof-custom-views-container .sdcof-set-icon.sdcof-loading::after {
	background: linear-gradient(
		90deg,
		rgba(255,255,255,0) 0%,
		rgba(255,255,255,0.5) 50%,
		rgba(255,255,255,0) 100%
	);
}

#sdcof-pinned-sets .sdcof-set-icon.sdcof-loading::after {
	background: linear-gradient(
		90deg,
		rgba(0,0,0,0) 0%,
		rgba(0,0,0,0.1) 50%,
		rgba(0,0,0,0) 100%
	);
}

#sdcof-export-progress-wrp {
	width: 100%;
	position: absolute;
	z-index: 1000;
	margin: 0;
	height: 0;
	overflow: visible;
}

#sdcof-export-progress {
	background: #fff;
	width: 100%;
	height: 4px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) inset;
	overflow: hidden;
	position: absolute;
	top: 5px;
	left: 0;
}

#sdcof-export-progress-bar {
	height: 100%;
	background-color: #2271b1;
	transition: width 0.3s ease;
	font-size: 0;
	background-image: linear-gradient(
		-45deg,
		rgba(255, 255, 255, 0.2) 25%,
		transparent 25%,
		transparent 50%,
		rgba(255, 255, 255, 0.2) 50%,
		rgba(255, 255, 255, 0.2) 75%,
		transparent 75%,
		transparent
	);
	background-size: 20px 20px;
	animation: sdcof-progress-animation 1s linear infinite;
}

@keyframes sdcof-progress-animation {
	0% {
		background-position: 0 0;
	}
	100% {
		background-position: 20px 0;
	}
}

#adv-settings fieldset {
	margin-bottom: 5px;
}

/* Hide filter button when option is enabled */
.sdcof-hide-filter-button #order-query-submit,
.sdcof-hide-filter-button #post-query-submit {
	display: none !important;
}

.sdcof-filter-metabox-prefs .sdcof-new-filter-label,
.sdcof-filter-metabox-prefs .sdcof-new-column-label {
	padding: 0;
}
.sdcof-initialized label.sdcof-new-filter-label:hover,
.sdcof-initialized label.sdcof-new-column-label:hover {
	background: none;
}

#sdcof-new-filter,
#sdcof-new-column {
	display: inline-block;
	vertical-align: middle;
	cursor: pointer;
	color: #ccc;
	text-decoration: none;
	padding: 0 0.3rem;
	line-height: 1;
}
#sdcof-new-filter:hover,
#sdcof-new-column:hover {
	color: #2271b1;
}
/* Remove outline/underline for all states of the new filter button */
#sdcof-new-filter,
#sdcof-new-filter:hover,
#sdcof-new-filter:active,
#sdcof-new-filter:focus,
#sdcof-new-filter:visited,
#sdcof-new-column,
#sdcof-new-column:hover,
#sdcof-new-column:active,
#sdcof-new-column:focus,
#sdcof-new-column:visited {
	outline: none;
	text-decoration: none;
	box-shadow: none;
}

/* Custom Filter Dialog Styles */
#sdcof-custom-filter-dialog,
#sdcof-custom-column-dialog {
	padding: 20px;
	background: #fff;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.sdcof-form-row {
	margin-bottom: 20px;
}

.sdcof-form-row label {
	display: block;
	font-weight: 600;
	margin-bottom: 5px;
}

.sdcof-form-row input[type="text"],
.sdcof-form-row select {
	width: 100%;
	max-width: 100%;
}

.sdcof-form-row .description {
	color: #666;
	font-style: italic;
	margin-top: 5px;
	font-size: 12px;
}

.sdcof-meta-suggestions {
	margin: 0;
	padding: 0;
	list-style-type: none;
	border: 1px solid #ddd;
	max-height: 115px;
	overflow-y: auto;
}

.sdcof-meta-suggestions li {
	padding: 8px 12px;
	cursor: pointer;
	border-bottom: 1px solid #eee;
	transition: background-color 0.2s;
	margin-bottom: 0;
}

.sdcof-meta-suggestions li:last-child {
	border-bottom: none;
}

.sdcof-meta-suggestions li:hover {
	background-color: #f0f0f0;
}

.sdcof-meta-suggestions code {
	background: #f6f7f7;
	padding: 2px 5px;
	border-radius: 3px;
	margin-left: 5px;
	font-size: 12px;
	color: #666;
}

.sdcof-form-actions {
	display: block;
	text-align: right;
	margin-top: 20px;
	padding-top: 15px;
	border-top: 1px solid #eee;
}

/* Highlight effect for newly created filter */
.sdcof-highlight {
	animation: highlight-pulse 1.5s ease-in-out;
}

@keyframes highlight-pulse {
	0% { background-color: #fff; }
	30% { background-color: #f0f7ff; }
	70% { background-color: #f0f7ff; }
	100% { background-color: #fff; }
}

/* Dialog adjustment styles removed - converting to WooCommerce modals */

/* Filter action buttons */
.sdcof-initialized .sdcof-filter-actions,
.sdcof-initialized .sdcof-column-actions {
	display: inline-block;
	margin: 0;
}

#screen-options-wrap .sdcof-filter-actions a,
#screen-options-wrap .sdcof-column-actions a {
	display: inline-block;
	color: #777;
	text-decoration: none;
	margin: 0;
	font-size: 14px;
	line-height: 1;
	vertical-align: text-bottom;
	position: relative;
	top: 1px;
}

#screen-options-wrap .sdcof-filter-actions a:active,
#screen-options-wrap .sdcof-filter-actions a:focus {
	outline: none;
	box-shadow: none;
}

.sdcof-filter-actions .dashicons,
.sdcof-column-actions .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
	vertical-align: text-top;
}

.sdcof-filter-actions .sdcof-edit-filter:hover,
.sdcof-column-actions .sdcof-edit-column:hover {
	color: #2271b1;
}

.sdcof-filter-actions .sdcof-delete-filter:hover,
.sdcof-column-actions .sdcof-delete-column:hover {
	color: #b32d2e;
}

/* Ensure proper spacing between elements */
.sdcof-initialized label,
.sdcof-initialized label.sdcof-new-column-label {
	position: relative;
	padding-left: 0;
	transition: background-color 0.2s;
	border-radius: 3px;
	user-select: none;
	box-sizing: border-box;
}

#sdcof-custom-filter-form.sdcof-loading,
#sdcof-custom-column-form.sdcof-loading {
	position: relative;
	min-height: 200px;
}

#sdcof-custom-filter-form.sdcof-loading:after,
#sdcof-custom-column-form.sdcof-loading:after {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(255, 255, 255, 0.8);
}

#sdcof-custom-filter-form.sdcof-loading:before,
#sdcof-custom-column-form.sdcof-loading:before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 24px;
	height: 24px;
	margin: -12px 0 0 -12px;
	border: 3px solid #f3f3f3;
	border-top: 3px solid #2271b1;
	border-radius: 50%;
	animation: sdcof-spin 1s linear infinite;
	z-index: 1;
}

@keyframes sdcof-spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

#screen-options-wrap .sdcof-filter-metabox-prefs .sdcof-default-column .sdcof-drag-handle {
	display: none !important; /* Hide drag handle for default column, we can't move them */
}

.sdcof-set-form-wrp-options {
	display: flex;
}

#wpbody #sdcof-show-filters-btn {
	display: none;
}

@media (max-width: 782px) {
	#sdcof-custom-views-wrp {
		clear: both;
		margin: 0;
		position: static;
		display: block;
		text-align: center;
		padding-top: 1rem;
	}

	#sdcof-custom-views-wrp #sdcof-custom-views-container {
		margin-left: 0;
	}

	#wpbody #sdcof-custom-views-wrp .button {
		min-height: 0;
		margin-bottom: 0;
	}

	#sdcof-custom-views-wrp .sdcof-select-current {
		font-size: 1.2em;
	}

	#sdcof-custom-views-container .sdcof-set-select-option-name {
		font-size: 1.2em;
	}

	#sdcof-custom-views-container .sdcof-set-select-option {
		padding: 0.5em 3px 0.5em 10px;
	}

	.sdcof-set-select-options {
		max-height: 400px;
	}

	.sdcof-set-select-option .sdcof-select-pin:hover {
		filter: grayscale(100%);
		opacity: 0.8;
	}

	.sdcof-set-select-option .sdcof-select-pin.sdcof-set-pinned:hover {
		filter: grayscale(0%);
		opacity: 1;
	}

	#sdcof-save-set-form {
		left: 12px;
		right: 12px;
		width: auto;
		min-width: 0;
		max-width: calc(100vw - 24px);
		box-sizing: border-box;
		padding: 12px 8px 12px 8px;
	}
	#sdcof-save-set-form .sdcof-set-form-wrp {
		flex-direction: column;
		align-items: stretch;
		gap: 10px;
		white-space: normal;
	}
	#sdcof-save-set-form input[type="text"] {
		width: 100%;
		min-width: 0;
		box-sizing: border-box;
		margin-right: 0;
	}
	#sdcof-save-set-form .sdcof-pin-set-new {
		margin-right: 0;
		justify-content: flex-start;
	}
	#sdcof-save-set-form .sp-replacer {
		margin-right: 0;
	}
	#sdcof-save-set-form:before {
		/* Arrow stays at the top, but will be shifted horizontally by JS */
		left: var(--arrow-offset, 20px);
		right: auto;
		transform: translateX(-50%);
	}
	.sdcof-set-form-wrp-options {
		justify-content: space-evenly;
	}

	#wpbody #sdcof-show-filters-btn {
		display: inline-block;
		position: relative;
		top: -1rem;
		text-decoration: none;
		border-bottom: 1px dashed;
	}

	#wpbody .sdcof-show-filters-btn-wrapper {
		text-align: center;
	}

	#wpbody .actions.sdcof-show-actions {
		margin-bottom: 0.4rem;
	}

	.sdcof-filter-col .sdcof_range_slider_wrp {
		margin-top: 4px;
		margin-bottom: 10px;
	}

	#wpbody .sdcof-reset-button {
		min-height: 0;
		line-height: 29px;
	}

	#sdcof-pinned-sets {
		flex-wrap: wrap;
	}

	#sdcof-pinned-sets .sdcof-set-select-option {
		margin: 2px 6px 5px 0;
	}

	#sdcof-selected-list {
		padding-top: 0;
	}

	.sdcof-status-helper {
		min-height: 40px;
	}

	.sdcof-filter-col {
		margin-top: 5px;
		margin-bottom: 0px;
	}
}

@media (max-width: 400px) {
	.sdcof-filter-col,
	.sdcof_search_text,
	.sdcof-status-helper {
		width: 100%;
	}

	.post-type-product #wpbody .tablenav .select2-container,
	.post-type-shop_order #wpbody .tablenav .select2-container,
	.woocommerce_page_wc-orders #wpbody .tablenav .select2-container {
		width: 100% !important;
	}

	.sdcof-filter-col .sdcof_range_slider_wrp {
		width: 100%;
	}

	#wpbody .sdcof-reset-button {
		margin: 10px 0;
	}

	.sdcof-dates-block {
		width: 100%;
	}

	#wpbody .sdcof-filter-col select {
		width: 100%;
		max-width: 100%;
	}

	.sdcof_search_text::placeholder {
		font-size: 1rem;
	}

	.sdcof-status-helper {
		font-size: 1rem;
	}

	#wpbody .actions .select2-selection__placeholder {
		font-size: 1rem;
	}
}

/* Modal loading content styles - simple spinner only */
.sdcof-modal-loading-container {
	min-height: 200px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.sdcof-modal-loading-container .spinner {
	float: none;
}

/* Form loading overlay styles - consistent with modal loading */
.sdcof-form-loading-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(255, 255, 255, 0.8);
	z-index: 999;
	display: flex;
	align-items: center;
	justify-content: center;
}

.sdcof-form-loading-overlay .spinner {
	float: none;
}

/* Review prompt notice */
#sdcof-review-notice {
	position: relative;
}

#sdcof-review-notice .sdcof-review-actions {
	display: flex;
	gap: 8px;
	margin-top: 10px;
	padding-bottom: 10px;
}

#sdcof-review-notice .sdcof-review-dismiss {
	position: absolute;
	top: 0;
	right: 1px;
	border: none;
	margin: 0;
	padding: 9px;
	background: none;
	color: #787c82;
	cursor: pointer;
	font-size: 13px;
}

#sdcof-review-notice .sdcof-review-dismiss:hover {
	color: #d63638;
}
