/**
 * Scheduled Sync CSS for miniOrange WooCommerce Amazon Sync Plugin
 * Premium plan feature styling for automatic scheduled product attribute synchronization
 *
 * @package    MOMCS_Sync
 * @since      1.0.0
 */

/* ==========================================================================
   Schedule design tokens (orange/gray palette)
   ========================================================================== */

:root {
	--momcs-schedule-primary: #ea580c;
	--momcs-schedule-muted: #64748b;
	--momcs-schedule-accent: #ea580c;
	--momcs-schedule-card-bg: #fff;
	--momcs-schedule-card-radius: 10px;
	--momcs-schedule-card-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
	--momcs-schedule-toggle-off: #e2e8f0;
}

/* ==========================================================================
   Schedule card component
   ========================================================================== */

.momcs-schedule-card {
	background: var(--momcs-schedule-card-bg);
	border-radius: var(--momcs-schedule-card-radius);
	box-shadow: var(--momcs-schedule-card-shadow);
	padding: 20px 24px;
	margin-bottom: 18px;
}

.momcs-schedule-card:last-child {
	margin-bottom: 0;
}

.momcs-schedule-card-summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	flex-wrap: wrap;
}

.momcs-schedule-card-summary-left {
	display: flex;
	align-items: center;
	gap: 16px;
	flex: 1;
	min-width: 0;
}

.momcs-schedule-card-recurrence {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 15px;
	font-weight: 500;
	color: var(--momcs-schedule-primary);
	flex-shrink: 0;
}

.momcs-schedule-card-recurrence-dot {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--momcs-schedule-primary);
	flex-shrink: 0;
}

/* Single row: icon + time + AM/PM aligned on one baseline */
.momcs-schedule-card-time-group {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 6px;
	flex-shrink: 0;
}

.momcs-schedule-card-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--momcs-schedule-accent);
	flex-shrink: 0;
}

.momcs-schedule-card-icon .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
}

.momcs-schedule-card-time {
	font-size: 15px;
	font-weight: 600;
	color: var(--momcs-schedule-primary);
	line-height: 1;
}

.momcs-schedule-card-ampm {
	font-size: 14px;
	font-weight: 500;
	color: var(--momcs-schedule-muted);
	line-height: 1;
}

/* Interval-only time group: icon + "Interval" on one line, no dash */
.momcs-schedule-card-time-group--interval .momcs-schedule-card-ampm {
	font-size: 14px;
}

/* Description: show full text, wrap if needed, no truncation */
.momcs-schedule-card-description {
	font-size: 14px;
	color: var(--momcs-schedule-muted);
	line-height: 1.4;
	flex: 1 1 12rem;
	min-width: 12rem;
	max-width: 100%;
	overflow: visible;
	white-space: normal;
	word-wrap: break-word;
}

/* Direction: label + WooCommerce/Amazon logos with arrow */
.momcs-schedule-card-direction {
	display: flex;
	align-items: center;
	gap: 10px;
	flex: 1 1 12rem;
	min-width: 12rem;
	max-width: 100%;
}

.momcs-schedule-card-direction-label {
	font-size: 14px;
	color: var(--momcs-schedule-muted);
	line-height: 1.4;
	flex-shrink: 0;
}

.momcs-schedule-card-direction-flow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
}

.momcs-schedule-card-logo {
	display: inline-block;
	width: 20px;
	height: 20px;
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
	flex-shrink: 0;
}

.momcs-schedule-card-logo--wc {
	background-image: url("data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDg1LjkgNDcuNiI+CjxwYXRoIGZpbGw9IiNhN2FhYWQiIGQ9Ik03Ny40LDAuMWMtNC4zLDAtNy4xLDEuNC05LjYsNi4xTDU2LjQsMjcuN1Y4LjZjMC01LjctMi43LTguNS03LjctOC41cy03LjEsMS43LTkuNiw2LjVMMjguMywyNy43VjguOAoJYzAtNi4xLTIuNS04LjctOC42LTguN0g3LjNDMi42LDAuMSwwLDIuMywwLDYuM3MyLjUsNi40LDcuMSw2LjRoNS4xdjI0LjFjMCw2LjgsNC42LDEwLjgsMTEuMiwxMC44UzMzLDQ1LDM2LjMsMzguOWw3LjItMTMuNXYxMS40CgljMCw2LjcsNC40LDEwLjgsMTEuMSwxMC44czkuMi0yLjMsMTMtOC43bDE2LjYtMjhjMy42LTYuMSwxLjEtMTAuOC02LjktMTAuOEM3Ny4zLDAuMSw3Ny4zLDAuMSw3Ny40LDAuMXoiLz4KPC9zdmc+Cg==");
}

.momcs-schedule-card-logo--amazon {
	background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCAyNCAyNCIgaWQ9IkFtYXpvbi1Mb2dvLS1TdHJlYW1saW5lLUxvZ29zIiBoZWlnaHQ9IjI0IiB3aWR0aD0iMjQiPgogIDxkZXNjPgogICAgQW1hem9uIExvZ28gU3RyZWFtbGluZSBJY29uOiBodHRwczovL3N0cmVhbWxpbmVocS5jb20KICA8L2Rlc2M+CiAgPHBhdGggZmlsbD0iIzIzMmYzZSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJtMTYuNDEyIDE2LjI0IDEuNTg3IC0xLjQ2OGEwLjUzMiAwLjUzMiAwIDAgMCAwLjAyNyAtMC43MzZjLTAuNjU1IC0wLjc2NCAtMC44NTIgLTEuNDAxIC0wLjg1MiAtMS44NjJWNi4wNDZjMC4wMDcgLTEuMDI1IC0wLjk3MyAtMy4wNzYgLTQuOTQ1IC0zLjA3NiAtMy41MzggMCAtNC44MjYgMi4xIC01LjExNSAzLjQ5NSAtMC4wNTUgMC4yNjMgMC4xNDggMC40OTYgMC40MTYgMC41MmwyLjA5IDAuMTg5YzAuMjU1IDAuMDIzIDAuNDgzIC0wLjE1MiAwLjU4MyAtMC4zODcgMC4yNiAtMC42MSAwLjg2NyAtMS4zODMgMi4wMjYgLTEuMzgzIDEuMTY4IDAgMS41NzcgMC44OTUgMS42MzUgMS4zNDNWOC4xM2MtNS43MjQgMCAtNy4yMDQgMi40OTIgLTcuMjA0IDQuODY3IDAgMi4zNzYgMS43MzMgMy41NjMgMy44NTUgMy41NjMgMS40MDkgMCAyLjcwOSAtMC43NzcgMy40MyAtMS4zNjRhMC41NDcgMC41NDcgMCAwIDEgMC43MjMgMC4wMTRsMS4wNTcgMS4wMjJhMC41IDAuNSAwIDAgMCAwLjY4NyAwLjAwOFptLTMuNTMgLTIuNTc4YzEuMjgzIC0wLjk3NiAwLjk4OCAtMy42OTkgMC45ODggLTMuNjk5cy0yLjQxMiAtMC4xNiAtMy4zNTQgMS4yODdjLTAuNTE0IDAuNzkgLTAuMzQ4IDEuODYyIDAuMjc1IDIuNDEyIDAuNTE5IDAuNDU4IDEuMzkyIDAuNTMyIDIuMDkxIDBabTguOTQ5IDMuMzczYy0wLjE1NSAtMC4xNzYgLTAuODY4IC0wLjExNSAtMS41NTMgLTAuMDU3IC0wLjY4IDAuMDU4IC0xLjMzMiAwLjExMyAtMS4zODQgLTAuMDY3IC0wLjEwNSAtMC4zNjEgMy4xNjUgLTEuMTk4IDMuOTczIC0wLjU0MiAwLjcwMyAwLjU3IC0xLjExMiAzLjkzNSAtMS42MTIgMy42NjQgLTAuMSAtMC4wNTQgMC4wNSAtMC40NjEgMC4yMzIgLTAuOTYzIDAuMjc0IC0wLjc1MSAwLjYyNiAtMS43MTYgMC4zNDQgLTIuMDM1Wm0tOS44MjQgMi4zMTNjLTQuNTI3IDAgLTcuNzcxIC0xLjU2OCAtOS40NDcgLTIuMzc4IC0wLjcwMSAtMC4zMzkgLTEuMTI3IC0wLjU0NSAtMS4yNTggLTAuNDQ3IC0wLjQ0MSAwLjMzIDQuNzI0IDQuNDE0IDEwLjcwNSA0LjQxNCA1LjIzMSAwIDkuNzU2IC0yLjgyNSA5LjA5NCAtMy4yIC0wLjIzNyAtMC4xMzQgLTAuNzMzIDAuMDMzIC0xLjUzNCAwLjMwNCAtMS40NDIgMC40ODYgLTMuODcyIDEuMzA3IC03LjU2IDEuMzA3WiIgY2xpcC1ydWxlPSJldmVub2RkIiBzdHJva2Utd2lkdGg9IjEiPjwvcGF0aD4KPC9zdmc+");
}

.momcs-schedule-card-direction-arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	color: var(--momcs-schedule-muted);
	line-height: 1;
}

.momcs-schedule-card-direction-arrow::before {
	content: "→";
}

.momcs-schedule-card-summary .momcs-schedule-toggle,
.momcs-schedule-card-summary .momcs-order-schedule-toggle,
.momcs-schedule-card-summary .momcs-fba-stock-schedule-toggle {
	margin-bottom: 0;
	padding: 0;
	background: transparent;
	border-left: none;
	border-radius: 0;
	flex-shrink: 0;
	position: relative;
}

/* Hide "Enable Scheduled Sync" / "Enable" text next to toggle in card summary; keep for screen readers */
.momcs-schedule-card-summary .momcs-toggle-label {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
	clip-path: inset(50%);
}

.momcs-schedule-card-summary #momcs-schedule-enabled-field.loading .shimmer-toggle {
	width: 44px;
	height: 24px;
	min-height: 24px;
	border-radius: 24px;
}

/* Accordion: config hidden by default, shown when card is expanded */
.momcs-schedule-card-config {
	display: none;
	margin-top: 20px;
	padding-top: 20px;
	border-top: 1px solid #f1f5f9;
}

.momcs-schedule-card.momcs-schedule-card--expanded .momcs-schedule-card-config {
	display: block;
}

/* Accordion trigger button (arrow) */
.momcs-schedule-card-accordion-trigger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
	margin: 0;
	border: none;
	background: transparent;
	color: var(--momcs-schedule-muted);
	cursor: pointer;
	border-radius: 4px;
	flex-shrink: 0;
	transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.momcs-schedule-card-accordion-trigger:hover {
	color: var(--momcs-schedule-primary);
	background: rgba(234, 88, 12, 0.08);
}

.momcs-schedule-card-accordion-trigger:focus-visible {
	outline: 2px solid var(--momcs-schedule-primary);
	outline-offset: 2px;
}

.momcs-schedule-card-accordion-trigger .dashicons {
	font-size: 20px;
	width: 20px;
	height: 20px;
	transition: transform 0.2s ease;
}

.momcs-schedule-card.momcs-schedule-card--expanded .momcs-schedule-card-accordion-trigger .dashicons {
	transform: rotate(180deg);
}

.momcs-schedule-card-config .momcs-scheduled-sync-header,
.momcs-schedule-card-config .momcs-order-scheduled-sync-header,
.momcs-schedule-card-config .momcs-fba-stock-scheduled-sync-header {
	margin-top: 0;
}

/* ==========================================================================
   Schedule Settings Container
   ========================================================================== */

/* Ensure Schedule Settings panel displays correctly */
#schedule_sync_settings.momcs-sync-settings-panel {
    display: none;
    padding: 20px;
    background: #fff;
    border-radius: 6px;
    margin-top: 0;
    position: relative;
    z-index: 1;
}

#schedule_sync_settings.momcs-sync-settings-panel.active {
    display: block !important;
}

/* Two-card layout (Supplier Edit): ensure Order and Product sync panels display when active */
#order_sync_settings_panel.momcs-sync-settings-panel {
    display: none;
}
#order_sync_settings_panel.momcs-sync-settings-panel.active {
    display: block !important;
}
#product_sync_settings_panel.momcs-sync-settings-panel {
    display: none;
}
#product_sync_settings_panel.momcs-sync-settings-panel.active {
    display: block !important;
}

/* Hide any conflicting content when schedule tab is active */
.schedule_sync_tab.active ~ * .momcs-mapping-accordion,
.schedule_sync_tab.active ~ * .momcs-field-mapping-container,
.schedule_sync_tab.active ~ * .momcs-template-mapping-container {
    display: none !important;
}

.momcs-scheduled-sync-container {
    margin: 20px 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
    z-index: 1;
    /* Ensure this container is isolated and displays properly */
    clear: both;
    width: 100%;
    max-width: none;
}

.momcs-scheduled-sync-form-wrapper {
    position: relative;
    padding: 25px;
}

#momcs-scheduled-sync-form {
    max-width: 800px;
    position: relative;
    z-index: 2;
    /* Ensure form is visible and not overlapped */
    display: block !important;
    visibility: visible !important;
}

.momcs-scheduled-sync-header {
    margin-bottom: 15px;
}

.momcs-scheduled-sync-header h3 {
    margin: 0 0 8px 0;
    color: #1d2327;
    font-size: 18px;
    font-weight: 600;
}

.momcs-scheduled-sync-header p {
    margin: 0;
    color: #646970;
    font-size: 13px;
    line-height: 2.5;
}

/* ==========================================================================
   Form Fields
   ========================================================================== */

.momcs-form-row {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 25px;
    gap: 20px;
}

.momcs-form-group {
    flex: 1;
    min-width: 200px;
}

.momcs-form-group.full-width {
    flex: 1 1 100%;
}

.momcs-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1d2327;
    font-size: 14px;
}

.momcs-form-group label.required::after {
    content: " *";
    color: #d63638;
}

.momcs-form-group input[type="text"],
.momcs-form-group input[type="time"],
.momcs-form-group input[type="number"],
.momcs-form-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    background: #fff;
    font-size: 14px;
    line-height: 1.5;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.momcs-form-group input:focus,
.momcs-form-group select:focus {
    border-color: #ea580c;
    box-shadow: 0 0 0 1px #ea580c;
    outline: none;
}

.momcs-form-group input:disabled,
.momcs-form-group select:disabled {
    background-color: #f6f7f7;
    border-color: #dcdcde;
    color: #646970;
    cursor: not-allowed;
}

/* ==========================================================================
   Schedule Toggle (Product Sync & Order Sync)
   ========================================================================== */

.momcs-schedule-toggle,
.momcs-order-schedule-toggle,
.momcs-fba-stock-schedule-toggle {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    padding: 15px 20px;
    background: #f6f7f7;
    border-radius: 6px;
    border-left: 4px solid #ea580c;
    position: relative;
    cursor: pointer;
}

.momcs-schedule-toggle input[type="checkbox"],
.momcs-order-schedule-toggle input[type="checkbox"],
.momcs-fba-stock-schedule-toggle input[type="checkbox"] {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.momcs-toggle-slider {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    background-color: var(--momcs-schedule-toggle-off, #e2e8f0);
    border-radius: 24px;
    transition: background-color 0.3s ease;
    cursor: pointer;
    flex-shrink: 0;
}

.momcs-toggle-slider:before {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.momcs-schedule-toggle input[type="checkbox"]:checked + .momcs-toggle-slider,
.momcs-order-schedule-toggle input[type="checkbox"]:checked + .momcs-toggle-slider,
.momcs-fba-stock-schedule-toggle input[type="checkbox"]:checked + .momcs-toggle-slider {
    background-color: var(--momcs-schedule-primary);
}

.momcs-schedule-toggle input[type="checkbox"]:checked + .momcs-toggle-slider:before,
.momcs-order-schedule-toggle input[type="checkbox"]:checked + .momcs-toggle-slider:before,
.momcs-fba-stock-schedule-toggle input[type="checkbox"]:checked + .momcs-toggle-slider:before {
    transform: translateX(20px);
}

.momcs-schedule-toggle input[type="checkbox"]:focus-visible + .momcs-toggle-slider,
.momcs-order-schedule-toggle input[type="checkbox"]:focus-visible + .momcs-toggle-slider,
.momcs-fba-stock-schedule-toggle input[type="checkbox"]:focus-visible + .momcs-toggle-slider {
    box-shadow: 0 0 0 2px var(--momcs-schedule-card-bg), 0 0 0 4px var(--momcs-schedule-primary);
}

.momcs-toggle-label {
    font-size: 16px;
    font-weight: 600;
    color: #1d2327;
    flex: 1;
}

.momcs-toggle-description {
    font-size: 13px;
    color: #646970;
    margin-top: 5px;
}

/* Schedule Field Labels - Enhanced Styling */
.momcs-schedule-field label,
.momcs-order-schedule-field label,
.momcs-fba-stock-schedule-field label {
    display: flex;
    margin-bottom: 10px;
    font-weight: 600;
    color: #1d2327;
    font-size: 15px !important;
    line-height: 1.4;
    letter-spacing: 0.2px;
}

/* Make specific schedule configuration labels even more prominent */
#momcs-schedule-time-field > label,
#momcs-schedule-frequency-field > label,
#momcs-schedule-attributes-field > label {
    font-size: 15px !important;
    font-weight: 500 !important;
    color: #0f1419;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0f0f1;
}

/* ==========================================================================
   Schedule Form - Disabled State
   ========================================================================== */

.momcs-schedule-disabled .momcs-form-group:not(.momcs-toggle-group) {
    opacity: 0.5;
    pointer-events: none;
}

.momcs-schedule-disabled .momcs-form-group input,
.momcs-schedule-disabled .momcs-form-group select {
    background-color: #f6f7f7 !important;
    border-color: #dcdcde !important;
    color: #646970 !important;
}

/* ==========================================================================
   Order Schedule Specific Styles
   ========================================================================== */

.momcs-order-schedule-field {
    margin-bottom: 20px;
}

.momcs-order-schedule-field label {
    display: flex;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1d2327;
    font-size: 14px;
}

.momcs-order-schedule-field input[type="number"],
.momcs-order-schedule-field select {
    padding: 8px 12px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    background: #fff;
    font-size: 14px;
    line-height: 1.5;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.momcs-order-schedule-field select {
    background-image: url('data:image/svg+xml;charset=UTF-8,%3csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"%3e%3cpolyline points="6 9 12 15 18 9"%3e%3c/polyline%3e%3c/svg%3e');
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
    padding-right: 32px;
}

.momcs-order-schedule-field input:focus,
.momcs-order-schedule-field select:focus {
    border-color: #ea580c;
    box-shadow: 0 0 0 1px #ea580c;
    outline: none;
}

.momcs-order-schedule-field input:disabled,
.momcs-order-schedule-field select:disabled {
    background-color: #f6f7f7;
    border-color: #dcdcde;
    color: #646970;
    cursor: not-allowed;
    opacity: 0.6;
}

.momcs-order-schedule-field select:disabled {
    background-image: url('data:image/svg+xml;charset=UTF-8,%3csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23646970" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"%3e%3cpolyline points="6 9 12 15 18 9"%3e%3c/polyline%3e%3c/svg%3e');
}

.momcs-order-schedule-field .description {
    display: block;
    margin-top: 5px;
    font-size: 13px;
    color: #646970;
    font-style: italic;
}

.momcs-order-schedule-configuration {
    margin-top: 15px;
}

.momcs-frequency-inputs {
    display: flex;
    gap: 10px;
    align-items: center;
}

.momcs-frequency-inputs .small-text {
    width: 80px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.momcs-frequency-inputs .regular-text {
    flex: 1;
    max-width: 200px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=UTF-8,%3csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"%3e%3cpolyline points="6 9 12 15 18 9"%3e%3c/polyline%3e%3c/svg%3e');
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
    padding-right: 32px;
}

.momcs-frequency-inputs .regular-text:disabled {
    background-image: url('data:image/svg+xml;charset=UTF-8,%3csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23646970" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"%3e%3cpolyline points="6 9 12 15 18 9"%3e%3c/polyline%3e%3c/svg%3e');
}

.momcs-order-schedule-preview {
    background: #f8f9fa;
    border: 1px solid #e1e4e7;
    border-radius: 6px;
    padding: 20px;
    margin-top: 20px;
}

.momcs-order-schedule-preview h4 {
    margin: 0 0 15px 0;
    color: #1d2327;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.momcs-order-schedule-preview h4::before {
    content: "📦";
    font-size: 18px;
}

.momcs-order-schedule-preview-text {
    color: #2c3338;
    font-size: 14px;
    line-height: 1.6;
}

.momcs-order-schedule-info-box {
    padding: 15px;
    background: #f0f6fc;
    border-left: 4px solid #ea580c;
    border-radius: 4px;
    margin: 20px 0;
}

.momcs-order-schedule-info-box h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #ea580c;
    font-size: 15px;
    font-weight: 600;
}

.momcs-order-schedule-info-box ul {
    margin: 0;
    padding-left: 20px;
}

.momcs-order-schedule-info-box li {
    margin-bottom: 6px;
    color: #2c3338;
    font-size: 13px;
    line-height: 1.5;
}

.momcs-order-schedule-info-box li:last-child {
    margin-bottom: 0;
}

/* Order Schedule Loading and Messages */
.momcs-order-schedule-loading,
.momcs-order-schedule-errors,
.momcs-order-schedule-success {
    margin-bottom: 15px;
}

.momcs-order-schedule-errors,
.momcs-order-schedule-success {
    display: none;
}

.momcs-order-schedule-errors .notice {
    border-left-color: #d63638;
    background: #fcf2f3;
}

.momcs-order-schedule-success .notice {
    border-left-color: #46b450;
    background: #f0f6fc;
}

/* ==========================================================================
   Attribute Multi-Select
   ========================================================================== */

.momcs-attribute-select-wrapper {
    position: relative;
}

.momcs-attribute-search {
    width: 100% !important;
    margin-bottom: 8px !important;
    font-style: italic;
}

.momcs-attribute-select-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.momcs-attribute-select-controls button {
    padding: 4px 12px;
    font-size: 12px;
    line-height: 1.5;
    border-radius: 3px;
    border: 1px solid #8c8f94;
    background: #f6f7f7;
    color: #2c3338;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
}

.momcs-attribute-select-controls button:hover {
    background: #fff;
    border-color: #ea580c;
    color: #ea580c;
}

#momcs-schedule-attributes {
    min-height: 120px;
    max-height: 200px;
    resize: vertical;
}

.momcs-attribute-count {
    font-size: 12px;
    color: #646970;
    margin-top: 5px;
}

/* ==========================================================================
   Schedule Preview
   ========================================================================== */

.momcs-schedule-preview {
    background: #f8f9fa;
    border: 1px solid #e1e4e7;
    border-radius: 6px;
    padding: 20px;
    margin-top: 25px;
}

.momcs-schedule-preview h4 {
    margin: 0 0 15px 0;
    color: #1d2327;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.momcs-schedule-preview h4::before {
    content: "⏰";
    font-size: 18px;
}

.momcs-schedule-preview-content {
    color: #2c3338;
    font-size: 14px;
    line-height: 1.6;
}

.momcs-schedule-preview-content strong {
    color: #1d2327;
    font-weight: 600;
}

.momcs-schedule-preview.loading {
    background: #f6f7f7;
    color: #646970;
    text-align: center;
    font-style: italic;
}

.momcs-schedule-preview-disabled {
    background: #fff5f5;
    border-color: #f87171;
    color: #991b1b;
    text-align: center;
    font-style: italic;
}

/* ==========================================================================
   Form Actions
   ========================================================================== */

.momcs-form-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #f1f1f1;
}

.momcs-form-actions button {
    padding: 8px 20px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 1.5;
}

#momcs-schedule-submit {
    background: #ea580c;
    color: #fff;
    border: 1px solid #ea580c;
}

#momcs-schedule-submit:hover:not(:disabled) {
    background: #c2410c;
    border-color: #c2410c;
}

#momcs-schedule-submit:disabled {
    background: #8c8f94 !important;
    border-color: #8c8f94 !important;
    color: #fff !important;
    cursor: not-allowed !important;
}

#momcs-schedule-delete {
    background: #d63638;
    color: #fff;
    border: 1px solid #d63638;
}

#momcs-schedule-delete:hover:not(:disabled) {
    background: #b32d2e;
    border-color: #b32d2e;
}

#momcs-schedule-delete:disabled {
    background: #8c8f94 !important;
    border-color: #8c8f94 !important;
    color: #fff !important;
    cursor: not-allowed !important;
}

/* ==========================================================================
   Shimmer Loading States
   ========================================================================== */

/* Shimmer loading effect for schedule fields */
.momcs-schedule-field-shimmer {
    position: relative;
    overflow: hidden;
    background: #f6f7f8;
    border-radius: 4px;
    height: 28px;
    display: none;
}

.momcs-schedule-field-shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0,
        rgba(255, 255, 255, 0.2) 20%,
        rgba(255, 255, 255, 0.5) 60%,
        rgba(255, 255, 255, 0)
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

/* Shimmer variants for different field types */
.momcs-schedule-field-shimmer.shimmer-toggle {
    width: 100%;
    height: 50px;
    border-radius: 6px;
    margin-bottom: 25px;
}

.momcs-schedule-field-shimmer.shimmer-input {
    width: 100%;
    max-width: 200px;
    height: 32px;
}

.momcs-schedule-field-shimmer.shimmer-select {
    width: 100%;
    max-width: 200px;
    height: 32px;
}

.momcs-schedule-field-shimmer.shimmer-multiselect {
    width: 100%;
    height: 42px;
    border-radius: 4px;
}

.momcs-schedule-field-shimmer.shimmer-time-input {
    width: 100%;
    max-width: 200px;
    height: 32px;
}

.momcs-schedule-field-shimmer.shimmer-frequency {
    display: flex;
    gap: 10px;
    background: transparent;
    height: auto;
}

.momcs-schedule-field-shimmer.shimmer-frequency::after {
    display: none;
}

.momcs-schedule-field-shimmer.shimmer-frequency .shimmer-part {
    position: relative;
    overflow: hidden;
    background: #f6f7f8;
    border-radius: 4px;
    height: 32px;
}

.momcs-schedule-field-shimmer.shimmer-frequency .shimmer-part::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0,
        rgba(255, 255, 255, 0.2) 20%,
        rgba(255, 255, 255, 0.5) 60%,
        rgba(255, 255, 255, 0)
    );
    animation: shimmer 2s infinite;
}

.momcs-schedule-field-shimmer.shimmer-frequency .shimmer-number {
    width: 80px;
}

.momcs-schedule-field-shimmer.shimmer-frequency .shimmer-select {
    flex: 1;
    max-width: 200px;
}

/* Hide actual fields while loading */
.momcs-schedule-field.loading .momcs-schedule-toggle,
.momcs-schedule-field.loading input,
.momcs-schedule-field.loading select,
.momcs-schedule-field.loading .momcs-frequency-inputs,
.momcs-schedule-field.loading .momcs-attribute-select-controls,
.momcs-schedule-field.loading .momcs-attribute-search,
.momcs-schedule-field.loading .ts-wrapper {
    display: none !important;
}

.momcs-schedule-field.loading .momcs-schedule-field-shimmer {
    display: block;
}

.momcs-schedule-field.loading .momcs-schedule-field-shimmer.shimmer-frequency {
    display: flex;
}

/* Hide shimmers when not loading */
.momcs-schedule-field:not(.loading) .momcs-schedule-field-shimmer {
    display: none !important;
}

/* ==========================================================================
   Message Containers
   ========================================================================== */

.momcs-schedule-messages {
    margin-bottom: 20px;
}

.momcs-schedule-errors,
.momcs-schedule-success {
    display: none;
}

.momcs-schedule-errors .notice,
.momcs-schedule-success .notice {
    margin: 0 0 10px 0;
    padding: 12px;
    border-left: 4px solid;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

.momcs-schedule-errors .notice {
    border-left-color: #d63638;
    background: #fcf2f3;
}

.momcs-schedule-success .notice {
    border-left-color: #46b450;
    background: #f0f6fc;
}

/* ==========================================================================
   Validation Errors
   ========================================================================== */

.momcs-field-error {
    border-color: #d63638 !important;
    box-shadow: 0 0 0 1px #d63638 !important;
}

.momcs-error-message {
    display: block;
    color: #d63638;
    font-size: 12px;
    margin-top: 5px;
    font-style: italic;
}

/* ==========================================================================
   Schedule Tab Integration
   ========================================================================== */

.momcs-sync-settings-tabs .momcs-schedule-tab {
    position: relative;
}

.momcs-sync-settings-tabs .momcs-schedule-tab::after {
    content: "✨";
    font-size: 12px;
    margin-left: 5px;
    opacity: 0.7;
}

.momcs-sync-settings-panel.momcs-schedule-panel {
    padding: 0;
}

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

@media (max-width: 768px) {
    .momcs-schedule-card-summary {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .momcs-schedule-card-summary-left {
        flex-wrap: wrap;
        width: 100%;
    }

    .momcs-schedule-card-description,
    .momcs-schedule-card-direction {
        min-width: 0;
    }

    .momcs-schedule-card-time {
        font-size: 14px;
    }

    .momcs-schedule-card-summary .momcs-schedule-toggle,
    .momcs-schedule-card-summary .momcs-order-schedule-toggle,
    .momcs-schedule-card-summary .momcs-fba-stock-schedule-toggle {
        width: 100%;
        justify-content: space-between;
    }

    .momcs-form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .momcs-form-group {
        min-width: auto;
    }
    
    .momcs-form-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .momcs-form-actions button {
        width: 100%;
        justify-content: center;
    }
    
    .momcs-attribute-select-controls {
        flex-direction: column;
    }
    
    .momcs-schedule-toggle {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .momcs-scheduled-sync-form-wrapper {
        padding: 15px;
    }
    
    .momcs-schedule-preview {
        padding: 15px;
    }
    
    .momcs-form-group input[type="text"],
    .momcs-form-group input[type="time"],
    .momcs-form-group input[type="number"],
    .momcs-form-group select {
        padding: 10px 12px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* ==========================================================================
   Audit Tab Styles (for Sync Queue integration)
   ========================================================================== */

.momcs-scheduled-syncs-tab {
    position: relative;
}

.momcs-scheduled-syncs-content {
    padding: 20px;
    background: #fff;
    border-radius: 6px;
    margin-top: 15px;
}

.momcs-scheduled-sync-log {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    border: 1px solid #e1e4e7;
    border-radius: 4px;
    margin-bottom: 10px;
    background: #fafbfc;
}

.momcs-scheduled-sync-log:last-child {
    margin-bottom: 0;
}

.momcs-scheduled-sync-info {
    flex: 1;
}

.momcs-scheduled-sync-title {
    font-weight: 600;
    color: #1d2327;
    margin-bottom: 5px;
}

.momcs-scheduled-sync-details {
    font-size: 12px;
    color: #646970;
}

.momcs-scheduled-sync-status {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.momcs-scheduled-sync-status.success {
    background: #d4edda;
    color: #155724;
}

.momcs-scheduled-sync-status.error {
    background: #f8d7da;
    color: #721c24;
}

.momcs-scheduled-sync-status.running {
    background: #cce5ff;
    color: #004085;
}

.momcs-scheduled-sync-status.pending {
    background: #fff3cd;
    color: #856404;
}

/* ==========================================================================
   Empty State
   ========================================================================== */

.momcs-scheduled-sync-empty {
    text-align: center;
    padding: 40px 20px;
    color: #646970;
}

.momcs-scheduled-sync-empty-icon {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.momcs-scheduled-sync-empty h3 {
    margin: 0 0 10px 0;
    color: #646970;
    font-weight: 600;
}

.momcs-scheduled-sync-empty p {
    margin: 0;
    color: #8c8f94;
    font-size: 14px;
}

/* ==========================================================================
   Enhanced Attribute Selection
   ========================================================================== */

/* Attribute select container */
.momcs-schedule-field .momcs-attribute-select {
    min-height: 120px;
    max-height: 200px;
    font-size: 13px;
    border: 2px solid #ddd;
    border-radius: 4px;
    transition: border-color 0.2s ease;
}

.momcs-schedule-field .momcs-attribute-select:focus {
    border-color: #ea580c;
    box-shadow: 0 0 0 1px #ea580c;
    outline: none;
}

/* Attribute select controls */
.momcs-attribute-select-controls {
    margin-bottom: 8px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.momcs-attribute-select-controls .button-secondary {
    font-size: 12px;
    height: 28px;
    line-height: 1;
    padding: 0 10px;
    margin: 0;
    background: #f6f7f7;
    border: 1px solid #ddd;
    color: #555;
    transition: all 0.15s ease;
}

.momcs-attribute-select-controls .button-secondary:hover {
    background: #ea580c;
    border-color: #c2410c;
    color: #fff;
}

.momcs-attribute-select-controls .button-secondary:focus {
    box-shadow: 0 0 0 1px #ea580c;
    outline: none;
}

/* Attribute search input */
.momcs-attribute-search {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    width: 100%;
    margin-bottom: 5px !important;
    background: #fff url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23999"><path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/></svg>') no-repeat right 10px center;
    background-size: 16px 16px;
    padding-right: 35px;
    transition: border-color 0.2s ease;
}

.momcs-attribute-search:focus {
    border-color: #ea580c;
    outline: none;
    box-shadow: 0 0 0 1px #ea580c;
}

.momcs-attribute-search::placeholder {
    color: #aaa;
    font-style: italic;
}

/* Attribute select optgroups */
.momcs-schedule-field .momcs-attribute-select optgroup {
    font-weight: 600;
    font-size: 12px;
    color: #23282d;
    background: #f9f9f9;
    padding: 4px 8px;
    margin-top: 4px;
}

.momcs-schedule-field .momcs-attribute-select optgroup:first-child {
    margin-top: 0;
}

.momcs-schedule-field .momcs-attribute-select option {
    padding: 4px 12px;
    font-size: 13px;
    line-height: 1.4;
    color: #23282d;
    background: #fff;
}

.momcs-schedule-field .momcs-attribute-select option:hover,
.momcs-schedule-field .momcs-attribute-select option:focus {
    background: #ea580c;
    color: #fff;
}

.momcs-schedule-field .momcs-attribute-select option:checked {
    background: #ea580c;
    color: #fff;
    font-weight: 600;
}


/* Enhanced validation states */
.momcs-schedule-field .momcs-attribute-select.error {
    border-color: #d63638;
    box-shadow: 0 0 0 1px #d63638;
}

.momcs-schedule-field .momcs-attribute-select.success {
    border-color: #00a32a;
    box-shadow: 0 0 0 1px #00a32a;
}

/* Loading state for attribute dropdown */
.momcs-attribute-select-loading {
    position: relative;
}

.momcs-attribute-select-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid #ddd;
    border-top-color: #ea580c;
    border-radius: 50%;
    animation: momcs-spin 1s linear infinite;
}

/* Attribute selection preview */
.momcs-attribute-selection-preview {
    margin-top: 8px;
    padding: 8px 12px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    line-height: 1.4;
    display: none;
}

.momcs-attribute-selection-preview.has-selection {
    display: block;
}

.momcs-attribute-selection-preview-title {
    font-weight: 600;
    color: #23282d;
    margin-bottom: 4px;
}

.momcs-attribute-selection-preview-list {
    color: #646970;
    margin: 0;
    padding-left: 16px;
}

.momcs-attribute-selection-preview-item {
    margin-bottom: 2px;
}

.momcs-attribute-selection-preview-item:last-child {
    margin-bottom: 0;
}

/* Responsive adjustments for attribute controls */
@media (max-width: 782px) {
    .momcs-attribute-select-controls {
        flex-direction: column;
        gap: 4px;
    }
    
    .momcs-attribute-select-controls .button-secondary {
        width: 100%;
        justify-content: center;
    }
    
    .momcs-schedule-field .momcs-attribute-select {
        min-height: 100px;
        max-height: 150px;
    }
}

/* ==========================================================================
   Tom Select Custom Styling for WordPress/WooCommerce
   ========================================================================== */

/* Tom Select wrapper styling */
.ts-wrapper {
    width: 100% !important;
    max-width: none !important;
}

/* Tom Select control (input area with chips) */
.ts-wrapper .ts-control {
    min-height: 42px !important;
    padding: 4px 8px !important;
    border: 1px solid #8c8f94 !important;
    border-radius: 4px !important;
    background: #fff !important;
    box-shadow: none !important;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out !important;
}

/* Focused state */
.ts-wrapper.focus .ts-control,
.ts-wrapper.ts-focused .ts-control {
    border-color: #ea580c !important;
    box-shadow: 0 0 0 1px #ea580c !important;
    outline: none !important;
}

/* Disabled state */
.ts-wrapper.disabled .ts-control {
    background-color: #f6f7f7 !important;
    border-color: #dcdcde !important;
    color: #646970 !important;
    cursor: not-allowed !important;
    opacity: 0.6;
}

/* Chip/tag styling */
.ts-wrapper .ts-control .item {
    background: #ff6a00 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 3px !important;
    padding: 4px 8px !important;
    margin: 2px 4px 2px 0 !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.15s ease-in-out !important;
}

.ts-wrapper .ts-control .item:hover {
    background: #ea580c !important;
}

/* Remove button styling (X button on chips) */
.ts-wrapper .ts-control .item .remove {
    color: #fff !important;
    border-left: 1px solid rgba(255, 255, 255, 0.3) !important;
    padding: 0 6px !important;
    margin-left: 6px !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    opacity: 0.9 !important;
    cursor: pointer !important;
    border: none !important;
    background: none !important;
    transition: opacity 0.15s ease-in-out !important;
    vertical-align: middle !important;
    display: inline-block !important;
}

.ts-wrapper .ts-control .item .remove:hover {
    opacity: 1 !important;
    background: rgba(0, 0, 0, 0.1) !important;
    border-radius: 2px !important;
}

/* Input field within Tom Select */
.ts-wrapper .ts-control input {
    color: #2c3338 !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 4px 0 !important;
    min-width: 200px !important;
}

.ts-wrapper .ts-control input::placeholder {
    color: #646970 !important;
    opacity: 0.7 !important;
}

/* Dropdown styling */
.ts-dropdown {
    border: 1px solid #8c8f94 !important;
    border-radius: 4px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    background: #fff !important;
    margin-top: 4px !important;
    z-index: 1000 !important;
    max-height: 300px !important;
    overflow-y: auto !important;
}

/* Prevent empty space in dropdown */
.ts-dropdown .ts-dropdown-content {
    padding: 0 !important;
}

/* Hide any empty optgroup containers */
.ts-dropdown .optgroup:empty,
.ts-dropdown .optgroup-header:empty {
    display: none !important;
}

/* Dropdown options */
.ts-dropdown .option {
    padding: 8px 12px !important;
    font-size: 13px !important;
    color: #2c3338 !important;
    cursor: pointer !important;
    transition: background-color 0.15s ease-in-out !important;
    border-bottom: 1px solid #f1f1f1 !important;
}

.ts-dropdown .option:last-child {
    border-bottom: none !important;
}

.ts-dropdown .option:hover,
.ts-dropdown .option.active {
    background: #f0f6fc !important;
    color: #ea580c !important;
}

.ts-dropdown .option.selected {
    background: #e7f3ff !important;
    color: #c2410c !important;
    font-weight: 500 !important;
}

/* Option with checkbox (if using checkbox plugin) */
.ts-dropdown .option .ts-checkbox {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    vertical-align: middle;
}

/* Optgroup header styling - HIDDEN (not using optgroups) */
.ts-dropdown .optgroup-header,
.ts-dropdown .optgroup,
.ts-dropdown-content .optgroup-header,
.ts-dropdown-content .optgroup {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Optgroup label in selected items - HIDDEN */
.ts-optgroup-label {
    display: none !important;
}

/* No results message */
.ts-dropdown .no-results,
.ts-dropdown .ts-no-results {
    padding: 12px !important;
    text-align: center !important;
    color: #646970 !important;
    font-style: italic !important;
    font-size: 13px !important;
}

/* Clear button styling */
.ts-wrapper .clear-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 24px !important;
    height: 24px !important;
    margin: 0 4px !important;
    border-radius: 3px !important;
    background: #f0f0f1 !important;
    color: #646970 !important;
    cursor: pointer !important;
    transition: all 0.15s ease-in-out !important;
    font-size: 16px !important;
    font-weight: 600 !important;
}

.ts-wrapper .clear-button:hover {
    background: #d63638 !important;
    color: #fff !important;
}

/* Dropdown header - HIDDEN (not using this plugin) */
.ts-dropdown .dropdown-header {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Hide checkbox options plugin elements */
.ts-dropdown .ts-checkbox,
input[type="checkbox"].ts-checkbox {
    display: none !important;
}

/* Loading state */
.ts-wrapper.loading .ts-control::after {
    content: '' !important;
    position: absolute !important;
    right: 12px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 16px !important;
    height: 16px !important;
    border: 2px solid #dcdcde !important;
    border-top-color: #ea580c !important;
    border-radius: 50% !important;
    animation: momcs-spin 1s linear infinite !important;
}

@keyframes momcs-spin {
    to {
        transform: translateY(-50%) rotate(360deg);
    }
}

/* Ensure Tom Select is visible and properly positioned */
.momcs-schedule-field .ts-wrapper {
    position: relative !important;
    display: contents !important;
}

/* Hide native multi-select when Tom Select is active */
.momcs-schedule-field select.tomselected {
    position: absolute !important;
    left: -9999px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}


/* Error state for Tom Select */
.momcs-field-error + .ts-wrapper .ts-control,
.ts-wrapper.error .ts-control {
    border-color: #d63638 !important;
    box-shadow: 0 0 0 1px #d63638 !important;
}

/* Responsive adjustments */
@media (max-width: 782px) {
    .ts-wrapper .ts-control {
        min-height: 40px !important;
        font-size: 16px !important; /* Prevent zoom on iOS */
    }
    
    .ts-wrapper .ts-control .item {
        font-size: 14px !important;
        padding: 6px 10px !important;
    }
    
    .ts-dropdown .option {
        padding: 10px 12px !important;
        font-size: 14px !important;
    }
}

/* Ensure dropdown doesn't get cut off */
.momcs-schedule-field {
    position: relative;
    overflow: visible !important;
}

#momcs-schedule-attributes-field {
    position: relative;
    overflow: visible !important;
    z-index: 10;
}

/* Hide old attribute select controls if they exist */
.momcs-attribute-select-controls.button-controls {
    display: none !important;
}

.momcs-attribute-search {
    display: none !important;
}

.momcs-attribute-selection-preview {
    display: none !important;
}

/* ==========================================================================
   Dark Mode Compatibility (Future Enhancement)
   ========================================================================== */

@media (prefers-color-scheme: dark) {
    /* Dark mode styles can be added here when needed */
}
