/**
 * Product Addons Admin Styles
 * Modern UI for Extra Product Options for WooCommerce Product Addons
 * Enhanced with modern CSS features and design patterns
 */

 :root {
    /* Professional Color Palette - Clean & Modern */
    --epofw-primary: #2563eb;
    --epofw-primary-light: #3b82f6;
    --epofw-primary-dark: #1d4ed8;
    --epofw-secondary: #059669;
    --epofw-accent: #f97316;
    --epofw-success: #16a34a;
    --epofw-warning: #eab308;
    --epofw-error: #dc2626;
    
    /* Neutral Colors - Light & Professional */
    --epofw-white: #ffffff;
    --epofw-gray-50: #fafafa;
    --epofw-gray-100: #f5f5f5;
    --epofw-gray-200: #e5e5e5;
    --epofw-gray-300: #d4d4d4;
    --epofw-gray-400: #a3a3a3;
    --epofw-gray-500: #737373;
    --epofw-gray-600: #525252;
    --epofw-gray-700: #404040;
    --epofw-gray-800: #262626;
    --epofw-gray-900: #171717;
    --epofw-blue-500: #2271b1;
    
    /* Spacing Scale */
    --epofw-space-xs: 0.25rem;
    --epofw-space-sm: 0.5rem;
    --epofw-space-md: 1rem;
    --epofw-space-lg: 1.5rem;
    --epofw-space-xl: 2rem;
    --epofw-space-2xl: 3rem;
    --epofw-space-3xl: 4rem;
    
    /* Border Radius */
    --epofw-radius-sm: 0.375rem;
    --epofw-radius-md: 0.5rem;
    --epofw-radius-lg: 0.75rem;
    --epofw-radius-xl: 1rem;
    --epofw-radius-2xl: 1.5rem;
    
    /* Shadows */
    --epofw-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --epofw-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --epofw-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --epofw-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    /* Typography */
    --epofw-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --epofw-font-mono: 'JetBrains Mono', 'Fira Code', Consolas, Monaco, 'Courier New', monospace;
    
    /* Transitions */
    --epofw-transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --epofw-transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --epofw-transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Z-index Scale */
    --epofw-z-dropdown: 1000;
    --epofw-z-sticky: 1020;
    --epofw-z-fixed: 1030;
    --epofw-z-modal-backdrop: 1040;
    --epofw-z-modal: 1050;
    --epofw-z-popover: 1060;
    --epofw-z-tooltip: 1070;
    --epofw-z-toast: 1080;
}

.epofw-product-addons-container {
    max-width: 100%;
    display: flex;
    flex-direction: column;
    margin: 0;
    font-family: var(--epofw-font-sans);
    background-attachment: fixed;
    min-height: 100vh;
    padding: 0;
    color: var(--epofw-gray-800);
    font-feature-settings: 'liga', 'kern';
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
}

.epofw-product-addons-container::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(45deg, transparent 30%, rgba(59, 130, 246, 0.02) 50%, transparent 70%),
        linear-gradient(-45deg, transparent 30%, rgba(37, 99, 235, 0.02) 50%, transparent 70%),
        radial-gradient(circle at 25% 25%, rgba(59, 130, 246, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(37, 99, 235, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.epofw-product-addons-container::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 2px,
            rgba(59, 130, 246, 0.01) 2px,
            rgba(59, 130, 246, 0.01) 4px
        );
    pointer-events: none;
    z-index: 0;
}

/* Professional Dashboard Header */
.epofw-dashboard-header {
    background: #f8f9fa;
    color: var(--epofw-white);
    padding: var(--epofw-space-xl);
    margin: 0 0 var(--epofw-space-xl) 0;
    position: relative;
    overflow: hidden;
    border-radius: 0 0 var(--epofw-radius-2xl) var(--epofw-radius-2xl);
    box-shadow: 0 10px 25px -5px rgba(30, 64, 175, 0.3);
    z-index: 2;
}

.epofw-dashboard-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
        linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.02) 50%, transparent 70%);
    opacity: 1;
    animation: shimmer 3s ease-in-out infinite alternate;
}

@keyframes shimmer {
    0% { opacity: 0.5; }
    100% { opacity: 1; }
}

.epofw-product-addons-container {
    margin: 25px 0;
}

.epofw-dashboard-header > * {
    position: relative;
    z-index: 1;
}

.epofw-header-left {
    display: flex;
    align-items: center;
    gap: var(--epofw-space-lg);
}

.epofw-header-icon {
    width: 3.5rem;
    height: 3.5rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--epofw-radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--epofw-shadow-lg);
    transition: all var(--epofw-transition-base);
}

.epofw-header-icon:hover {
    transform: translateY(-2px) scale(1.05);
    background: rgba(255, 255, 255, 0.25);
    box-shadow: var(--epofw-shadow-xl);
}

.epofw-header-content h1.epofw-header-title {
    margin: 0 0 var(--epofw-space-sm) 0;
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.025em;
    background: linear-gradient(135deg, var(--epofw-white) 0%, rgba(255, 255, 255, 0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.epofw-header-subtitle {
    margin: 0;
    font-size: 1.125rem;
    opacity: 0.85;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: -0.01em;
}

.epofw-header-right {
    display: flex;
    align-items: center;
}

.epofw-header-actions {
    display: flex;
    gap: var(--epofw-space-md);
}

.epofw-btn {
    padding: var(--epofw-space-md) var(--epofw-space-lg);
    border-radius: var(--epofw-radius-lg);
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all var(--epofw-transition-base);
    display: inline-flex;
    align-items: center;
    gap: var(--epofw-space-sm);
    font-size: 0.875rem;
    position: relative;
    overflow: hidden;
    pointer-events: auto !important;
    z-index: 100 !important;
    min-height: 2.75rem;
    font-family: var(--epofw-font-sans);
    letter-spacing: -0.01em;
    user-select: none;
    -webkit-user-select: none;
}

.epofw-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left var(--epofw-transition-slow);
}

.epofw-btn:hover::before {
    left: 100%;
}

.epofw-btn-primary {
    background: rgba(255, 255, 255, 0.15);
    color: var(--epofw-white);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: var(--epofw-shadow-md);
}

.epofw-btn-primary:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px) scale(1.02);
    box-shadow: var(--epofw-shadow-xl);
    border-color: rgba(255, 255, 255, 0.3);
}

.epofw-btn-primary:active {
    transform: translateY(0) scale(0.98);
    box-shadow: var(--epofw-shadow-md);
}

.epofw-btn-secondary {
    background: transparent;
    color: var(--epofw-white);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.epofw-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: var(--epofw-shadow-lg);
}

.epofw-btn-secondary:active {
    transform: translateY(0);
}

/* Quick Stats Grid - Moved to unified section below */

.epofw-stat-item {
    background: #f8f9fa;
    border-radius: var(--epofw-radius-2xl);
    padding: var(--epofw-space-xl);
    box-shadow: var(--epofw-shadow-lg);
    border: 1px solid var(--epofw-gray-200);
    transition: all var(--epofw-transition-base);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.epofw-stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--epofw-primary), var(--epofw-primary-light));
    border-radius: var(--epofw-radius-2xl) var(--epofw-radius-2xl) 0 0;
}

.epofw-stat-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(99, 102, 241, 0.02) 100%);
    opacity: 0;
    transition: opacity var(--epofw-transition-base);
}

.epofw-stat-item:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: var(--epofw-shadow-xl);
    border-color: var(--epofw-primary);
}

.epofw-stat-item:hover::after {
    opacity: 1;
}

.epofw-stat-item {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.epofw-stat-item {
    display: flex;
    align-items: center;
    gap: var(--epofw-space-md);
    position: relative;
    z-index: 1;
}

.epofw-stat-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: var(--epofw-radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--epofw-white);
    background: linear-gradient(135deg, var(--epofw-primary) 0%, var(--epofw-primary-light) 100%);
    flex-shrink: 0;
    box-shadow: var(--epofw-shadow-md);
    transition: all var(--epofw-transition-base);
    position: relative;
    overflow: hidden;
}

.epofw-stat-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    opacity: 0;
    transition: opacity var(--epofw-transition-base);
}

.epofw-stat-icon:hover::before {
    opacity: 1;
}

.epofw-stat-info {
    flex: 1;
    min-width: 0;
}

.epofw-stat-number {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--epofw-gray-900);
    line-height: 1;
    margin-bottom: var(--epofw-space-xs);
    letter-spacing: -0.02em;
    background: #2271b1;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.epofw-stat-label {
    font-size: 0.875rem;
    color: var(--epofw-gray-600);
    font-weight: 500;
    letter-spacing: -0.01em;
}

.epofw-stat-trend {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
}

.epofw-stat-trend.positive {
    color: #059669;
    background: #d1fae5;
}

.epofw-stat-trend.negative {
    color: #dc2626;
    background: #fee2e2;
}

/* Controls Section */
.epofw-controls-section {
    background: #f8f9fa;
    border-radius: var(--epofw-radius-2xl);
    padding: var(--epofw-space-xl);
    box-shadow: var(--epofw-shadow-lg);
    border: 1px solid #f8f9fa;
    margin-bottom: var(--epofw-space-xl);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--epofw-space-lg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all var(--epofw-transition-base);
}

.epofw-controls-section:hover {
    box-shadow: var(--epofw-shadow-xl);
    border-color: #f8f9fa;
}

.epofw-search-section {
    flex: 1;
    max-width: 500px;
}

.epofw-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.epofw-search-wrapper i {
    position: absolute;
    left: var(--epofw-space-md);
    color: var(--epofw-gray-400);
    font-size: 1rem;
    z-index: 2;
    transition: color var(--epofw-transition-fast);
}

.epofw-search-input {
    width: 100%;
    padding: var(--epofw-space-md) var(--epofw-space-md) var(--epofw-space-md) 2.75rem;
    border: 2px solid var(--epofw-gray-200);
    border-radius: var(--epofw-radius-xl);
    font-size: 0.9rem;
    transition: all var(--epofw-transition-base);
    background: #ffffff;
    font-family: var(--epofw-font-sans);
    color: var(--epofw-gray-900);
    box-shadow: var(--epofw-shadow-sm);
}

.epofw-search-input:focus {
    outline: none;
    border-color: var(--epofw-primary);
    background: var(--epofw-white);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1), var(--epofw-shadow-md);
    transform: translateY(-1px);
}

.epofw-search-input::placeholder {
    color: var(--epofw-gray-400);
    font-weight: 400;
}

.epofw-search-focused .epofw-search-input {
    border-color: var(--epofw-primary);
    background: var(--epofw-white);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1), var(--epofw-shadow-md);
}

.epofw-search-focused i {
    color: var(--epofw-primary);
}

.epofw-clear-search {
    position: absolute;
    right: var(--epofw-space-md);
    background: none;
    border: none;
    color: var(--epofw-gray-400);
    cursor: pointer;
    padding: var(--epofw-space-xs);
    border-radius: var(--epofw-radius-sm);
    transition: all var(--epofw-transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
}

.epofw-clear-search:hover {
    color: var(--epofw-gray-600);
    background: var(--epofw-gray-100);
    transform: scale(1.1);
}

.epofw-filters-section {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.epofw-filter-select {
    padding: 0.875rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.9rem;
    background: white;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
}

.epofw-filter-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.epofw-clear-filters {
    padding: 0.875rem 1rem;
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.epofw-clear-filters:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
}

/* Addons Section */
.epofw-addons-section,
.epofw-general-settings-container {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
}

.epofw-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f7fafc;
}

.epofw-section-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a202c;
}

/* .epofw-section-actions {
    display: flex;
    gap: 0.5rem;
} */

.epofw-view-toggle {
    width: 36px;
    height: 36px;
    border: 1px solid #d1d5db;
    background: #ffffff;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    margin-left: 4px;
    position: relative;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.epofw-view-toggle:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    background: #f8fafc;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.epofw-view-toggle.active {
    border-color: #036698;
    color: #ffffff;
    background: #036698;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
    transform: translateY(-1px);
}

.epofw-view-toggle i {
    line-height: 1;
}

.epofw-section-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ============================================
   Search Box Styles
   ============================================ */
.epofw-section-actions .epofw-search-box {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-right: 16px;
}

.epofw-section-actions .epofw-search-box .epofw-search-input,
.epofw-search-box input.epofw-search-input {
    width: 320px;
    height: 46px;
    padding: 0 48px 0 16px;
    border: 2px solid #2172b0;
    border-radius: 10px;
    font-size: 15px;
    background: #ffffff !important;
    transition: all 0.2s ease;
    outline: none;
    box-sizing: border-box;
    margin: 0;
}

.epofw-search-box .epofw-search-input:focus {
    border-color: #2172b0;
    box-shadow: 0 0 0 4px rgba(33, 114, 176, 0.15);
}

.epofw-search-box .epofw-search-input::placeholder {
    color: var(--epofw-gray-400, #94a3b8);
    font-size: 15px;
    opacity: 1;
}

/* Search Icon - Right Side */
.epofw-search-box .epofw-search-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--epofw-gray-500, #64748b);
    font-size: 20px;
    width: 20px;
    height: 20px;
    line-height: 1;
    pointer-events: none;
    z-index: 1;
    transition: all 0.2s ease;
}

.epofw-search-box .epofw-search-input:focus ~ .epofw-search-icon {
    color: #2172b0;
}

.epofw-search-box .epofw-search-icon.dashicons::before {
    font-size: 20px;
    width: 20px;
    height: 20px;
    line-height: 20px;
    display: block;
}

/* Clear Button */
.epofw-search-box .epofw-search-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--epofw-gray-100, #f1f5f9);
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--epofw-gray-500, #64748b);
    border-radius: 50%;
    transition: all 0.2s ease;
    width: 28px;
    height: 28px;
    z-index: 2;
}

.epofw-search-box .epofw-search-clear:hover {
    background: var(--epofw-gray-200, #e2e8f0);
    color: var(--epofw-gray-700, #334155);
}

.epofw-search-box .epofw-search-clear .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 1;
}

.epofw-search-box .epofw-search-clear .dashicons::before {
    font-size: 16px;
    line-height: 16px;
}

/* Loading State */
.epofw-search-box.epofw-searching {
    pointer-events: none;
}

.epofw-search-box.epofw-searching::after {
    content: '';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    border: 2px solid var(--epofw-gray-200, #e2e8f0);
    border-top-color: var(--epofw-primary, #2563eb);
    border-radius: 50%;
    animation: epofw-spin 0.8s linear infinite;
}

.epofw-search-box.epofw-searching .epofw-search-icon,
.epofw-search-box.epofw-searching .epofw-search-clear {
    opacity: 0;
}

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

/* Search Results Stats */
.epofw-search-stats {
    font-size: 13px;
    color: var(--epofw-gray-500, #64748b);
    margin-bottom: 12px;
    padding: 8px 0;
}

.epofw-search-stats strong {
    color: var(--epofw-gray-700, #334155);
}

/* Hidden state for filtered cards */
.epofw-addon-card.epofw-hidden {
    display: none !important;
}

/* Match animation */
.epofw-addon-card.epofw-search-match {
    animation: epofw-card-appear 0.3s ease-out;
}

@keyframes epofw-card-appear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* No Results State */
.epofw-no-results {
    text-align: center;
    padding: 60px 20px;
    background: var(--epofw-gray-50, #f8fafc);
    border-radius: var(--epofw-radius-xl, 12px);
    border: 2px dashed var(--epofw-gray-300, #cbd5e0);
}

.epofw-no-results-icon {
    width: 80px;
    height: 80px;
    background: var(--epofw-gray-100, #f1f5f9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.epofw-no-results-icon .dashicons {
    font-size: 36px;
    width: 36px;
    height: 36px;
    color: var(--epofw-gray-400, #94a3b8);
}

.epofw-no-results h3 {
    font-size: 18px;
    color: var(--epofw-gray-700, #334155);
    margin: 0 0 8px;
}

.epofw-no-results p {
    font-size: 14px;
    color: var(--epofw-gray-500, #64748b);
    margin: 0;
}

.epofw-no-results .epofw-clear-search-link {
    color: var(--epofw-primary, #0073aa);
    text-decoration: none;
    cursor: pointer;
}

.epofw-no-results .epofw-clear-search-link:hover {
    text-decoration: underline;
}

/* Hidden addon card (for search) */
.epofw-addon-card.epofw-hidden {
    display: none !important;
}

/* Search highlight animation */
.epofw-addon-card.epofw-search-match {
    animation: epofwSearchHighlight 0.3s ease;
}

@keyframes epofwSearchHighlight {
    0% { transform: scale(0.98); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

/* Responsive Search */
@media (max-width: 992px) {
    .epofw-search-box .epofw-search-input {
        width: 260px;
    }
}

@media (max-width: 768px) {
    .epofw-section-actions .epofw-search-box {
        width: 100%;
        margin-right: 0;
        margin-bottom: 12px;
        order: -1;
    }
    
    .epofw-search-box .epofw-search-input {
        width: 100%;
        height: 48px;
        font-size: 16px;
    }
    
    .epofw-section-actions {
        flex-wrap: wrap;
    }
}

/* Addons Grid */
.epofw-addons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: var(--epofw-space-lg);
    container-type: inline-size;
}

.epofw-addons-list {
    display: grid;
    grid-template-rows: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--epofw-space-lg);
    container-type: inline-size;
}

@media (max-width: 600px) {
    .epofw-addons-grid {
        grid-template-columns: 1fr;
    }
}

.epofw-addon-card {
    background: var(--epofw-white);
    border-radius: var(--epofw-radius-2xl);
    box-shadow: var(--epofw-shadow-lg);
    border: 1px solid var(--epofw-gray-200);
    transition: all var(--epofw-transition-base);
    overflow: hidden;
    position: relative;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.epofw-addon-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--epofw-primary), var(--epofw-primary-light));
    opacity: 0;
    transition: opacity var(--epofw-transition-base);
    border-radius: var(--epofw-radius-2xl) var(--epofw-radius-2xl) 0 0;
}

.epofw-addon-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(99, 102, 241, 0.02) 100%);
    opacity: 0;
    transition: opacity var(--epofw-transition-base);
}

.epofw-addon-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: var(--epofw-shadow-xl);
    border-color: var(--epofw-primary);
}

.epofw-addon-card:hover::before,
.epofw-addon-card:hover::after {
    opacity: 1;
}

.epofw-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.epofw-card-type {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #4a5568;
}

.epofw-card-type i {
    font-size: 1rem;
    color: #667eea;
}

.epofw-card-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.epofw-card-status.active {
    color: #059669;
    background: #d1fae5;
}

.epofw-card-status.inactive {
    color: #dc2626;
    background: #fee2e2;
}

.epofw-status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.epofw-card-status.active .epofw-status-indicator {
    background: #059669;
}

.epofw-card-status.inactive .epofw-status-indicator {
    background: #dc2626;
}

.epofw-card-body {
    padding: 1.5rem;
}

.epofw-card-title {
    margin: 0 0 0.75rem 0;
    font-size: 1.125rem;
    font-weight: 700;
    color: #1a202c;
    line-height: 1.4;
}

.epofw-card-description {
    margin: 0 0 1rem 0;
    color: #718096;
    font-size: 0.875rem;
    line-height: 1.5;
}

.epofw-card-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.epofw-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: #a0aec0;
}

.epofw-meta-item i {
    font-size: 0.875rem;
    color: #667eea;
}

.epofw-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.epofw-card-actions {
    display: flex;
    gap: 0.5rem;
}

/* Action button styles moved to unified section below */

.epofw-card-toggle {
    display: flex;
    align-items: center;
}

.epofw-toggle-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    background: white;
    color: #a0aec0;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    border: 1px solid #e2e8f0;
}

.epofw-toggle-btn:hover {
    background: #f7fafc;
    color: #4a5568;
    transform: translateY(-2px);
}

/* Empty State */
.epofw-empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.epofw-empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
}

.epofw-empty-state h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a202c;
}

.epofw-empty-state p {
    margin: 0 0 2rem 0;
    color: #718096;
    font-size: 0.875rem;
}

.epofw-create-first-btn {
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.epofw-create-first-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

/* Modern Responsive Design with Container Queries */
@media (max-width: 1200px) {
    .epofw-addons-grid {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    }
}

@media (max-width: 768px) {
    .epofw-addons-grid {
        grid-template-columns: 1fr;
        gap: var(--epofw-space-md);
    }
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
    .epofw-dashboard-header {
        padding: var(--epofw-space-xl) var(--epofw-space-lg);
    }
    
    .epofw-header-content h1.epofw-header-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .epofw-dashboard-header {
        padding: var(--epofw-space-xl) var(--epofw-space-md);
        margin: -20px -20px var(--epofw-space-lg) -20px;
        border-radius: 0 0 var(--epofw-radius-xl) var(--epofw-radius-xl);
    }
    
    .epofw-header-left {
        flex-direction: column;
        gap: var(--epofw-space-md);
        text-align: center;
    }
    
    .epofw-header-content h1.epofw-header-title {
        font-size: 1.875rem;
    }
    
    .epofw-header-actions {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: var(--epofw-space-sm);
    }
    
    .epofw-stats-grid {
        /* First 3 stat items are smaller, action buttons box is wider */
        grid-template-columns: 1.5fr 1.5fr 1.5fr 2.5fr;
        gap: var(--epofw-space-md);
    }
    
    .epofw-controls-section {
        flex-direction: column;
        gap: var(--epofw-space-md);
        padding: var(--epofw-space-lg);
    }
    
    .epofw-search-section {
        max-width: none;
    }
    
    .epofw-filters-section {
        justify-content: center;
        flex-wrap: wrap;
        gap: var(--epofw-space-sm);
    }
    
    .epofw-section-header {
        flex-direction: column;
        gap: var(--epofw-space-md);
        align-items: stretch;
        text-align: center;
    }
    
    /* .epofw-section-actions {
        justify-content: center;
    } */
}

@media (max-width: 640px) {
    :root {
        --epofw-space-xl: 1.5rem;
        --epofw-space-lg: 1rem;
    }
    
    .epofw-stats-grid {
        grid-template-columns: 1.5fr;
    }
    
    .epofw-stat-item {
        padding: var(--epofw-space-lg);
        flex-direction: column;
        text-align: center;
        gap: var(--epofw-space-md);
    }
    
    .epofw-stat-number {
        font-size: 1.875rem;
    }
    
    .epofw-header-content h1.epofw-header-title {
        font-size: 1.5rem;
    }
    
    .epofw-filters-section {
        flex-direction: column;
        align-items: stretch;
    }
    
    .epofw-filter-select {
        min-width: auto;
    }
    
    .epofw-card-footer {
        flex-direction: column;
        gap: var(--epofw-space-md);
        align-items: stretch;
    }
    
    .epofw-card-actions,
    .epofw-card-toggle {
        justify-content: center;
    }
    
    .epofw-btn {
        font-size: 0.8rem;
        padding: var(--epofw-space-sm) var(--epofw-space-md);
        min-height: 2.5rem;
    }
}

@media (max-width: 480px) {
    :root {
        --epofw-space-xl: 1rem;
        --epofw-space-lg: 0.75rem;
    }
    
    .epofw-dashboard-header {
        padding: var(--epofw-space-lg);
        margin: -20px -20px var(--epofw-space-md) -20px;
    }
    
    .epofw-header-icon {
        width: 3rem;
        height: 3rem;
    }
    
    .epofw-stat-item {
        padding: var(--epofw-space-md);
    }
    
    .epofw-addon-card {
        margin: 0 var(--epofw-space-xs);
    }
}

/* Modern Animation Classes */
.epofw-fade-in {
    animation: fadeInUp var(--epofw-transition-slow) cubic-bezier(0.16, 1, 0.3, 1);
}

.epofw-slide-in {
    animation: slideInLeft var(--epofw-transition-base) cubic-bezier(0.16, 1, 0.3, 1);
}

.epofw-scale-in {
    animation: scaleInBounce var(--epofw-transition-slow) cubic-bezier(0.34, 1.56, 0.64, 1);
}

.epofw-fade-in-delayed {
    animation: fadeInUp var(--epofw-transition-slow) cubic-bezier(0.16, 1, 0.3, 1);
    animation-delay: 0.1s;
    animation-fill-mode: both;
}

.epofw-stagger-animation > * {
    animation: fadeInUp var(--epofw-transition-slow) cubic-bezier(0.16, 1, 0.3, 1);
    animation-fill-mode: both;
}

.epofw-stagger-animation > *:nth-child(1) { animation-delay: 0ms; }
.epofw-stagger-animation > *:nth-child(2) { animation-delay: 100ms; }
.epofw-stagger-animation > *:nth-child(3) { animation-delay: 200ms; }
.epofw-stagger-animation > *:nth-child(4) { animation-delay: 300ms; }
.epofw-stagger-animation > *:nth-child(5) { animation-delay: 400ms; }
.epofw-stagger-animation > *:nth-child(6) { animation-delay: 500ms; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-40px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes scaleInBounce {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Pulse Animation for Loading States */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.epofw-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Float Animation for Interactive Elements */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-6px);
    }
}

.epofw-float {
    animation: float 3s ease-in-out infinite;
}

/* Modern Utility Classes */
.epofw-glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.epofw-glass-dark {
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.epofw-gradient-border {
    position: relative;
    background: var(--epofw-white);
    border-radius: var(--epofw-radius-lg);
}

.epofw-gradient-border::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 2px;
    background: linear-gradient(135deg, var(--epofw-primary), var(--epofw-primary-light));
    border-radius: inherit;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: xor;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
}

.epofw-neon-glow {
    box-shadow: 
        0 0 5px var(--epofw-primary),
        0 0 10px var(--epofw-primary),
        0 0 15px var(--epofw-primary),
        0 0 20px var(--epofw-primary);
}

.epofw-text-gradient {
    background: linear-gradient(135deg, var(--epofw-primary), var(--epofw-primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.epofw-morphism {
    background: linear-gradient(145deg, 
        rgba(255, 255, 255, 0.1),
        rgba(255, 255, 255, 0.05)
    );
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Modern Focus States */
.epofw-focus-ring:focus-visible {
    outline: 2px solid var(--epofw-primary);
    outline-offset: 2px;
    border-radius: var(--epofw-radius-sm);
}

.epofw-focus-ring:focus:not(:focus-visible) {
    outline: none;
}

/* Interactive States */
.epofw-interactive {
    cursor: pointer;
    transition: all var(--epofw-transition-base);
    user-select: none;
    -webkit-user-select: none;
}

.epofw-interactive:hover {
    transform: translateY(-2px);
}

.epofw-interactive:active {
    transform: translateY(0) scale(0.98);
}

/* Loading Skeleton */
.epofw-skeleton {
    background: linear-gradient(90deg, 
        var(--epofw-gray-200) 25%, 
        var(--epofw-gray-100) 50%, 
        var(--epofw-gray-200) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--epofw-radius-md);
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Scroll Behavior */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* Accessibility & Performance Enhancements */

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .epofw-addon-card {
        border-width: 2px;
        border-color: var(--epofw-gray-900);
    }
    
    .epofw-btn {
        border-width: 2px;
    }
    
    .epofw-text-gradient {
        -webkit-text-fill-color: unset;
        background: none;
        color: var(--epofw-gray-900);
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .epofw-shimmer,
    .epofw-float,
    .epofw-pulse {
        animation: none;
    }
}

/* Professional Dark Mode Support - Optional */
@media (prefers-color-scheme: dark) {
    :root {
        --epofw-gray-50: #0f172a;
        --epofw-gray-100: #1e293b;
        --epofw-gray-200: #334155;
        --epofw-gray-300: #475569;
        --epofw-gray-400: #64748b;
        --epofw-gray-500: #94a3b8;
        --epofw-gray-600: #cbd5e0;
        --epofw-gray-700: #e2e8f0;
        --epofw-gray-800: #f1f5f9;
        --epofw-gray-900: #f8fafc;
        --epofw-white: #0f172a;
    }
    
    .epofw-product-addons-container {
        color: #e2e8f0;
    }
    
    .epofw-addon-card,
    .epofw-controls-section {
        background: #f8f9fa;
        border-color: #f8f9fa;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    }
    
    .epofw-dashboard-header {
        background: #f8f9fa;
    }
}

/* Enhanced Card Styling - Professional & Clean */
.epofw-addon-card {
    background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.08), 
        0 2px 4px -1px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.epofw-addon-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: #d1d5db;
}

/* Professional Button Styling */
.epofw-btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    line-height: 1.5;
}

.epofw-btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.3);
}

.epofw-btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 8px -1px rgba(37, 99, 235, 0.4);
}

.epofw-btn-secondary {
    background: linear-gradient(135deg, #6b7280 0%, #9ca3af 100%);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(107, 114, 128, 0.3);
}

.epofw-btn-secondary:hover {
    background: linear-gradient(135deg, #4b5563 0%, #6b7280 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 8px -1px rgba(107, 114, 128, 0.4);
}

.epofw-btn-success {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(5, 150, 105, 0.3);
}

.epofw-btn-success:hover {
    background: linear-gradient(135deg, #047857 0%, #059669 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 8px -1px rgba(5, 150, 105, 0.4);
}

/* Professional Stat Cards */
.epofw-stat-item {
    background: #f8f9fa;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.08), 
        0 2px 4px -1px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    z-index: 1;
}

.epofw-stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: #d1d5db;
}

.epofw-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 24px;
    color: white;
}

.epofw-stat-icon.epofw-stat-icon-active {
    background: linear-gradient(135deg, #cff8e5 0%, #cff8e5 100%);
    color: #079669;
}

.epofw-stat-icon.epofw-stat-icon-inactive {
    background: linear-gradient(135deg, #fde1e3 0%, #fde1e3 100%);
    color: #dc2627;
}

/* Action Buttons Box */
.epofw-stat-icon.epofw-stat-icon-actions {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    color: #036698;
}

/* Statistics Grid Layout */
.epofw-stats-grid {
    display: grid;
    /* First 3 stat items are smaller, action buttons box is wider */
    grid-template-columns: 1.5fr 1.5fr 1.5fr 2.5fr;
    gap: 20px;
    margin-bottom: 30px;
}

/* Action Buttons in Statistics */
.epofw-action-buttons-box {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.epofw-action-buttons-box:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.epofw-action-buttons-title {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.epofw-action-buttons {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.epofw-action-btn {
    width: 40px;
    height: 40px;
    border: 2px solid #e5e7eb;
    background: #ffffff;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    text-decoration: none;
}

.epofw-action-btn:hover {
    border-color: #036698;
    color: #036698;
    background: #f0f9ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(3, 102, 152, 0.2);
    text-decoration: none;
}

.epofw-action-btn.epofw-create-btn {
    border-color: #036698;
    color: #ffffff;
    background: #036698;
}

.epofw-action-btn.epofw-create-btn:hover {
    background: #025a7a;
    border-color: #025a7a;
    color: #ffffff;
}

.epofw-action-btn i {
    font-size: 18px;
}

/* ── Labeled action buttons: Quick Actions pills + card action buttons ───────
   Buttons in these two containers now show an icon + text label, so they grow
   to fit their content. The icon-only toggle button (.epofw-card-toggle) is not
   scoped here and stays a 40x40 square. */
.epofw-action-btn__label {
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

.epofw-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.epofw-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.epofw-action-buttons .epofw-action-btn,
.epofw-card-actions .epofw-action-btn {
    width: auto;
    height: auto;
    min-width: 0;
    gap: 8px;
    padding: 9px 16px;
    white-space: nowrap;
}

/* Quick Actions render as light, fully-rounded pills that wrap gracefully. */
.epofw-action-buttons .epofw-action-btn {
    border-radius: 999px;
}

/* Card actions render as labeled rounded-rectangle buttons. */
.epofw-card-actions .epofw-action-btn {
    border-radius: 8px;
}

/* Primary pill (Add New). */
.epofw-action-btn.epofw-action-btn--primary {
    border-color: #036698;
    color: #ffffff;
    background: #036698;
}

.epofw-action-btn.epofw-action-btn--primary:hover {
    background: #025a7a;
    border-color: #025a7a;
    color: #ffffff;
}

/* Danger button (Delete). */
.epofw-action-btn.epofw-action-btn--danger {
    color: #dc2626;
}

.epofw-action-btn.epofw-action-btn--danger:hover {
    border-color: #dc2626;
    color: #dc2626;
    background: #fef2f2;
}

/* Labels make the title hover-tooltip redundant inside these containers. */
.epofw-action-buttons .epofw-action-btn[title]:hover::after,
.epofw-action-buttons .epofw-action-btn[title]:hover::before,
.epofw-card-actions .epofw-action-btn[title]:hover::after,
.epofw-card-actions .epofw-action-btn[title]:hover::before {
    display: none;
}

/* Disabled Button State */
.epofw-action-btn.epofw-btn-disabled,
.epofw-action-btn.epofw-btn-disabled:hover {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    border-color: #d1d5db;
    background: #f3f4f6;
    color: #9ca3af;
    transform: none;
    box-shadow: none;
}

/* Tooltip Styles */
.epofw-action-btn[title]:hover::after {
    content: attr(title);
    position: absolute;
    left: 50%;
    top: -75%;
    transform: translateX(-45%);
    background: #1f2937;
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    z-index: 99999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
.epofw-action-btn.epofw-edit-btn[title]:hover::after{
    padding: 4px 12px;
}

.epofw-action-btn[title]:hover::before {
    content: '';
    position: absolute;
    left: 50%;
    top: -4px;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: #1f2937;
    z-index: 1000;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .epofw-stats-grid {
        /* On tablets: 2 stat items per row, action box takes full width on next row */
        grid-template-columns: 1.5fr 1.5fr;
        gap: 15px;
    }
    
    /* Make action box span full width on tablets */
    .epofw-action-buttons-box {
        grid-column: 1 / -1;
    }
    
    .epofw-action-buttons {
        gap: 6px;
    }
    
    .epofw-action-btn {
        width: 36px;
        height: 36px;
    }
    
    .epofw-action-btn i {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .epofw-stats-grid {
        grid-template-columns: 1.5fr;
    }
}

/* Field Type Cards for Getting Started */
.epofw-field-type-card {
    cursor: pointer;
    transition: all 0.3s ease;
}

.epofw-field-type-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px -8px rgba(30, 64, 175, 0.3);
}

.epofw-field-type-card .epofw-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.epofw-field-type-card .epofw-card-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.epofw-field-type-card .epofw-card-icon i {
    font-size: 24px;
    color: #ffffff;
}
.epofw-addons-section .epofw-field-type-card .epofw-card-icon i {
    font-size: 24px;
    color: #ffffff;
    line-height: 0.8;
    width: 22px;
}

.epofw-field-type-card .epofw-card-type {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.epofw-premium-badge {
    display: inline-block;
    padding: 2px 8px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
    font-size: 10px;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.epofw-field-type-card .epofw-card-body {
    padding-top: 16px;
}

.epofw-field-type-card .epofw-card-description p {
    margin: 0;
    color: #6b7280;
    font-size: 13px;
    line-height: 1.6;
}

.epofw-field-type-card .epofw-card-footer {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.epofw-field-type-links {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.epofw-field-type-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #f3f4f6;
    border-radius: 8px;
    color: #374151;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.epofw-field-type-link:hover {
    background: #3b82f6;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.epofw-field-type-link i {
    font-size: 16px;
    font-size: 22px;
    line-height: 0.9;
    width: 22px;
}

.epofw-field-type-link:hover i {
    color: #ffffff;
}

.epofw-section-subtitle {
    color: #6b7280;
    font-size: 14px;
    margin: 8px 0 0 0;
    font-weight: normal;
}

.epofw-stat-icon.epofw-primary {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
}

.epofw-stat-icon.epofw-success {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
}

.epofw-stat-icon.epofw-warning {
    background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
}

/* Professional Navigation Tabs */
.epofw-nav-tabs {
    background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 8px;
    margin-bottom: 24px;
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.08), 
        0 2px 4px -1px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    position: relative;
    z-index: 1;
}

.epofw-nav-tab {
    padding: 12px 24px;
    border-radius: 8px;
    color: #6b7280;
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 500;
}

.epofw-nav-tab:hover {
    color: #2563eb;
    background: #f3f4f6;
}

.epofw-nav-tab.active {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.3);
}

/* Theme Toggle Button */
.epofw-theme-toggle {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 1000;
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 50px;
    padding: 12px;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.epofw-theme-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px -3px rgba(0, 0, 0, 0.1);
    border-color: #d1d5db;
}

.epofw-theme-toggle.dark {
    background: #1f2937;
    border-color: #4b5563;
    color: #f9fafb;
}

.epofw-theme-toggle .theme-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
}

.epofw-theme-toggle.dark .theme-icon {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

/* Enhanced Typography */
.epofw-page-title {
    font-size: 32px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
    line-height: 1.2;
}

.epofw-page-subtitle {
    font-size: 18px;
    color: #6b7280;
    margin-bottom: 32px;
    line-height: 1.5;
}

/* Professional Form Styling */
.epofw-form-group {
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
}

/* Ensure all form content has proper z-index */
.epofw-tab-content,
.epofw-modal-content,
.epofw-form-content {
    position: relative;
    z-index: 1;
}

/* Enhanced background for form sections */
.epofw-form-section {
    background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.08), 
        0 2px 4px -1px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    position: relative;
    z-index: 1;
}

.epofw-form-label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    font-size: 14px;
}

.epofw-form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: #ffffff;
}

.epofw-form-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Professional Table Styling */
.epofw-table {
    width: 100%;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.epofw-table th {
    background: #f9fafb;
    padding: 16px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
}

.epofw-table td {
    padding: 16px;
    border-bottom: 1px solid #f3f4f6;
    color: #6b7280;
}

.epofw-table tr:hover {
    background: #f9fafb;
}

/* Professional Modal Styling */
.epofw-modal {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid #e5e7eb;
}

.epofw-modal-header {
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    padding: 24px;
    border-radius: 16px 16px 0 0;
}

.epofw-modal-title {
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.epofw-modal-body {
    padding: 24px;
}

.epofw-modal-footer {
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    padding: 24px;
    border-radius: 0 0 16px 16px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Manual Dark Theme Class */
.epofw-product-addons-container.epofw-dark-theme {
    background: 
        linear-gradient(135deg, #0f172a 0%, #1e293b 25%, #334155 50%, #1e293b 75%, #0f172a 100%),
        radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(37, 99, 235, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(15, 23, 42, 0.9) 0%, transparent 70%);
    color: #e2e8f0;
}

.epofw-product-addons-container.epofw-dark-theme::before {
    background: 
        linear-gradient(45deg, transparent 30%, rgba(59, 130, 246, 0.05) 50%, transparent 70%),
        linear-gradient(-45deg, transparent 30%, rgba(37, 99, 235, 0.05) 50%, transparent 70%),
        radial-gradient(circle at 25% 25%, rgba(59, 130, 246, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(37, 99, 235, 0.06) 0%, transparent 50%);
}

.epofw-product-addons-container.epofw-dark-theme::after {
    background-image: 
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 2px,
            rgba(59, 130, 246, 0.02) 2px,
            rgba(59, 130, 246, 0.02) 4px
        );
}

.epofw-product-addons-container.epofw-dark-theme .epofw-addon-card,
.epofw-product-addons-container.epofw-dark-theme .epofw-controls-section {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(51, 65, 85, 0.95) 100%);
    border-color: #475569;
    box-shadow: 
        0 8px 15px -3px rgba(0, 0, 0, 0.4), 
        0 4px 6px -2px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.epofw-product-addons-container.epofw-dark-theme .epofw-dashboard-header {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #3b82f6 100%);
}

.epofw-product-addons-container.epofw-dark-theme .epofw-stat-item {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(51, 65, 85, 0.95) 100%);
    border-color: #475569;
    color: #e2e8f0;
    box-shadow: 
        0 8px 15px -3px rgba(0, 0, 0, 0.4), 
        0 4px 6px -2px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.epofw-product-addons-container.epofw-dark-theme .epofw-nav-tabs {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(51, 65, 85, 0.95) 100%);
    border-color: #475569;
    box-shadow: 
        0 8px 15px -3px rgba(0, 0, 0, 0.4), 
        0 4px 6px -2px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.epofw-product-addons-container.epofw-dark-theme .epofw-nav-tab {
    color: #94a3b8;
}

.epofw-product-addons-container.epofw-dark-theme .epofw-nav-tab:hover {
    color: #60a5fa;
    background: rgba(59, 130, 246, 0.1);
}

.epofw-product-addons-container.epofw-dark-theme .epofw-modal {
    background: rgba(30, 41, 59, 0.95);
    border-color: #475569;
}

.epofw-product-addons-container.epofw-dark-theme .epofw-modal-header {
    background: rgba(15, 23, 42, 0.95);
    border-color: #475569;
}

.epofw-product-addons-container.epofw-dark-theme .epofw-modal-footer {
    background: rgba(15, 23, 42, 0.95);
    border-color: #475569;
}

.epofw-product-addons-container.epofw-dark-theme .epofw-table {
    background: rgba(30, 41, 59, 0.95);
    border-color: #475569;
}

.epofw-product-addons-container.epofw-dark-theme .epofw-table th {
    background: rgba(15, 23, 42, 0.95);
    border-color: #475569;
    color: #e2e8f0;
}

.epofw-product-addons-container.epofw-dark-theme .epofw-table td {
    border-color: #475569;
    color: #cbd5e0;
}

.epofw-product-addons-container.epofw-dark-theme .epofw-table tr:hover {
    background: rgba(59, 130, 246, 0.1);
}

.epofw-product-addons-container.epofw-dark-theme .epofw-form-input {
    background: rgba(30, 41, 59, 0.95);
    border-color: #475569;
    color: #e2e8f0;
}

.epofw-product-addons-container.epofw-dark-theme .epofw-form-input:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

.epofw-product-addons-container.epofw-dark-theme .epofw-form-label {
    color: #e2e8f0;
}

/* Enhanced Visual Elements */
.epofw-welcome-section {
    background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 32px;
    text-align: center;
    box-shadow: 
        0 8px 15px -3px rgba(0, 0, 0, 0.08), 
        0 4px 6px -2px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    position: relative;
    z-index: 1;
}

.epofw-welcome-section h1 {
    font-size: 36px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.epofw-welcome-section p {
    font-size: 18px;
    color: #6b7280;
    margin-bottom: 24px;
    line-height: 1.6;
}

/* Professional Action Buttons */
.epofw-action-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.epofw-action-btn {
    /* padding: 16px 32px; */
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.epofw-action-btn.primary {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.3);
}

.epofw-action-btn.primary:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 15px -3px rgba(37, 99, 235, 0.4);
}

.epofw-action-btn.secondary {
    background: linear-gradient(135deg, #6b7280 0%, #9ca3af 100%);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(107, 114, 128, 0.3);
}

.epofw-action-btn.secondary:hover {
    background: linear-gradient(135deg, #4b5563 0%, #6b7280 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 15px -3px rgba(107, 114, 128, 0.4);
}

.epofw-action-btn.success {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(5, 150, 105, 0.3);
}

.epofw-action-btn.success:hover {
    background: linear-gradient(135deg, #047857 0%, #059669 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 15px -3px rgba(5, 150, 105, 0.4);
}

/* Professional Stats Grid - Moved to unified section below */

/* Enhanced Card Hover Effects */
.epofw-addon-card,
.epofw-stat-item {
    position: relative;
    overflow: hidden;
}

.epofw-addon-card::before,
.epofw-stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.epofw-addon-card:hover::before,
.epofw-stat-item:hover::before {
    left: 100%;
}

/* Professional Loading States */
.epofw-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: inherit;
    z-index: 10;
}

.epofw-loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-top: 4px solid #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Responsive Design Improvements */
@media (max-width: 768px) {
    .epofw-action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .epofw-action-btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .epofw-stats-grid {
        grid-template-columns: 1.5fr;
    }
    
    .epofw-theme-toggle {
        top: 80px;
        right: 10px;
        padding: 8px;
        font-size: 12px;
    }
    
    .epofw-theme-toggle span {
        display: none;
    }
}

/* Performance Optimizations */
.epofw-addon-card,
.epofw-stat-item,
.epofw-btn {
    will-change: transform;
    contain: layout style paint;
}

.epofw-addon-card:not(:hover),
.epofw-stat-item:not(:hover),
.epofw-btn:not(:hover) {
    will-change: auto;
}

/* GPU Acceleration for Animations */
.epofw-fade-in,
.epofw-slide-in,
.epofw-scale-in {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Modern Print Styles */
@media print {
    .epofw-dashboard-header,
    .epofw-controls-section,
    .epofw-section-actions,
    .epofw-card-footer,
    .epofw-header-actions {
        display: none !important;
    }
    
    .epofw-product-addons-container {
        background: white !important;
    }
    
    .epofw-addon-card {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ddd !important;
        background: white !important;
    }
    
    .epofw-stat-item {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
    
    /* Ensure text is readable */
    .epofw-text-gradient {
        -webkit-text-fill-color: unset !important;
        background: none !important;
        color: black !important;
    }
}

/* Loading States */
.epofw-loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.epofw-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Hover Effects */
.epofw-stat-item:hover .epofw-stat-icon {
    transform: scale(1.1);
}

.epofw-addon-card:hover .epofw-card-type i {
    transform: rotate(5deg);
}

.epofw-action-btn:hover {
    transform: translateY(-2px) scale(1.05);
}

/* Focus States */
.epofw-btn:focus,
.epofw-action-btn:focus,
.epofw-toggle-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

.epofw-search-input:focus,
.epofw-filter-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Custom Scrollbar - Matches Clean Layout */
.epofw-product-addons-container::-webkit-scrollbar,
.epofw-modal-body::-webkit-scrollbar {
    width: 10px;
}

.epofw-product-addons-container::-webkit-scrollbar-track,
.epofw-modal-body::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 5px;
    border: 1px solid #e9ecef;
}

.epofw-product-addons-container::-webkit-scrollbar-thumb,
.epofw-modal-body::-webkit-scrollbar-thumb {
    background: #0073aa;
    border-radius: 5px;
    border: 1px solid #005a87;
}

.epofw-product-addons-container::-webkit-scrollbar-thumb:hover,
.epofw-modal-body::-webkit-scrollbar-thumb:hover {
    background: #005a87;
    border-color: #004085;
}

.epofw-product-addons-container::-webkit-scrollbar-thumb:active,
.epofw-modal-body::-webkit-scrollbar-thumb:active {
    background: #004085;
}

/* Firefox scrollbar styling */
.epofw-product-addons-container,
.epofw-modal-body {
    scrollbar-width: thin;
    scrollbar-color: #0073aa #f8f9fa;
}

/* Remove duplicate scrollbars */
.epofw-modal-content::-webkit-scrollbar,
.epofw-tab-content::-webkit-scrollbar {
    display: none !important;
}

/* Ensure tab content never shows scrollbars */
.epofw-tab-content,
.epofw-tab-content[style*="overflow"],
.epofw-tab-content[style*="scroll"] {
    overflow: visible !important;
    max-height: none !important;
    height: auto !important;
}

/* Ensure only one scrollable container */
.epofw-modal-content {
    overflow: hidden !important;
}

.epofw-modal-body {
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

.epofw-tab-content {
    overflow: visible !important;
}

/* Specific fix for Label Settings tab */
.epofw-tab-content[data-tab="label-settings"],
.epofw-tab-content[data-tab="label_settings"],
.epofw-tab-content:has([data-tab*="label"]) {
    overflow: visible !important;
    max-height: none !important;
    height: auto !important;
    overflow-y: visible !important;
    overflow-x: visible !important;
}

/* Print Styles */
@media print {
    .epofw-dashboard-header,
    .epofw-controls-section,
    .epofw-section-actions,
    .epofw-card-footer {
        display: none;
    }
    
    .epofw-product-addons-container {
        background: white;
    }
    
    .epofw-addon-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Modern Radio Options Label */
.epofw-options-section-title {
    display: flex;
    align-items: center;
    gap: var(--epofw-space-md);
    margin-bottom: var(--epofw-space-xl);
    padding: var(--epofw-space-lg) 0;
    border-bottom: 2px solid var(--epofw-gray-100);
}

.epofw-options-section-title h3,
.epofw-options-section-title label {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--epofw-gray-900);
    letter-spacing: -0.025em;
    position: relative;
}

.epofw-options-section-title::before {
    content: '';
    width: 4px;
    height: 2rem;
    background: linear-gradient(135deg, var(--epofw-primary), var(--epofw-primary-light));
    border-radius: var(--epofw-radius-sm);
    flex-shrink: 0;
}

.epofw-options-section-title .epofw-icon {
    width: 2rem;
    height: 2rem;
    background: linear-gradient(135deg, var(--epofw-primary), var(--epofw-primary-light));
    border-radius: var(--epofw-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--epofw-white);
    font-size: 0.875rem;
    flex-shrink: 0;
}

/* Settings Modal Styles */
.epofw-settings-modal {
    max-width: 900px !important;
    width: 95% !important;
    max-height: 90vh !important;
}

.epofw-settings-tabs {
    display: flex;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 1.5rem;
    overflow-x: auto;
    gap: 0;
    padding: 0 4px;
    scrollbar-width: thin;
}

.epofw-tab-btn {
    padding: 0.6rem 0.75rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: #718096;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    min-width: auto;
    flex-shrink: 0;
}

.epofw-tab-btn:hover {
    color: #667eea;
    background: #f7fafc;
}

.epofw-tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: #f7fafc;
}

.epofw-tab-btn.disabled {
    color: #a0aec0;
    cursor: not-allowed;
    opacity: 0.5;
}

.epofw-tab-btn.disabled:hover {
    color: #a0aec0;
    background: none;
}

.epofw-tab-btn i {
    font-size: 0.9rem;
    line-height: 1;
}

.epofw-tab-content {
    position: relative;
    min-height: 400px;
    max-height: none !important;
    overflow: visible !important;
    padding-right: 0.5rem;
}

.epofw-tab-pane {
    display: none;
    animation: fadeIn 0.3s ease;
}

.epofw-tab-pane.active {
    display: block;
}

.epofw-settings-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.epofw-settings-section h4 {
    margin: 0 0 1rem 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a202c;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.epofw-settings-section h4 i {
    color: #667eea;
}

.epofw-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.epofw-form-group {
    display: flex;
    flex-direction: column;
}

.epofw-form-group label {
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #4a5568;
    font-size: 0.875rem;
}

.epofw-form-input,
.epofw-form-select,
.epofw-form-textarea {
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    background: white;
}

.epofw-form-input:focus,
.epofw-form-select:focus,
.epofw-form-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.epofw-form-input[readonly] {
    background: #f7fafc;
    color: #718096;
    cursor: not-allowed;
}

.epofw-form-textarea {
    resize: vertical;
    min-height: 80px;
}

.epofw-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: #4a5568;
}

.epofw-checkbox {
    display: none;
}

.epofw-checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #cbd5e0;
    border-radius: 4px;
    background: white;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.epofw-checkbox:checked + .epofw-checkbox-custom {
    background: #667eea;
    border-color: #667eea;
}

.epofw-checkbox:checked + .epofw-checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.epofw-help-text {
    margin: 0 0 1rem 0;
    font-size: 0.75rem;
    color: #718096;
    font-style: italic;
}

/* Field Type Selection */
.epofw-field-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.epofw-field-type-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.epofw-field-type-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.epofw-field-type-card:hover {
    border-color: #667eea;
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
}

.epofw-field-type-card:hover::before {
    opacity: 1;
}

.epofw-field-type-card.selected {
    border-color: #667eea;
    background: #f7fafc;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.1);
}

.epofw-field-type-card.selected::before {
    opacity: 1;
}

.epofw-field-type-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    transition: all 0.3s ease;
}

.epofw-field-type-card:hover .epofw-field-type-icon {
    transform: scale(1.1);
}

.epofw-field-type-card h5 {
    margin: 0 0 0.5rem 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a202c;
}

.epofw-field-type-card p {
    margin: 0 0 1rem 0;
    font-size: 0.875rem;
    color: #718096;
    line-height: 1.5;
}

.epofw-field-type-features {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.epofw-feature-tag {
    background: #e2e8f0;
    color: #4a5568;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
}

.epofw-field-type-selection {
    background: white;
    border: 2px solid #667eea;
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.epofw-selected-type h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a202c;
}

.epofw-selected-type h4 span {
    color: #667eea;
    font-weight: 700;
}

.epofw-selected-type p {
    margin: 0 0 1rem 0;
    color: #718096;
    font-size: 0.875rem;
}

.epofw-change-type {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

/* Options Management */
.epofw-option-item {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.epofw-option-item:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.epofw-option-item .epofw-form-row {
    margin-bottom: 0;
}

.epofw-remove-option {
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.epofw-remove-option:hover {
    background: #dc2626;
    color: white;
    transform: scale(1.05);
}

/* Conditional Logic */
.epofw-conditional-rule {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 0.75rem;
    align-items: end;
    margin-bottom: 1rem;
}

.epofw-remove-condition {
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.epofw-remove-condition:hover {
    background: #dc2626;
    color: white;
}

/* Product Rules */
.epofw-rules-container {
    margin-bottom: 1rem;
}

.epofw-rule-item {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 0.75rem;
    align-items: end;
    margin-bottom: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.epofw-rule-item:hover {
    border-color: #667eea;
    background: #f7fafc;
}

.epofw-remove-rule {
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.epofw-remove-rule:hover {
    background: #dc2626;
    color: white;
}

.epofw-rule-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.epofw-rule-actions .epofw-btn {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

/* Modern Button Styles */
.epofw-btn {
    padding: var(--epofw-space-md) var(--epofw-space-xl);
    border-radius: var(--epofw-radius-lg);
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all var(--epofw-transition-base);
    display: inline-flex;
    align-items: center;
    gap: var(--epofw-space-sm);
    font-size: 0.875rem;
    font-family: var(--epofw-font-sans);
    position: relative;
    overflow: hidden;
    min-height: 44px;
    box-shadow: var(--epofw-shadow-sm);
}

.epofw-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left var(--epofw-transition-slow);
}

.epofw-btn:hover::before {
    left: 100%;
}

.epofw-btn-primary {
    background: linear-gradient(135deg, var(--epofw-primary), var(--epofw-primary-light));
    box-shadow: var(--epofw-shadow-md);
}

.epofw-btn-primary:hover {
    background: linear-gradient(135deg, var(--epofw-primary-dark), var(--epofw-primary));
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--epofw-shadow-xl);
    color: #ffffff;
}

.epofw-btn-primary:active {
    transform: translateY(0) scale(0.98);
}

.epofw-btn-secondary {
    background: var(--epofw-white);
    color: var(--epofw-gray-700);
    border: 2px solid var(--epofw-gray-200);
    box-shadow: var(--epofw-shadow-sm);
}

.epofw-btn-secondary:hover {
    background: var(--epofw-gray-50);
    border-color: var(--epofw-gray-300);
    transform: translateY(-2px);
    box-shadow: var(--epofw-shadow-md);
}

.epofw-btn-secondary:active {
    transform: translateY(0);
}

.epofw-btn-danger {
    background: linear-gradient(135deg, var(--epofw-error), #dc2626);
    color: var(--epofw-white);
    box-shadow: var(--epofw-shadow-md);
}

.epofw-btn-danger:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--epofw-shadow-xl);
}

.epofw-btn-danger:active {
    transform: translateY(0) scale(0.98);
}

/* Special styling for modal action buttons */
.epofw-save-changes,
.epofw-cancel-btn {
    padding: var(--epofw-space-md) var(--epofw-space-2xl);
    font-weight: 600;
    letter-spacing: -0.01em;
    min-width: 120px;
    justify-content: center;
}

.epofw-save-changes {
    background: linear-gradient(135deg, var(--epofw-success), #059669);
}

.epofw-save-changes:hover {
    background: linear-gradient(135deg, #059669, #047857);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

/* Responsive Design for Settings Modal */
@media (max-width: 768px) {
    .epofw-settings-modal {
        width: 95% !important;
        max-height: 95vh !important;
    }
    
    .epofw-settings-tabs {
        padding-bottom: 4px;
    }

    .epofw-tab-btn {
        font-size: 0.75rem;
        padding: 0.5rem 0.75rem;
    }

    .epofw-form-row {
        grid-template-columns: 1fr;
    }

    .epofw-conditional-rule {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    /* Product Rules - stack vertically on mobile */
    .epofw-rule-item {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .epofw-rule-item > div,
    .epofw-rule-item > select,
    .epofw-rule-item > input {
        width: 100%;
    }

    /* Ensure Select2 dropdowns are fully visible */
    .epofw-rules-container {
        overflow: visible;
    }

    .epofw-rule-item .select2-container {
        width: 100% !important;
    }

    .epofw-settings-section {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .epofw-settings-tabs {
        padding-bottom: 4px;
    }

    .epofw-tab-btn {
        font-size: 0.7rem;
        padding: 0.5rem;
    }

    .epofw-tab-btn span {
        display: none;
    }

    .epofw-tab-btn i {
        font-size: 1.25rem;
    }

    .epofw-field-type-grid {
        grid-template-columns: 1fr;
    }

    .epofw-field-type-card {
        padding: 1rem;
    }

    .epofw-field-type-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }

    /* Hide PRO badge text on very small screens */
    .epofw-pro-badge-small {
        font-size: 7px;
        padding: 2px 4px;
        margin-left: 4px;
    }
}

/* Responsive tabs with PRO badge */
@media (max-width: 1400px) {
    .epofw-tab-btn {
        padding: 0.5rem 0.6rem;
        font-size: 0.75rem;
        gap: 0.3rem;
    }

    .epofw-tab-btn i {
        font-size: 0.85rem;
    }

    .epofw-pro-badge-small {
        font-size: 7px;
        padding: 2px 4px;
        margin-left: 4px;
    }
}

@media (max-width: 1200px) {
    .epofw-tab-btn {
        padding: 0.5rem 0.5rem;
        font-size: 0.7rem;
    }

    .epofw-pro-badge-small {
        font-size: 6px;
        padding: 1px 3px;
        margin-left: 3px;
    }
}

@media (max-width: 992px) {
    .epofw-settings-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 6px;
    }

    .epofw-tab-btn {
        flex-shrink: 0;
    }
}

/* Table View Styles */
.epofw-addons-table {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
}

.epofw-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.epofw-table th {
    background: #f8fafc;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #4a5568;
    border-bottom: 2px solid #e2e8f0;
    position: relative;
}

.epofw-table th.epofw-sortable {
    cursor: pointer;
    user-select: none;
}

.epofw-table th.epofw-sortable:hover {
    background: #edf2f7;
}

.epofw-table th.epofw-sortable i {
    margin-left: 0.5rem;
    font-size: 0.75rem;
    opacity: 0.5;
}

.epofw-table th.epofw-checkbox-column {
    width: 50px;
    text-align: center;
}

.epofw-table th.epofw-actions-column {
    width: 120px;
    text-align: center;
}

.epofw-table td {
    padding: 1rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: top;
}

.epofw-table tbody tr:hover {
    background: #f8fafc;
}

.epofw-table tbody tr:last-child td {
    border-bottom: none;
}

.epofw-field-title-cell strong {
    display: block;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 0.25rem;
}

.epofw-field-description {
    margin: 0;
    font-size: 0.75rem;
    color: #718096;
    line-height: 1.4;
}

.epofw-field-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    background: #f7fafc;
    color: #4a5568;
    border: 1px solid #e2e8f0;
}

.epofw-field-type-badge i {
    font-size: 0.875rem;
    color: #667eea;
}

.epofw-status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.epofw-status-badge.active {
    background: #d1fae5;
    color: #059669;
}

.epofw-status-badge.inactive {
    background: #fee2e2;
    color: #dc2626;
}

.epofw-required-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    background: #fef3c7;
    color: #d97706;
}

.epofw-required-badge.optional {
    background: #e0e7ff;
    color: #3730a3;
}

.epofw-required-badge i {
    font-size: 0.75rem;
}

.epofw-required {
    color: #dc2626;
    font-weight: 600;
    margin-left: 2px;
}

.epofw-required-note {
    color: #dc2626;
    font-size: 0.8125rem;
    font-weight: 500;
}

/* Onboarding hint for field settings */
.epofw-onboarding-hint {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: linear-gradient(135deg, #eff6ff 0%, #e0f2fe 100%);
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border-left: 4px solid #0273ab;
}

.epofw-onboarding-icon {
    flex-shrink: 0;
    color: #3b82f6;
    font-size: 1.25rem;
    line-height: 1;
}

.epofw-onboarding-icon .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.epofw-onboarding-text {
    color: #0273ab;
    font-size: 0.875rem;
    line-height: 1.5;
}

.epofw-onboarding-hint-content {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    flex: 1;
}

/* Tutorial Buttons Styles */
.epofw-tutorial-buttons {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
    align-items: center;
}

a.epofw-tutorial-btn,
.epofw-tutorial-buttons a.epofw-tutorial-btn,
.epofw-onboarding-hint a.epofw-tutorial-btn {
    display: inline-flex !important;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.875rem;
    border-radius: 6px;
    text-decoration: none !important;
    font-size: 0.8125rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    line-height: 1;
    cursor: pointer;
}

a.epofw-tutorial-btn .dashicons,
.epofw-tutorial-buttons a.epofw-tutorial-btn .dashicons,
.epofw-onboarding-hint a.epofw-tutorial-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 1;
    color: inherit;
}

a.epofw-tutorial-btn.epofw-tutorial-btn-video,
.epofw-tutorial-buttons a.epofw-tutorial-btn-video,
.epofw-onboarding-hint a.epofw-tutorial-btn-video {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
    color: #fff !important;
    border-color: #b91c1c !important;
}

a.epofw-tutorial-btn.epofw-tutorial-btn-video:hover,
.epofw-tutorial-buttons a.epofw-tutorial-btn-video:hover,
.epofw-onboarding-hint a.epofw-tutorial-btn-video:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%) !important;
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(185, 28, 28, 0.3);
}

a.epofw-tutorial-btn.epofw-tutorial-btn-doc,
.epofw-tutorial-buttons a.epofw-tutorial-btn-doc,
.epofw-onboarding-hint a.epofw-tutorial-btn-doc {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
    color: #fff !important;
    border-color: #1d4ed8 !important;
}

a.epofw-tutorial-btn.epofw-tutorial-btn-doc:hover,
.epofw-tutorial-buttons a.epofw-tutorial-btn-doc:hover,
.epofw-onboarding-hint a.epofw-tutorial-btn-doc:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%) !important;
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.3);
}

/* Small size buttons */
.epofw-tutorial-btn-small a.epofw-tutorial-btn {
    padding: 0.4rem 0.7rem;
    font-size: 0.75rem;
}

.epofw-tutorial-btn-small a.epofw-tutorial-btn .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

/* Medium size buttons */
.epofw-tutorial-btn-medium a.epofw-tutorial-btn {
    padding: 0.5rem 0.875rem;
    font-size: 0.8125rem;
}

/* Large size buttons */
.epofw-tutorial-btn-large a.epofw-tutorial-btn {
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
}

.epofw-tutorial-btn-large a.epofw-tutorial-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* Onboarding hint with tutorial buttons alignment */
.epofw-onboarding-hint .epofw-tutorial-buttons {
    flex-shrink: 0;
    align-self: center;
}

.epofw-usage-count {
    font-size: 0.875rem;
    color: #4a5568;
    font-weight: 500;
}

.epofw-last-modified {
    font-size: 0.875rem;
    color: #718096;
}

.epofw-table-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.epofw-table-actions .epofw-action-btn {
    width: 32px;
    height: 32px;
    font-size: 0.75rem;
}

/* Responsive Table */
@media (max-width: 768px) {
    .epofw-table {
        font-size: 0.75rem;
    }
    
    .epofw-table th,
    .epofw-table td {
        padding: 0.75rem 0.5rem;
    }
    
    .epofw-table th.epofw-actions-column {
        width: 100px;
    }
    
    .epofw-table-actions {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .epofw-table-actions .epofw-action-btn {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }
}

.epofw-addons-header-content h2.epofw-addons-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.epofw-addons-header-content h2.epofw-addons-title i {
    font-size: 1.5rem;
    opacity: 0.9;
}

.epofw-addons-subtitle {
    margin: 0;
    opacity: 0.9;
    font-size: 1rem;
    font-weight: 400;
}

.epofw-addons-header-actions {
    display: flex;
    gap: 1rem;
}

.epofw-addons-header-actions .button {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.epofw-addons-header-actions .button-primary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.epofw-addons-header-actions .button-primary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.epofw-addons-header-actions .button:not(.button-primary) {
    background: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.epofw-addons-header-actions .button:not(.button-primary):hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* Statistics Cards */
.epofw-addons-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.epofw-stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e1e5e9;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.epofw-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.epofw-stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
}

.epofw-stat-content {
    flex: 1;
}

.epofw-stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.epofw-stat-label {
    font-size: 0.875rem;
    color: #2271b1;
    font-weight: 500;
}

/* Search and Filter Section */
.epofw-addons-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e1e5e9;
    margin-bottom: 2rem;
    gap: 1rem;
}

.epofw-search-box {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.epofw-search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background: #ffffff;
}

.epofw-search-input:focus {
    outline: none;
    border-color: #0073aa;
    background: white;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

/* Search icon styles - see premium CSS */

.epofw-filter-controls {
    display: flex;
    gap: 1rem;
}

.epofw-filter-select {
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.9rem;
    background: white;
    color: #374151;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
}

.epofw-filter-select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

/* Addons Grid */
.epofw-addons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.epofw-addon-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e1e5e9;
    transition: all 0.3s ease;
    overflow: hidden;
}

.epofw-addon-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.epofw-addon-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: #f8fafc;
    border-bottom: 1px solid #e1e5e9;
}

.epofw-addon-type {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
}

.epofw-addon-type i {
    font-size: 1rem;
    color: #0073aa;
}

.epofw-addon-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
}

.epofw-addon-status.active {
    color: #059669;
}

.epofw-addon-status.inactive {
    color: #dc2626;
}

.epofw-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.epofw-addon-status.active .epofw-status-dot {
    background: #059669;
}

.epofw-addon-status.inactive .epofw-status-dot {
    background: #dc2626;
}

.epofw-addon-card-content {
    padding: 1.5rem;
}

.epofw-addon-title {
    margin: 0 0 0.75rem 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.4;
}

.epofw-addon-description {
    margin: 0 0 1rem 0;
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.5;
}

.epofw-addon-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.epofw-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: #9ca3af;
}

.epofw-meta-item i {
    font-size: 0.875rem;
}

/* Used in meta item links */
.epofw-used-in-meta {
    flex-wrap: wrap;
}

.epofw-used-in-meta span {
    line-height: 1.5;
}

.epofw-item-link {
    color: #0073aa;
    text-decoration: none;
    transition: color 0.2s ease;
}

.epofw-item-link:hover {
    color: #005a87;
    text-decoration: underline;
}

.epofw-view-more-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    margin-left: 4px;
}

.epofw-view-more-link:hover {
    text-decoration: underline;
}

.epofw-view-more-link.expanded {
    display: none;
}

.epofw-hidden-items {
    display: none;
}

.epofw-addon-card-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: #f8fafc;
    border-top: 1px solid #e1e5e9;
}

/* Action button styles moved to unified section below */

/* Empty State */
.epofw-addons-empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e1e5e9;
}

.epofw-empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
}

.epofw-addons-empty-state h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
}

.epofw-addons-empty-state p {
    margin: 0 0 2rem 0;
    color: #6b7280;
    font-size: 0.875rem;
}

.epofw-create-first-addon {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.epofw-create-first-addon:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 115, 170, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .epofw-addons-header {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
    
    .epofw-addons-header-actions {
        width: 100%;
        justify-content: center;
    }
    
    .epofw-addons-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .epofw-search-box {
        max-width: none;
    }
    
    .epofw-filter-controls {
        justify-content: center;
    }
    
    .epofw-addons-grid {
        grid-template-columns: 1fr;
    }
    
    .epofw-addons-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .epofw-addons-stats {
        grid-template-columns: 1fr;
    }
    
    .epofw-filter-controls {
        flex-direction: column;
    }
    
    .epofw-addon-card-actions {
        justify-content: center;
    }
}

/* Animation Classes */
.epofw-fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.epofw-slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(-20px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Loading States */
.epofw-loading {
    opacity: 0.6;
    pointer-events: none;
}

.epofw-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Element Selector Modal */
.epofw-element-selector-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
    display: none;
}

.epofw-element-selector-modal .epofw-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
}

.epofw-element-selector-modal .epofw-modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 900px;
    max-height: 70vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.epofw-element-selector-modal .epofw-modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.epofw-element-selector-modal .epofw-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.epofw-element-selector-modal .epofw-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.epofw-element-selector-modal .epofw-modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

.epofw-element-selector-modal .epofw-modal-body {
    padding: 25px;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
}

/* Field Type Grid */
.epofw-field-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 10px;
}

.epofw-field-type-card {
    background: #fff;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.epofw-field-type-card:hover {
    border-color: #0073aa;
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.15);
    transform: translateY(-2px);
}

.epofw-field-type-card.selected {
    border-color: #0073aa;
    background: #f8fbff;
}

/* Pro Badge for Premium Fields */
.epofw-pro-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
    z-index: 1;
}

.epofw-field-type-card.epofw-premium-field {
    opacity: 0.85;
}

.epofw-field-type-card.epofw-premium-field:hover {
    opacity: 1;
}

/* Premium Upgrade Popup */
.epofw-premium-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    animation: epofw-fadeIn 0.2s ease;
}

@keyframes epofw-fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.epofw-premium-popup {
    background: #fff;
    border-radius: 12px;
    padding: 32px 40px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: epofw-slideUp 0.3s ease;
}

@keyframes epofw-slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.epofw-premium-popup-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.epofw-premium-popup-icon .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
    color: #fff;
}

.epofw-premium-popup-title {
    margin: 0 0 12px;
    font-size: 22px;
    font-weight: 600;
    color: #1a202c;
}

.epofw-premium-popup-message {
    margin: 0 0 24px;
    font-size: 15px;
    color: #64748b;
    line-height: 1.6;
}

.epofw-premium-popup-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.epofw-premium-popup-buttons .epofw-btn {
    padding: 0px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.epofw-premium-popup-buttons .epofw-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
}

.epofw-premium-popup-buttons .epofw-btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd6 0%, #6a4190 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.epofw-premium-popup-buttons .epofw-btn-secondary {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.epofw-premium-popup-buttons .epofw-btn-secondary:hover {
    background: #e2e8f0;
}

/* Discount offer in premium popup */
.epofw-premium-popup-discount {
    margin-top: 16px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #f59e0b;
    border-radius: 6px;
    color: #92400e;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.epofw-premium-popup-discount .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: #d97706;
}

.epofw-field-type-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #0073aa, #005a87);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.epofw-field-type-icon i {
    font-size: 20px;
    color: #fff;
}

.epofw-field-type-content h5 {
    margin: 0 0 6px 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.epofw-field-type-content p {
    margin: 0 0 10px 0;
    font-size: 12px;
    color: #666;
    line-height: 1.3;
}

.epofw-field-type-features {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.epofw-feature-tag {
    background: #e8f4fd;
    color: #0073aa;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsive for Element Selector */
@media (max-width: 768px) {
    .epofw-field-type-grid {
        grid-template-columns: 1fr;
    }
    
    .epofw-element-selector-modal .epofw-modal-content {
        width: 95%;
        max-width: none;
    }
}

/* Form Builder Elements */
.epofw-element {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    margin-bottom: 6px;
    transition: all 0.3s ease;
    position: relative;
}

.epofw-element:hover {
    border-color: #0073aa;
    box-shadow: 0 2px 6px rgba(0, 115, 170, 0.1);
}

.epofw-element-drag {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    cursor: move;
    padding: 6px;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 16px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
}

.epofw-element-drag:hover {
    background: #f0f0f0;
    color: #666;
}

.epofw-element-content {
    display: flex;
    align-items: center;
    padding: 12px 16px 12px 52px;
    gap: 16px;
    min-height: 52px;
    position: relative;
    width: 100%;
}

.epofw-element-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #0073aa, #005a87);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 115, 170, 0.2);
}

.epofw-element-icon i {
    font-size: 12px;
    color: #fff;
    line-height: revert;
}

.epofw-element-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4px 0;
}

.epofw-element-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    line-height: 1.2;
}

.epofw-element-subtitle {
    font-size: 12px;
    color: #666;
    line-height: 1.3;
    font-weight: 400;
}

.epofw-element-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-left: auto;
    flex-shrink: 0;
    min-width: 80px;
    justify-content: flex-end;
}

.epofw-element-actions button {
    width: 28px;
    height: 28px;
    border: none;
    background: #f8f9fa;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 14px;
    color: #666;
    flex-shrink: 0;
}

.epofw-element-actions button:hover {
    background: #e9ecef;
    color: #333;
}

.epofw-element-actions .epofw-edit-element,
.epofw-element-actions .epofw-element-edit {
    color: #0073aa;
}

.epofw-element-actions .epofw-edit-element:hover,
.epofw-element-actions .epofw-element-edit:hover {
    background: #e3f2fd;
    color: #005a87;
}

.epofw-element-actions .epofw-element-delete,
.epofw-row-actions .epofw-row-delete {
    color: #dc3545;
}

.epofw-element-actions .epofw-element-delete:hover,
.epofw-row-actions .epofw-row-delete:hover {
    background: #f8d7da;
    color: #721c24;
}

/* Ensure proper icon alignment within buttons */
.epofw-element-actions button i,
.epofw-element-actions button .dashicons {
    font-size: 14px !important;
    width: 14px !important;
    height: 14px !important;
    line-height: 1 !important;
    display: block !important;
}

/* Improve button spacing and alignment */
.epofw-element-actions .epofw-edit-element,
.epofw-element-actions .epofw-element-edit {
    margin-right: 4px;
}

.epofw-element-actions .epofw-element-delete,
.epofw-row-actions .epofw-row-delete {
    margin-left: 4px;
}

/* Force proper right-side spacing for all action containers */
.epofw-element-actions,
.epofw-section-actions {
    position: relative !important;
    margin-right: 0 !important;
}

/* Remove conflicting pseudo-elements */

/* Ensure proper vertical alignment of action buttons with element content */
.epofw-element-actions {
    align-self: center;
    height: 100%;
    display: flex;
    align-items: center;
}

/* Improve the visual flow and sequence of elements */
.epofw-element {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: visible;
}

/* Ensure elements have proper right padding */
.epofw-element {
    padding-right: 16px !important;
}

/* Force right-side spacing for element content */
.epofw-element-content {
    /*! padding-right: 24px !important; */
}

/* Force right margin for action buttons */
.epofw-element-actions button:last-child,
.epofw-section-actions button:last-child,
.epofw-row-actions button:last-child {
    margin-right: 16px !important;
}

/* Additional right-side spacing for delete buttons */
.epofw-element-actions .epofw-element-delete,
.epofw-section-actions .epofw-section-delete,
.epofw-row-actions .epofw-row-delete {
    margin-right: 20px !important;
}

/* Force minimum right-side space for all containers */
/* .epofw-element,
.epofw-section {
    margin-right: 8px !important;
    padding-right: 20px !important;
} */

/* Main Add Element Button - Enhanced styling */
.epofw-add-element {
    background: #0073aa !important;
    color: #fff !important;
    border: 2px solid #0073aa !important;
    padding: 10px 20px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 4px rgba(0, 115, 170, 0.2) !important;
}

.epofw-add-element:hover {
    background: #005a87 !important;
    border-color: #005a87 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(0, 115, 170, 0.3) !important;
}

.epofw-add-element i {
    margin-right: 8px !important;
    font-size: 16px !important;
}

/* Action Bar - Enhanced styling */
.epofw-builder-action-bar {
    background: #f8f9fa;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.epofw-action-left {
    display: flex;
    gap: 12px;
    align-items: center;
}

.epofw-action-right {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Enhanced section and element styling */
.epofw-section {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.epofw-section-content {
    padding: 20px;
}

.epofw-elements-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.epofw-element {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.epofw-element:hover {
    border-color: #0073aa;
    box-shadow: 0 2px 6px rgba(0, 115, 170, 0.1);
}

/* Element component styling */
.epofw-element-drag {
    color: #999;
    cursor: move;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-size: 14px;
}

.epofw-element-drag:hover {
    background: #e9ecef;
    color: #666;
}

.epofw-element-icon {
    width: 40px;
    height: 40px;
    background: #0073aa;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
}

.epofw-element-info {
    flex: 1;
    min-width: 0;
}

.epofw-element-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.epofw-element-subtitle {
    font-size: 12px;
    color: #666;
    text-transform: capitalize;
}

.epofw-element-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.epofw-element-actions button,
.epofw-row-actions button {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 14px;
}

.epofw-element-edit {
    background: #e3f2fd;
    color: #0073aa;
}

.epofw-element-edit:hover {
    background: #bbdefb;
}

.epofw-element-delete,
.epofw-row-delete {
    background: #ffebee;
    color: #d32f2f;
}

.epofw-element-delete:hover,
.epofw-row-delete:hover {
    background: #ffcdd2;
}

/* Section-specific Add Element Buttons - Clean icon style */
.epofw-add-element-btn:hover {
    border-color: #0073aa;
    background: #e3f2fd;
    color: #0073aa;
}

.epofw-add-element-btn {
    width: 40px;
    height: 40px;
    border: 2px dashed #ccc;
    background: #f8f9fa;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 16px;
    color: #666;
}

.epofw-add-element-btn i {
    font-size: 20px;
    font-weight: bold;
}

/* Enhanced positioning and spacing for section-specific buttons */
.epofw-section-content {
    padding: 20px;
}

.epofw-elements-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Add Element button always at the bottom with consistent spacing */
.epofw-element-add {
    order: 999; /* Ensures it stays at the bottom */
}

/* Ensure proper spacing between elements */
.epofw-element {
    margin-bottom: 0;
}

/* Empty section styling */
.epofw-elements-container:empty + .epofw-element-add {
    margin-top: 0;
}

/* Responsive design for add buttons */
@media (max-width: 768px) {
    .epofw-element-add {
        width: 40px;
        height: 40px;
        margin: 12px 0;
    }
    
    .epofw-add-element-btn i {
        font-size: 18px;
    }
}

/* Individual element add buttons restored with enhanced styling */

/* Enhanced Section Styling */
.epofw-section-header {
    /* background: #f8f9fa; */
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #e5e5e5;
    position: relative;
}

.epofw-section-drag {
    color: #999;
    cursor: move;
    padding: 6px;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-size: 14px;
}

.epofw-section-drag:hover {
    background: #e9ecef;
    color: #666;
}

/* Section and Field Status Toggles */
.epofw-section-status-toggle,
.epofw-field-status-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.epofw-section-status-toggle input[type="checkbox"],
.epofw-field-status-toggle input[type="checkbox"] {
    display: none;
}

.epofw-section-status-toggle .epofw-toggle-switch,
.epofw-field-status-toggle .epofw-toggle-switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
    background-color: #cbd5e1;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.epofw-section-status-toggle .epofw-toggle-switch::after,
.epofw-field-status-toggle .epofw-toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background-color: #fff;
    border-radius: 50%;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.epofw-section-status-toggle input[type="checkbox"]:checked + .epofw-toggle-switch,
.epofw-field-status-toggle input[type="checkbox"]:checked + .epofw-toggle-switch {
    background-color: #22c55e;
}

.epofw-section-status-toggle input[type="checkbox"]:checked + .epofw-toggle-switch::after,
.epofw-field-status-toggle input[type="checkbox"]:checked + .epofw-toggle-switch::after {
    transform: translateX(16px);
}

.epofw-section-status-toggle .epofw-toggle-switch:hover,
.epofw-field-status-toggle .epofw-toggle-switch:hover {
    background-color: #94a3b8;
}

.epofw-section-status-toggle input[type="checkbox"]:checked + .epofw-toggle-switch:hover,
.epofw-field-status-toggle input[type="checkbox"]:checked + .epofw-toggle-switch:hover {
    background-color: #16a34a;
}

.epofw-section-title {
    flex: 1;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: 16px;
}

.epofw-section-title i {
    font-size: 14px;
    color: #666;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.epofw-section-title i:hover {
    color: #2271b1;
}

/* Section Accordion Collapsed State */
.epofw-section.epofw-section-collapsed .epofw-section-content {
    display: none;
}

.epofw-section.epofw-section-collapsed .epofw-section-title i {
    transform: rotate(180deg);
}

/* .epofw-section-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
} */

.epofw-section-actions button:not(.epofw-btn-toolbar) {
    width: 32px;
    height: 32px;
    border: none;
    background: #f8f9fa;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: #666;
    flex-shrink: 0;
}

.epofw-section-actions button:hover {
    background: #e9ecef;
    color: #333;
}

.epofw-section-actions .epofw-section-delete {
    color: #dc3545;
}

.epofw-section-actions .epofw-section-delete:hover {
    background: #f8d7da;
    color: #721c24;
}

/* Addon Builder Layout */
.epofw-addon-builder-container {
    max-width: 100%;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    background: #f8fafc;
    min-height: 100vh;
    padding: 20px;
}

.epofw-builder-header {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.epofw-builder-title {
    flex: 1;
}

.epofw-title-input {
    width: 100%;
    max-width: 400px;
    padding: 12px 16px;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    background: #fff;
    transition: all 0.3s ease;
}

.epofw-title-input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.epofw-builder-actions {
    display: flex;
    gap: 8px;
}

.epofw-builder-action-bar {
    background: #fff;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.epofw-action-left {
    display: flex;
    gap: 12px;
    align-items: center;
}

.epofw-action-right {
    display: flex;
    gap: 12px;
    align-items: center;
}

.epofw-builder-actions .epofw-btn {
    padding: 8px 12px;
    min-height: 36px;
    font-size: 0.8rem;
}

.epofw-builder-canvas {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    min-height: 400px;
}

/* Empty State */
.epofw-empty-builder {
    text-align: center;
    padding: 80px 20px;
    color: #666;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.epofw-empty-icon {
    font-size: 64px;
    color: #0073aa;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #0073aa, #005a87);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.epofw-empty-builder h3 {
    margin: 0 0 12px 0;
    font-size: 24px;
    color: #333;
    font-weight: 600;
}

.epofw-empty-builder p {
    margin: 0 0 32px 0;
    font-size: 16px;
    color: #666;
    max-width: 400px;
    line-height: 1.5;
}

.epofw-empty-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 10;
}

/* Add Area */
.epofw-add-area {
    text-align: center;
    padding: 20px;
}

.epofw-add-section-btn {
    width: 40px;
    height: 40px;
    border: 2px dashed #ccc;
    background: #f8f9fa;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 16px;
    color: #666;
}

.epofw-add-section-btn:hover {
    border-color: #0073aa;
    background: #e3f2fd;
    color: #0073aa;
}

/* Builder Footer Bar - Save Button */
.epofw-builder-footer-bar {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-top: 1px solid #e2e8f0;
    padding: 1rem 1.5rem;
    margin-top: 1.5rem;
    border-radius: 0 0 12px 12px;
}

.epofw-footer-bar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.epofw-footer-bar-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #64748b;
    font-size: 0.875rem;
}

.epofw-footer-bar-info .dashicons {
    font-size: 1rem;
    width: 1rem;
    height: 1rem;
}

.epofw-btn-lg {
    padding: 0.75rem 2rem !important;
    font-size: 0.9375rem !important;
    font-weight: 600 !important;
}

.epofw-save-addon.epofw-btn-lg {
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    box-shadow: 0 2px 8px rgba(0, 115, 170, 0.3);
    transition: all 0.2s ease;
}

.epofw-save-addon.epofw-btn-lg:hover {
    background: linear-gradient(135deg, #005a87 0%, #004466 100%);
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.4);
    transform: translateY(-1px);
}

@media (max-width: 600px) {
    .epofw-footer-bar-content {
        flex-direction: column;
        text-align: center;
    }

    .epofw-footer-bar-info {
        order: 2;
    }

    .epofw-save-addon.epofw-btn-lg {
        width: 100%;
        order: 1;
    }
}

/* Element Settings Modal */
.epofw-element-modal,
.epofw-section-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
    display: none;
    pointer-events: none;
}

.epofw-element-modal.show,
.epofw-section-modal.show {
    display: block;
    pointer-events: auto;
}

.epofw-element-modal[style*="display: block"],
.epofw-section-modal[style*="display: block"] {
    pointer-events: auto;
}

.epofw-element-modal .epofw-modal-overlay,
.epofw-section-modal .epofw-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
}

.epofw-element-modal .epofw-modal-content,
.epofw-section-modal .epofw-modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    width: calc(100vw - 160px);
    max-width: 1400px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    z-index: 1000000;
    contain: layout style paint;
    pointer-events: auto;
    isolation: isolate;
    margin-left: 80px;
}

.epofw-element-modal .epofw-modal-header,
.epofw-section-modal .epofw-modal-header {
    padding: 25px 40px;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    background: #fff;
    border-radius: 8px 8px 0 0;
    position: relative;
    z-index: 10;
}

.epofw-element-modal .epofw-modal-header h3,
.epofw-section-modal .epofw-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.epofw-element-modal .epofw-modal-close,
.epofw-section-modal .epofw-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.epofw-element-modal .epofw-modal-close:hover,
.epofw-section-modal .epofw-modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

.epofw-element-modal .epofw-modal-body,
.epofw-section-modal .epofw-modal-body {
    padding: 40px;
    flex: 1;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    min-height: 0;
    max-height: calc(90vh - 140px);
    position: relative;
    /* Ensure this is the only scrollable container */
    height: 100% !important;
}

/* Settings Tabs */
.epofw-settings-tabs {
    display: flex;
    border-bottom: 1px solid #e5e5e5;
    margin-bottom: 20px;
    overflow-x: auto;
    gap: 0;
    scrollbar-width: thin;
}

.epofw-tab-btn {
    padding: 12px 16px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #666;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    flex-shrink: 0;
}

.epofw-tab-btn:hover {
    color: #333;
    background: #f8f9fa;
}

.epofw-tab-btn.active {
    color: #0073aa;
    border-bottom-color: #0073aa;
}

.epofw-element-modal .epofw-tab-content,
.epofw-section-modal .epofw-tab-content {
    display: none;
}

.epofw-element-modal .epofw-tab-content.active,
.epofw-section-modal .epofw-tab-content.active {
    display: block;
}

/* Form Fields */
.epofw-form-group {
    margin-bottom: 20px;
}

.epofw-form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.epofw-form-group input[type="text"],
.epofw-form-group input[type="number"],
.epofw-form-group select,
.epofw-form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.epofw-form-group input[type="text"]:focus,
.epofw-form-group input[type="number"]:focus,
.epofw-form-group select:focus,
.epofw-form-group textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

.epofw-form-group textarea {
    min-height: 80px;
    resize: vertical;
}

.epofw-checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.epofw-checkbox-group input[type="checkbox"] {
    margin: 0;
}

.epofw-checkbox-group label {
    margin: 0;
    font-weight: normal;
    cursor: pointer;
}

/* Form Elements in Modal */
.epofw-form-row {
    margin-bottom: 20px;
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.epofw-form-row .epofw-form-group {
    flex: 1;
    margin-bottom: 16px;
    min-width: 250px;
}

/* Ensure horizontal layout works properly - BUT EXCLUDE full-width */
.epofw-tab-content .epofw-form-group:not(.epofw-full-width) {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 25px;
    margin-bottom: 18px;
    width: 100% !important;
}

/* IMPORTANT: Explicitly override for full-width with higher specificity */
.epofw-tab-content .epofw-form-group.epofw-full-width {
    display: block;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-bottom: var(--epofw-space-lg);
}

/* Better spacing for form elements */
.epofw-tab-content {
    padding: 20px;
}

.epofw-tab-content .epofw-form-group {
    margin-bottom: 16px;
}

/* Input field appearance - now handled by consistent rules above */
.epofw-form-group .epofw-field-input input[type="text"],
.epofw-form-group .epofw-field-input input[type="number"],
.epofw-form-group .epofw-field-input select {
    /* Styling handled by consistent input rules above */
}

/* Focus states handled by consistent rules above */

/* Better select box styling */
.epofw-form-group .epofw-field-input select {
    appearance: none;
    -webkit-appearance: none;
    -moz-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='%23475569' stroke-width='2.5' 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 var(--epofw-space-lg) center;
    background-size: 20px;
    padding-right: 3.5rem;
    cursor: pointer;
    font-weight: 500;
}

.epofw-form-group .epofw-field-input select:hover {
    border-color: #0073aa;
}

.epofw-form-group .epofw-field-input select:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

.epofw-tab-content .epofw-form-group.epofw-full-width {
    display: block !important;
    width: 100% !important;
    flex-direction: column !important;
}

.epofw-form-group.epofw-full-width {
    display: block !important;
    flex: 1 1 100% !important;
    min-width: 100% !important;
    flex-direction: column !important;
}

/* Specific styling for options container within full-width groups */
.epofw-form-group.epofw-full-width .epofw-options-container {
    width: 100%;
    display: block;
}

/* Ensure options container content displays properly */
.epofw-form-group.epofw-full-width .epofw-option-row {
    display: grid !important;
    grid-template-columns: minmax(200px, 2fr) minmax(100px, 1fr) minmax(80px, 1fr) 60px !important;
    max-width: 100% !important;
    overflow: visible !important;
    box-sizing: border-box !important;
}

/* Prevent horizontal overflow in parent containers */
.epofw-form-group.epofw-full-width,
.epofw-tab-content,
.epofw-modal-body {
    overflow-x: hidden !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Remove any additional scrollbars */
.epofw-form-group,
.epofw-options-container,
.epofw-conditional-logic-container,
.epofw-apodp-logical-container {
    overflow: visible !important;
}

/* Strong override for full-width form groups */
.epofw-tab-content .epofw-form-group.epofw-full-width,
.epofw-form-group.epofw-full-width,
div.epofw-form-group.epofw-full-width {
    display: block !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0 !important;
    width: 100% !important;
    flex: none !important;
}

.epofw-tab-content .epofw-form-group.epofw-full-width > label,
.epofw-form-group.epofw-full-width > label {
    margin-bottom: var(--epofw-space-md) !important;
    display: block !important;
    width: 100% !important;
    flex: none !important;
}

/* Ensure options container itself is not affected by flex */
.epofw-form-group.epofw-full-width .epofw-options-container,
.epofw-tab-content .epofw-form-group.epofw-full-width .epofw-options-container {
    display: block !important;
    width: 100% !important;
    flex: none !important;
}

/* Horizontal Layout - Label on left, field on right */
.epofw-form-group {
    display: flex !important;
    align-items: flex-start !important;
    gap: 25px !important;
    margin-bottom: 20px !important;
    width: 100% !important;
    flex-direction: row !important;
}

/* Hide form groups when parent checkbox is checked */
.epofw-form-group[class*="hide_on_"][style*="display: none"] {
    display: none !important;
}

.epofw-form-group .epofw-field-label,
.epofw-form-group > label {
    flex: 0 0 200px !important;
    min-width: 200px !important;
    max-width: 280px !important;
    display: flex !important;
    flex-direction: column !important;
}

.epofw-form-group .epofw-field-label label,
.epofw-form-group > label {
    display: block !important;
    margin-bottom: var(--epofw-space-sm) !important;
    font-weight: 600 !important;
    /* color: var(--epofw-gray-900) !important; */
    font-size: 0.875rem !important;
    line-height: 1.4 !important;
    font-family: var(--epofw-font-sans) !important;
    user-select: text !important;
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
}

.epofw-form-group .epofw-field-label .epofw-field-description {
    display: block !important;
    margin-top: 2px !important;
    margin-left: 0 !important;
    font-size: 12px !important;
    color: #6c757d !important;
    font-weight: 400 !important;
    line-height: 1.4 !important;
    font-style: normal !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif !important;
    max-width: 280px !important;
    position: static !important;
    order: 2 !important;
}

.epofw-full-width .epofw-field-description  {
    max-width: 100% !important;
    width: 100% !important;
}

/* Ensure label text appears first, then description */
.epofw-form-group .epofw-field-label label {
    order: 1 !important;
}

.epofw-form-group .epofw-field-input,
.epofw-form-group > select,
.epofw-form-group > input,
.epofw-form-group > .toggle-switch {
    flex: 1 !important;
    min-width: 0 !important;
    display: flex !important;
    align-items: flex-start !important;
}

.epofw-form-group .epofw-field-input input,
.epofw-form-group .epofw-field-input select,
.epofw-form-group .epofw-field-input .epofw-form-control,
.epofw-form-group > select,
.epofw-form-group > input[type="text"],
.epofw-form-group > input[type="number"] {
    margin: 0 !important;
    font-size: 14px !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif !important;
    color: #333 !important;
    background: #ffffff !important;
    transition: border-color 0.2s ease !important;
    box-shadow: none !important;
}

.epofw-form-group .epofw-field-input select {
    line-height: normal !important;
}

/* Focus states for form inputs */
.epofw-form-group .epofw-field-input input:focus,
.epofw-form-group .epofw-field-input select:focus,
.epofw-form-group > select:focus,
.epofw-form-group > input[type="text"]:focus,
.epofw-form-group > input[type="number"]:focus {
    outline: none !important;
    border-color: var(--epofw-primary) !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1), var(--epofw-shadow-md) !important;
    transform: translateY(-1px) !important;
}

/* Hover states for form inputs */
.epofw-form-group .epofw-field-input input:hover,
.epofw-form-group .epofw-field-input select:hover,
.epofw-form-group > select:hover,
.epofw-form-group > input[type="text"]:hover,
.epofw-form-group > input[type="number"]:hover {
    border-color: var(--epofw-primary) !important;
}

/* Style select dropdowns consistently - FORCE DROPDOWN ARROWS */
.epofw-form-group .epofw-field-input select,
.epofw-form-group > select,
.epofw-tab-content select,
.epofw-modal-content select,
select.epofw-form-control,
select:not([class*="ui-datepicker-month"],[class*="ui-datepicker-year"]) {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-color: var(--epofw-white) !important;
    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='%23374151' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 16px center !important;
    background-size: 24px !important;
    padding-right: 50px !important;
    cursor: pointer !important;
}

/* Color picker specific styling */
.epofw-form-group .epofw-field-input input[type="color"],
.epofw-form-group > input[type="color"] {
    width: 60px !important;
    height: 40px !important;
    max-width: 60px !important;
    padding: 4px !important;
    border: 2px solid var(--epofw-gray-300) !important;
    border-radius: var(--epofw-radius-lg) !important;
    cursor: pointer !important;
    background: var(--epofw-white) !important;
    box-shadow: var(--epofw-shadow-sm) !important;
    transition: all var(--epofw-transition-base) !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

.epofw-form-group .epofw-field-input input[type="color"]:focus,
.epofw-form-group > input[type="color"]:focus {
    outline: none !important;
    border-color: var(--epofw-primary) !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1), var(--epofw-shadow-md) !important;
    transform: translateY(-1px) !important;
}

.epofw-form-group .epofw-field-input input[type="color"]:hover,
.epofw-form-group > input[type="color"]:hover {
    border-color: var(--epofw-primary) !important;
    transform: scale(1.02) !important;
}

/* WebKit specific color picker styling */
.epofw-form-group .epofw-field-input input[type="color"]::-webkit-color-swatch-wrapper,
.epofw-form-group > input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0 !important;
    border: none !important;
    border-radius: calc(var(--epofw-radius-lg) - 2px) !important;
}

.epofw-form-group .epofw-field-input input[type="color"]::-webkit-color-swatch,
.epofw-form-group > input[type="color"]::-webkit-color-swatch {
    border: none !important;
    border-radius: calc(var(--epofw-radius-lg) - 2px) !important;
}

/* Firefox specific color picker styling */
.epofw-form-group .epofw-field-input input[type="color"]::-moz-color-swatch,
.epofw-form-group > input[type="color"]::-moz-color-swatch {
    border: none !important;
    border-radius: calc(var(--epofw-radius-lg) - 2px) !important;
}

/* Modern Toggle Switch for Checkboxes */
.epofw-form-group .epofw-field-input input[type="checkbox"] {
    display: none;
}

.epofw-form-group .epofw-field-input .toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 32px;
    background: linear-gradient(135deg, var(--epofw-gray-300), var(--epofw-gray-400));
    border-radius: 16px;
    cursor: pointer;
    transition: all var(--epofw-transition-base);
    border: 2px solid var(--epofw-gray-300);
    margin: 0;
    flex-shrink: 0;
    box-shadow: var(--epofw-shadow-sm);
    overflow: hidden;
    vertical-align: middle;
    align-self: center;
}

/* Ensure toggle switch and its label work properly */
.epofw-form-group .epofw-field-input .toggle-switch,
.epofw-form-group .epofw-field-input input[type="checkbox"] {
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* Make required field labels clickable */
.epofw-form-group .epofw-field-input label[for*="required"],
.epofw-form-group .epofw-field-input label:contains("Required"),
.epofw-form-group label:contains("Required") {
    cursor: pointer !important;
    user-select: none !important;
    pointer-events: auto !important;
}

.epofw-form-group .epofw-field-input .toggle-switch::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    opacity: 0;
    transition: opacity var(--epofw-transition-base);
}

.epofw-form-group .epofw-field-input .toggle-switch:hover::before {
    opacity: 1;
}

.epofw-form-group .epofw-field-input .toggle-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, var(--epofw-white), var(--epofw-gray-50));
    border-radius: 50%;
    transition: all var(--epofw-transition-base);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15), 0 1px 3px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.epofw-form-group .epofw-field-input input[type="checkbox"]:checked + .toggle-switch {
    background: linear-gradient(135deg, var(--epofw-primary), var(--epofw-primary-light));
    border-color: var(--epofw-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1), var(--epofw-shadow-md);
}

.epofw-form-group .epofw-field-input input[type="checkbox"]:checked + .toggle-switch::after {
    transform: translateX(28px);
    background: linear-gradient(135deg, var(--epofw-white), var(--epofw-gray-50));
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2), 0 2px 4px rgba(0, 0, 0, 0.1);
}

.epofw-form-group .epofw-field-input .toggle-switch:hover {
    transform: scale(1.02);
    background: linear-gradient(135deg, var(--epofw-gray-400), var(--epofw-gray-500));
}

.epofw-form-group .epofw-field-input input[type="checkbox"]:checked + .toggle-switch:hover {
    background: linear-gradient(135deg, var(--epofw-primary-dark), var(--epofw-primary));
    transform: scale(1.02);
}

/* Better alignment for toggle switches */
.epofw-form-group .epofw-field-input {
    align-items: center;
}

.epofw-form-group .epofw-field-input .toggle-switch {
    margin-top: 0;
    align-self: center;
}

/* Toggle switch functionality - only for the switch itself */
.epofw-form-group .toggle-switch {
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* Hidden checkbox - only accessible via toggle switch */
.epofw-form-group input[type="checkbox"] {
    pointer-events: none !important;
    cursor: default !important;
}

/* Labels should not control checkboxes to prevent field visibility issues */
.epofw-form-group label {
    pointer-events: none !important;
    cursor: default !important;
    user-select: none !important;
}

/* Override: Allow labels inside .epofw-field-label to be selectable */
.epofw-form-group .epofw-field-label label,
.epofw-form-group > .epofw-field-label > label {
    pointer-events: auto !important;
    cursor: default !important;
    user-select: text !important;
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    -ms-touch-action: manipulation !important;
    touch-action: manipulation !important;
}

/* Only allow toggle switch interaction */
.epofw-form-group .epofw-field-input {
    pointer-events: auto !important;
}

/* Ensure toggle switch is fully functional */
.epofw-form-group .toggle-switch,
.epofw-form-group .toggle-switch * {
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* Prevent any label from controlling form fields */
.epofw-form-group label,
.epofw-form-group label * {
    pointer-events: none !important;
    cursor: default !important;
}

/* Allow form inputs to work normally */
.epofw-form-group input:not([type="checkbox"]),
.epofw-form-group select,
.epofw-form-group textarea {
    pointer-events: auto !important;
    cursor: text !important;
}

/* Field Description Styling */
.epofw-field-description {
    display: block;
    margin-top: 8px;
    margin-bottom: 0;
    margin-left: 0;
    font-size: 0.875rem;
    color: #6c757d;
    font-weight: 400;
    line-height: 1.4;
    font-style: normal;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

/* Full-width descriptions for epofw-full-width form groups */
.epofw-modal-content .epofw-field-description.epofw-field-description-full-width {
    max-width: 100% !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 16px 20px !important;
    background: #f8f9fa !important;
    border: 1px solid #e9ecef !important;
    border-radius: 6px !important;
    margin-top: 12px !important;
    margin-bottom: 16px !important;
    font-size: 0.9rem !important;
    line-height: 1.5 !important;
    color: #495057 !important;
    font-weight: 500 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    position: relative !important;
    transition: all 0.2s ease !important;
}

/* Hover effect for full-width descriptions */
.epofw-modal-content .epofw-field-description.epofw-field-description-full-width:hover {
    background: #ffffff !important;
    border-color: #0073aa !important;
    box-shadow: 0 2px 8px rgba(0, 115, 170, 0.15) !important;
    transform: translateY(-1px) !important;
}

/* Add a subtle left accent border */
.epofw-modal-content .epofw-field-description.epofw-field-description-full-width::before {
    content: '' !important;
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 4px !important;
    background: linear-gradient(135deg, #0073aa, #005a87) !important;
    border-radius: 6px 0 0 6px !important;
}

/* Field Description with Icon */
.epofw-field-description.with-icon {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 8px;
}

.epofw-field-description.with-icon::before {
    content: "ℹ";
    font-size: 14px;
    color: #0073aa;
    flex-shrink: 0;
    margin-top: 1px;
}

/* Field Description for Required Fields */
.epofw-form-group:has(.toggle-switch) .epofw-field-description {
    margin-top: 8px;
    color: #495057;
}

/* Field Description for Different Field Types */
.epofw-form-group:has(select) .epofw-field-description {
    color: #6c757d;
}

.epofw-form-group:has(input[type="text"]) .epofw-field-description {
    color: #6c757d;
}

.epofw-form-group:has(input[type="number"]) .epofw-field-description {
    color: #6c757d;
}

/* Hover effect for descriptions */
.epofw-field-description:hover {
    color: #495057;
}

/* Field Description in Modal Layout */
.epofw-modal-content .epofw-field-description {
    margin-left: 0 !important; /* Position below label */
    max-width: 200px !important; /* Match label width */
    margin-top: 8px !important;
    position: static !important;
}

/* Field Description in Tab Content */
.epofw-tab-content .epofw-field-description {
    margin-left: 0 !important; /* Position below label */
    max-width: 200px !important; /* Match label width */
    margin-top: 8px !important;
    position: static !important;
}

/* Responsive Field Descriptions */
@media (max-width: 768px) {
    .epofw-field-description {
        margin-left: 0 !important;
        margin-top: 8px !important;
        max-width: 100% !important;
    }
    
    .epofw-modal-content .epofw-field-description,
    .epofw-tab-content .epofw-field-description {
        margin-left: 0 !important;
        max-width: 100% !important;
    }
}

/* Force toggle switch alignment */
.epofw-tab-content .epofw-form-group .epofw-field-input {
    align-items: center !important;
}

.epofw-tab-content .epofw-form-group .epofw-field-input .toggle-switch {
    margin-top: 0 !important;
    align-self: center !important;
    vertical-align: middle !important;
}

/* Additional specific rules to ensure changes take effect */
.epofw-modal-content .epofw-form-group {
    gap: 40px !important;
}

.epofw-modal-content .epofw-form-group .epofw-field-label {
    flex: 0 0 280px !important;
    min-width: 280px !important;
    max-width: 280px !important;
}

.epofw-modal-content .epofw-form-group .epofw-field-input .toggle-switch {
    margin-top: 0 !important;
    align-self: center !important;
}

/* Force proper alignment for all form elements */
.epofw-modal-content .epofw-form-group .epofw-field-input {
    display: flex !important;
    align-items: center !important;
    min-height: 35px !important;
    flex: 1 !important;
    max-width: 350px !important;
}

/* Override any conflicting styles - Only for non-conditional logic tabs */
.epofw-tab-content:not([data-tab="conditional-logic"]) .epofw-form-group {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 40px;
    margin-bottom: 25px !important;
    width: 100%;
}

.epofw-tab-content:not([data-tab="conditional-logic"]) .epofw-form-group label {
    margin-bottom: 4px;
    font-weight: 600;
    color: #333;
    font-size: 13px;
}

/* Clean Field Options Styling - Simple and Professional */
.epofw-options-container {
    background: #ffffff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
    position: relative;
}

/* Remove decorative elements for clean design */

/* Clean Option Row Layout - Simple Grid */
.epofw-option-row {
    display: grid;
    grid-template-columns: minmax(200px, 2fr) minmax(100px, 1fr) minmax(80px, 1fr) 60px;
    gap: 15px;
    align-items: center;
    padding: 15px;
    background: #ffffff;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
    transition: border-color 0.2s ease;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: visible;
    position: relative;
}

.epofw-option-row:hover {
    border-color: #0073aa;
}

/* Clean design - no decorative elements */

.epofw-option-row:last-child {
    margin-bottom: 0;
}

/* Clean Input Styling - CONSISTENT ACROSS ALL TABS (Based on Screenshot 3) */
.epofw-option-row input,
.epofw-option-row select,
.epofw_apodp_logical_field_group select,
.epofw_apodp_logical_field_group input,
.epofw_logical_field_group select,
.epofw_logical_field_group input,
.epofw-form-group .epofw-field-input input[type="text"],
.epofw-form-group .epofw-field-input input[type="number"],
.epofw-form-group .epofw-field-input select,
.epofw-form-group > select,
.epofw-form-group > input[type="text"],
.epofw-form-group > input[type="number"],
.epofw-tab-content input[type="text"],
.epofw-tab-content input[type="number"],
.epofw-tab-content select {
    margin: 0 !important;
    padding: 10px 14px !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif !important;
    color: #333 !important;
    background: #ffffff !important;
    transition: border-color 0.2s ease !important;
    min-height: 40px !important;
    height: 40px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    box-shadow: none !important;
    font-weight: normal !important;
    line-height: 1.4 !important;
}

/* Clean Focus States - CONSISTENT ACROSS ALL TABS */
.epofw-option-row input:focus,
.epofw-option-row select:focus,
.epofw_apodp_logical_field_group select:focus,
.epofw_apodp_logical_field_group input:focus,
.epofw_logical_field_group select:focus,
.epofw_logical_field_group input:focus,
.epofw-form-group .epofw-field-input input[type="text"]:focus,
.epofw-form-group .epofw-field-input input[type="number"]:focus,
.epofw-form-group .epofw-field-input select:focus,
.epofw-form-group > select:focus,
.epofw-form-group > input[type="text"]:focus,
.epofw-form-group > input[type="number"]:focus,
.epofw-tab-content input[type="text"]:focus,
.epofw-tab-content input[type="number"]:focus,
.epofw-tab-content select:focus {
    outline: none !important;
    border-color: #0073aa !important;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1) !important;
}

.epofw-option-row input::placeholder {
    color: var(--epofw-gray-400);
}

/* Select Dropdown Styling */
.epofw-option-row select {
    appearance: none;
    -webkit-appearance: none;
    -moz-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='%23475569' stroke-width='2.5' 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 var(--epofw-space-lg) center;
    background-size: 20px;
    padding-right: 3.5rem;
    cursor: pointer;
}

/* Clean Hover States - CONSISTENT ACROSS ALL TABS */
.epofw-option-row select:hover,
.epofw-option-row input:hover,
.epofw_apodp_logical_field_group select:hover,
.epofw_apodp_logical_field_group input:hover,
.epofw_logical_field_group select:hover,
.epofw_logical_field_group input:hover,
.epofw-form-group .epofw-field-input input[type="text"]:hover,
.epofw-form-group .epofw-field-input input[type="number"]:hover,
.epofw-form-group .epofw-field-input select:hover,
.epofw-form-group > select:hover,
.epofw-form-group > input[type="text"]:hover,
.epofw-form-group > input[type="number"]:hover,
.epofw-tab-content input[type="text"]:hover,
.epofw-tab-content input[type="number"]:hover,
.epofw-tab-content select:hover {
    border-color: #0073aa !important;
}

/* Remove Option Button */
.epofw-remove-option {
    background: var(--epofw-error) !important;
    color: var(--epofw-white) !important;
    border: none !important;
    border-radius: var(--epofw-radius-md) !important;
    padding: 0 !important;
    margin: 0 var(--epofw-space-xs) 0 0 !important;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all var(--epofw-transition-fast) !important;
    font-size: 24px !important;
    box-shadow: var(--epofw-shadow-md) !important;
    position: relative !important;
    visibility: visible !important;
    opacity: 1 !important;
    flex-shrink: 0 !important;
}

/* Show the dashicons icon properly - larger size */
.epofw-remove-option .dashicons {
    font-size: 24px !important;
    width: 24px !important;
    height: 24px !important;
    color: var(--epofw-white) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
}

/* Alternative: Use text content if dashicons still look small */
.epofw-remove-option .dashicons::before {
    content: '×' !important;
    font-size: 28px !important;
    font-weight: 300 !important;
    line-height: 1 !important;
    font-family: Arial, sans-serif !important;
}

/* Essential dashicons display fixes */
.epofw-product-addons-container .dashicons,
.epofw-modal-content .dashicons,
.epofw-tab-content .dashicons,
.epofw-builder-actions .dashicons,
.epofw-builder-action-bar .dashicons,
.epofw-section-header .dashicons,
.epofw-element-drag .dashicons,
.epofw-modal-content .epofw-onboarding-icon .dashicons,
.epofw-modal-content .epofw-tutorial-btn-doc .dashicons,
.epofw-modal-content .epofw-tutorial-btn-video .dashicons {
    font-family: dashicons !important;
    display: inline-block !important;
    vertical-align: middle !important;
    line-height: 1 !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
}

/* Button dashicons styling */

.epofw-remove-option:hover {
    background: #dc2626 !important;
    transform: scale(1.05) !important;
    box-shadow: var(--epofw-shadow-lg) !important;
}

.epofw-remove-option:active {
    transform: scale(0.95) !important;
}

/* Add Option Button */
.epofw-add-option {
    background: var(--epofw-primary);
    color: #ffffff;
    border: none;
    border-radius: var(--epofw-radius-md);
    padding: var(--epofw-space-sm) var(--epofw-space-lg);
    font-size: 0.875rem;
    font-weight: 500;
    font-family: var(--epofw-font-sans);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: var(--epofw-space-xs);
    transition: all var(--epofw-transition-fast);
    margin-top: var(--epofw-space-md);
}

.epofw-add-option:hover {
    background: var(--epofw-primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--epofw-shadow-md);
}

.epofw-add-option i {
    font-size: 1rem;
}

/* Responsive Layout */
@media (max-width: 1200px) {
    .epofw-option-row {
        grid-template-columns: minmax(180px, 2fr) minmax(80px, 1fr) minmax(60px, 1fr) 60px;
        gap: var(--epofw-space-xs);
    }
}

@media (max-width: 900px) {
    .epofw-option-row {
        grid-template-columns: 1fr 100px 80px 60px;
        gap: var(--epofw-space-xs);
    }
}

@media (max-width: 768px) {
    .epofw-options-container {
        padding: var(--epofw-space-md);
    }
    
    .epofw-option-row {
        grid-template-columns: 1fr;
        gap: var(--epofw-space-xs);
        text-align: left;
        padding: var(--epofw-space-sm);
    }
    
    .epofw-option-row input,
    .epofw-option-row select {
        margin-bottom: var(--epofw-space-xs);
        font-size: 0.8rem;
    }
    
    .epofw-remove-option {
        width: 100%;
        justify-self: stretch;
        margin-top: var(--epofw-space-xs);
    }
}

@media (max-width: 480px) {
    .epofw-options-container {
        padding: var(--epofw-space-sm);
        margin: 0 -var(--epofw-space-xs);
    }
    
    .epofw-option-row {
        padding: var(--epofw-space-xs);
    }
}

/* Clean Conditional Logic Styling */
.epofw-conditional-logic-container,
.epofw-apodp-logical-container {
    background: #ffffff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
    position: relative;
}

/* Clean design - no decorative elements */

/* Clean conditional logic classes */
.epofw_logical_field_group,
.epofw_apodp_logical_field_group {
    display: grid !important;
    grid-template-columns: 2fr 1.5fr 2fr auto !important;
    gap: 15px !important;
    align-items: center !important;
    padding: 15px !important;
    background: #ffffff !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    margin-bottom: 10px !important;
    transition: border-color 0.2s ease !important;
    position: relative !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Force horizontal layout for conditional logic */
.epofw-conditional-logic-container .epofw_logical_field_group,
.epofw-apodp-logical-container .epofw_apodp_logical_field_group {
    display: grid !important;
    grid-template-columns: 2fr 1.5fr 2fr auto !important;
    gap: var(--epofw-space-lg) !important;
    align-items: center !important;
    justify-items: stretch !important;
}

/* Style the individual option containers */
.epofw_logical_field_option {
    display: contents !important;
}

/* Ensure form elements are properly sized in grid */
.epofw_logical_field_group select,
.epofw_logical_field_group input,
.epofw_apodp_logical_field_group select,
.epofw_apodp_logical_field_group input {
    width: 100% !important;
    max-width: none !important;
    display: block !important;
    box-sizing: border-box !important;
}

.epofw_logical_field_group:hover,
.epofw_apodp_logical_field_group:hover {
    border-color: #0073aa;
}

.epofw_logical_field_group:last-child,
.epofw_apodp_logical_field_group:last-child {
    margin-bottom: 0;
}

/* Clean design - no decorative elements */

/* Conditional logic inputs - now consistent with other tabs */
.epofw_logical_field_group select,
.epofw_logical_field_group input,
.epofw_apodp_logical_field_group select,
.epofw_apodp_logical_field_group input {
    /* Styling handled by the consistent input rules above */
}

/* Focus states handled by consistent rules above */

.epofw_logical_field_group select,
.epofw_apodp_logical_field_group select {
    appearance: none;
    -webkit-appearance: none;
    -moz-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='%23475569' stroke-width='2.5' 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 var(--epofw-space-lg) center;
    background-size: 20px;
    padding-right: 3.5rem;
    cursor: pointer;
}

/* Hover states handled by consistent rules above */

/* Visual connectors between logic fields */
.epofw_logical_field_group select:not(:last-of-type),
.epofw_logical_field_group input:not(:last-of-type),
.epofw_apodp_logical_field_group select:not(:last-of-type),
.epofw_apodp_logical_field_group input:not(:last-of-type) {
    position: relative;
}

.epofw_logical_field_group select:first-of-type::after,
.epofw_apodp_logical_field_group select:first-of-type::after {
    content: '→';
    position: absolute;
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--epofw-gray-400);
    font-size: 1.2rem;
    font-weight: bold;
    z-index: 1;
    pointer-events: none;
}

.epofw_logical_field_group select:nth-of-type(2)::after,
.epofw_apodp_logical_field_group select:nth-of-type(2)::after {
    content: '→';
    position: absolute;
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--epofw-gray-400);
    font-size: 1.2rem;
    font-weight: bold;
    z-index: 1;
    pointer-events: none;
}

/* Hide connectors on mobile */
@media (max-width: 600px) {
    .epofw_logical_field_group select::after,
    .epofw_apodp_logical_field_group select::after {
        display: none;
    }
}

.epofw-remove-logic {
    background: var(--epofw-error);
    color: var(--epofw-white);
    border: none;
    border-radius: var(--epofw-radius-lg);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--epofw-transition-base);
    box-shadow: var(--epofw-shadow-md);
    font-size: 1rem;
    position: relative;
}

.epofw-remove-logic::before {
    content: '×';
    font-size: 20px;
    font-weight: 300;
    line-height: 1;
}

.epofw-remove-logic:hover {
    background: #dc2626;
    transform: scale(1.05);
    box-shadow: var(--epofw-shadow-lg);
}

.epofw-remove-logic:active {
    transform: scale(0.95);
}

.epofw-add-logic {
    background: linear-gradient(135deg, var(--epofw-primary), var(--epofw-primary-light));
    color: var(--epofw-white);
    border: none;
    border-radius: var(--epofw-radius-lg);
    padding: var(--epofw-space-md) var(--epofw-space-xl);
    font-size: 0.875rem;
    font-weight: 600;
    font-family: var(--epofw-font-sans);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: var(--epofw-space-sm);
    transition: all var(--epofw-transition-base);
    box-shadow: var(--epofw-shadow-md);
    margin-top: var(--epofw-space-md);
    position: relative;
    overflow: hidden;
}

.epofw-add-logic::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left var(--epofw-transition-slow);
}

.epofw-add-logic:hover::before {
    left: 100%;
}

.epofw-add-logic:hover {
    background: linear-gradient(135deg, var(--epofw-primary-dark), var(--epofw-primary));
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--epofw-shadow-xl);
}

.epofw-add-logic:active {
    transform: translateY(0) scale(0.98);
}

.epofw-add-logic i {
    font-size: 1rem;
}

/* Responsive Conditional Logic */
@media (max-width: 900px) {
    .epofw-conditional-logic-container .epofw_logical_field_group,
    .epofw-apodp-logical-container .epofw_apodp_logical_field_group {
        grid-template-columns: 1fr 120px 1fr 40px !important;
        gap: var(--epofw-space-sm) !important;
        padding: var(--epofw-space-md) !important;
    }
}

@media (max-width: 600px) {
    .epofw-conditional-logic-container .epofw_logical_field_group,
    .epofw-apodp-logical-container .epofw_apodp_logical_field_group {
        grid-template-columns: 1fr !important;
        gap: var(--epofw-space-sm) !important;
        padding: var(--epofw-space-md) !important;
    }
    
    .epofw_logical_field_group select,
    .epofw_logical_field_group input,
    .epofw_apodp_logical_field_group select,
    .epofw_apodp_logical_field_group input {
        margin-bottom: var(--epofw-space-xs) !important;
    }
    
    .epofw-remove-logic {
        width: 100% !important;
        height: 36px !important;
        margin-top: var(--epofw-space-sm) !important;
    }
}

@media (max-width: 768px) {
    .epofw-conditional-logic-container,
    .epofw-apodp-logical-container {
        padding: var(--epofw-space-lg);
        margin-bottom: var(--epofw-space-lg);
    }
    
    .epofw-logic-row {
        padding: var(--epofw-space-sm);
    }
    
    .epofw-logic-row select,
    .epofw-logic-row input {
        padding: var(--epofw-space-sm) var(--epofw-space-md);
        font-size: 0.8rem;
    }
    
    .epofw-add-logic {
        width: 100%;
        justify-content: center;
        padding: var(--epofw-space-md);
    }
}

.epofw-form-group {
    margin-bottom: 16px;
}

.epofw-form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #333;
    font-size: 13px;
}

.epofw-form-input,
.epofw-form-select,
.epofw-form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s ease;
    box-sizing: border-box;
    background: #fff;
    color: #374151;
}

.epofw-form-input:focus,
.epofw-form-select:focus,
.epofw-form-control:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.epofw-form-input:focus,
.epofw-form-select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

.epofw-help-text {
    margin: 4px 0 8px 0;
    font-size: 11px;
    color: #666;
    font-style: italic;
}

.epofw-segmented-control {
    display: flex;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.epofw-segment {
    flex: 1;
    padding: 8px 12px;
    border: none;
    background: #f8f9fa;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.epofw-segment:hover {
    background: #e9ecef;
}

.epofw-segment.active {
    background: #0073aa;
    color: #fff;
}

.epofw-color-picker {
    width: 60px;
    height: 32px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
}

.epofw-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: normal;
}

.epofw-checkbox {
    margin: 0;
    width: 16px;
    height: 16px;
    accent-color: #3b82f6;
}

/* Improved form spacing and layout */
.epofw-form-row {
    margin-bottom: 24px;
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.epofw-form-row .epofw-form-group {
    flex: 1;
    margin-bottom: 0;
    min-width: 280px;
}

.epofw-form-group {
    margin-bottom: 0;
}

/* Color picker styling */
.epofw-form-control[type="color"] {
    width: 60px;
    height: 40px;
    padding: 2px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
}

/* Select dropdown styling */
.epofw-form-control[type="select"],
.epofw-form-control select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 8px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 32px;
}

.epofw-checkbox-custom {
    width: 16px;
    height: 16px;
    border: 1px solid #ddd;
    border-radius: 3px;
    background: #fff;
    position: relative;
    transition: all 0.2s ease;
}

.epofw-checkbox:checked + .epofw-checkbox-custom {
    background: #0073aa;
    border-color: #0073aa;
}

.epofw-checkbox:checked + .epofw-checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 10px;
    font-weight: bold;
}

/* Conditional Logic */
.epofw-conditional-rules {
    margin-top: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.epofw-rule-item {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    align-items: center;
}

.epofw-rule-item select,
.epofw-rule-item input {
    flex: 1;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 12px;
}

.epofw-remove-rule {
    padding: 6px 8px;
    background: #dc3545;
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

.epofw-remove-rule:hover {
    background: #c82333;
}

.epofw-add-rule {
    padding: 8px 12px;
    background: #6c757d;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.epofw-add-rule:hover {
    background: #5a6268;
}

/* Modal Footer */
.epofw-modal-footer {
    padding: 25px 40px;
    border-top: 1px solid #e5e5e5;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: #f8f9fa;
    flex-shrink: 0;
    border-radius: 0 0 8px 8px;
    position: relative;
    z-index: 10;
    overflow: hidden;
}

.epofw-modal-footer .epofw-btn {
    padding: 10px 20px;
    font-size: 14px;
    min-height: 40px;
    position: relative;
    z-index: 20;
}

.epofw-modal-footer .epofw-save-element {
    background: #0073aa;
    color: #fff;
    border: none;
    font-weight: 600;
    position: relative;
    z-index: 20;
    overflow: visible;
}

.epofw-modal-footer .epofw-save-element:hover {
    background: #005a87;
}

/* Ensure save button is always inside modal */
.epofw-element-modal .epofw-modal-footer .epofw-save-element,
.epofw-section-modal .epofw-modal-footer .epofw-save-section {
    position: relative;
    z-index: 20;
    max-width: 100%;
    box-sizing: border-box;
    overflow: visible;
    pointer-events: auto;
}

/* Force save button to stay inside modal boundaries */
.epofw-element-modal .epofw-modal-footer,
.epofw-section-modal .epofw-modal-footer {
    position: relative;
    overflow: visible;
    contain: layout style;
}

/* Prevent any save button from appearing outside modal */
.epofw-element-modal .epofw-btn,
.epofw-section-modal .epofw-btn {
    position: relative;
    max-width: calc(100% - 40px);
}

/* .epofw-btn .dashicons::before {
    content: "\f132";
    vertical-align: middle;
  } */

/* Override any WordPress admin styles that might affect modal positioning */
.epofw-element-modal,
.epofw-section-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 999999 !important;
    display: none !important;
}

.epofw-element-modal[style*="display: block"],
.epofw-section-modal[style*="display: block"],
.epofw-element-modal.show,
.epofw-section-modal.show {
    display: block !important;
}

.epofw-element-modal .epofw-modal-content,
.epofw-section-modal .epofw-modal-content {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: calc(100vw - 160px) !important;
    max-width: 1400px !important;
    max-height: 90vh !important;
    overflow: hidden !important;
    background: #fff !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
    margin-left: 80px !important;
}

/* Ensure modal footer is properly contained */
.epofw-element-modal .epofw-modal-footer,
.epofw-section-modal .epofw-modal-footer {
    position: relative !important;
    margin-top: auto !important;
    background: #f8f9fa !important;
    border-top: 1px solid #e5e5e5 !important;
    padding: 20px 30px !important;
    border-radius: 0 0 8px 8px !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
}

/* Ensure save button is inside modal footer */
.epofw-element-modal .epofw-modal-footer .epofw-save-element,
.epofw-section-modal .epofw-modal-footer .epofw-save-section {
    position: relative !important;
    float: right !important;
    margin-left: 12px !important;
    background: #0073aa !important;
    color: #fff !important;
    border: none !important;
    padding: 10px 20px !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    min-height: 40px !important;
    max-width: none !important;
    box-sizing: border-box !important;
}

/* Hide any save buttons outside the modal */
body:has(.epofw-element-modal[style*="display: block"]) .epofw-save-element:not(.epofw-element-modal .epofw-save-element),
body:has(.epofw-section-modal[style*="display: block"]) .epofw-save-section:not(.epofw-section-modal .epofw-save-section),
body:has(.epofw-element-modal.show) .epofw-save-element:not(.epofw-element-modal .epofw-save-element),
body:has(.epofw-section-modal.show) .epofw-save-section:not(.epofw-section-modal .epofw-save-section) {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Alternative selector for browsers that don't support :has() */
.epofw-element-modal[style*="display: block"] ~ * .epofw-save-element,
.epofw-section-modal[style*="display: block"] ~ * .epofw-save-section,
.epofw-element-modal.show ~ * .epofw-save-element,
.epofw-section-modal.show ~ * .epofw-save-section {
    display: none !important;
}

/* Responsive adjustments for admin sidebar */
@media screen and (max-width: 960px) {
    .epofw-element-modal .epofw-modal-content,
    .epofw-section-modal .epofw-modal-content {
        width: calc(100vw - 40px) !important;
        margin-left: 20px !important;
    }
}

/* When admin sidebar is collapsed */
.wp-admin.folded .epofw-element-modal .epofw-modal-content,
.wp-admin.folded .epofw-section-modal .epofw-modal-content {
    width: calc(100vw - 80px) !important;
    margin-left: 40px !important;
}

/* Mobile responsive */
@media screen and (max-width: 782px) {
    .epofw-element-modal .epofw-modal-content,
    .epofw-section-modal .epofw-modal-content {
        width: calc(100vw - 20px) !important;
        margin-left: 10px !important;
        max-width: none !important;
    }
}

/* FINAL OVERRIDE: Force full-width form groups to be block display */
.epofw-tab-content[data-tab="field-options"] .epofw-form-group.epofw-full-width,
.epofw-tab-content .epofw-form-group.epofw-full-width,
.epofw-modal-content .epofw-form-group.epofw-full-width,
div.epofw-form-group.epofw-full-width {
    display: block !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0 !important;
    width: 100% !important;
    flex: none !important;
    margin-bottom: var(--epofw-space-lg) !important;
}

/* Ensure the Radio Options label displays properly */
.epofw-form-group.epofw-full-width > label {
    display: block !important;
    width: 100% !important;
    margin-bottom: var(--epofw-space-md) !important;
    flex: none !important;
}

/* FINAL OVERRIDE: Force dropdown arrows on ALL select elements */
.epofw-element-modal select,
.epofw-section-modal select,
.epofw-modal-content select,
.epofw-tab-content select,
.epofw-form-group select,
.epofw-field-input select,
div select:not([class*="ui-datepicker-month"],[class*="ui-datepicker-year"]),
select:not([class*="ui-datepicker-month"],[class*="ui-datepicker-year"]) {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-color: #ffffff !important;
    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='%23374151' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 16px center !important;
    background-size: 24px 24px !important;
    padding-right: 50px !important;
    cursor: pointer !important;
    background-attachment: scroll !important;
}

/* Ensure dropdown arrows are visible even with WordPress admin styles */
body.wp-admin select:not([class*="ui-datepicker-month"],[class*="ui-datepicker-year"]),
.wp-admin select:not([class*="ui-datepicker-month"],[class*="ui-datepicker-year"]) {
    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='%23374151' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 16px center !important;
    background-size: 24px 24px !important;
    padding-right: 50px !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
}

/* ULTRA-SPECIFIC: Target the exact select element that's conflicting */
.epofw-modal-content .epofw-tab-content .epofw-form-group .epofw-field-input select.epofw-form-control,
.epofw-tab-content .epofw-form-group .epofw-field-input select,
select#field_status.epofw-form-control,
select.epofw-form-control[name*="field_status"],
.epofw-form-group select.epofw-form-control {
    background: #ffffff url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23374151' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M6 8l4 4 4-4'/%3e%3c/svg%3e") no-repeat right 12px center !important;
    background-size: 16px 16px !important;
    padding-right: 40px !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
}

/* LAST RESORT: Use inline CSS approach with highest specificity */
.epofw-element-modal select[style],
.epofw-section-modal select[style] {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23374151'%3e%3cpath d='M4.5 6.5L8 10l3.5-3.5H4.5z'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 12px !important;
    padding-right: 35px !important;
}

/* Force with attribute selector */
select[class*="epofw"],
select[id*="field"] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23374151' viewBox='0 0 16 16'%3E%3Cpath d='M8 10.5L4 6.5h8L8 10.5z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 14px !important;
    padding-right: 35px !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
}

.epofw-section-header .epofw-section-title i {
   line-height: revert !important;
}

.epofw-settings-tabs .dashicons {
    line-height: 1.2 !important
}

.epofw-addon-card::before,
.epofw-addon-card::after {
    pointer-events: none !important;
}


/* WordPress Standard Spinner and Loading States */
.epofw-loading-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(255, 255, 255, 0.85);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 8px;
}

.epofw-loading-container {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 300px;
	width: 100%;
	padding: 40px 20px;
	box-sizing: border-box;
	position: relative;
}

.epofw-loading-container:only-child {
	display: flex;
}

.epofw-spinner-wrapper {
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
}

/* .epofw-spinner-wrapper .spinner {
	float: none;
	margin: 0;
	width: 40px;
	height: 40px;
	border: 4px solid #e5e7eb;
	border-top: 4px solid --epofw-blue-500;
	border-radius: 50%;
	animation: spin 1s linear infinite;
	display: block;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
} */

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

/* Hide any duplicate spinners */
.epofw-loading-container + .epofw-loading-container,
.epofw-spinner-wrapper + .epofw-spinner-wrapper {
	display: none !important;
}

/* Full Page Save Overlay */
.epofw-save-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.5);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
}

.epofw-save-overlay .epofw-save-popup {
	background: #fff;
	padding: 30px 50px;
	border-radius: 8px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
	text-align: center;
	animation: epofw-popup-in 0.2s ease-out;
}

@keyframes epofw-popup-in {
	from {
		opacity: 0;
		transform: scale(0.9);
	}
	to {
		opacity: 1;
		transform: scale(1);
	}
}

.epofw-save-overlay .spinner {
	float: none;
	margin: 0 auto 15px;
	visibility: visible;
}

.epofw-save-overlay .epofw-save-text {
	font-size: 16px;
	font-weight: 500;
	color: #1d2327;
	margin: 0;
}

/* Import Confirmation Modal */
.epofw-import-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.7);
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	backdrop-filter: blur(2px);
	-webkit-backdrop-filter: blur(2px);
}

.epofw-import-modal {
	position: relative;
	background: #fff;
	padding: 40px;
	border-radius: 8px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
	min-width: 450px;
	max-width: 550px;
	text-align: center;
	animation: epofw-popup-in 0.3s ease;
	margin: 20px;
}

.epofw-import-icon {
	margin-bottom: 20px;
}

.epofw-import-icon .dashicons {
	font-size: 60px;
	width: 60px;
	height: 60px;
	color: #2271b1;
}

.epofw-import-modal h2 {
	margin: 0 0 10px;
	color: #2271b1;
}

.epofw-import-message {
	color: #666;
	margin: 10px 0 20px;
}

.epofw-import-info {
	background: #f0f6fc;
	padding: 15px;
	border-radius: 5px;
	margin-bottom: 25px;
	border-left: 4px solid #2271b1;
	text-align: left;
}

.epofw-import-info p {
	margin: 0;
	color: #2271b1;
	font-size: 14px;
}

.epofw-import-buttons {
	display: flex;
	gap: 10px;
	justify-content: center;
}

.epofw-import-buttons .button {
	padding: 8px 20px;
}

/* Error States */
.epofw-error-container {
	text-align: center;
	padding: 40px 20px;
}

.epofw-error-icon {
	margin-bottom: 20px;
}

.epofw-error-icon .dashicons {
	font-size: 48px;
	color: #d63638;
}

.epofw-error-text {
	color: #d63638;
	font-size: 16px;
	margin: 0 0 20px 0;
}

.epofw-error-actions {
	text-align: center;
}

/* Modal Content Wrapper - Consistent Dimensions */
.epofw-modal-content-wrapper {
	min-height: 300px;
	width: 100%;
	box-sizing: border-box;
}

/* Ensure modal body has consistent height */
.epofw-modal-body {
	min-height: 300px;
	display: flex;
	flex-direction: column;
}

/* Migration to sections */
.epofw-migrate-btn {
	background: #0073aa !important;
	color: #fff !important;
	border: 1px solid #0073aa !important;
}
.epofw-migrate-btn:hover {
	background: #005a87 !important;
}

/* Row Management Styles */
.epofw-section-actions {
	margin-bottom: 15px;
	padding: 10px 10px;
	/* border-bottom: 1px solid #e0e0e0; */
}

.epofw-add-row-btn {
	background: #4CAF50;
	color: white;
	border: 1px solid #4CAF50;
	padding: 8px 12px;
	margin-right: 10px;
	border-radius: 4px;
	cursor: pointer;
	font-size: 14px;
	display: inline-flex;
	align-items: center;
	gap: 5px;
}

.epofw-add-row-btn:hover {
	background: #45a049;
	border-color: #45a049;
}

.epofw-row-selection-modal .epofw-modal-content {
	max-width: 600px;
	width: 90%;
}

.epofw-row-options {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 20px;
	padding: 20px 0;
}

.epofw-row-option {
	border: 2px solid #ddd;
	border-radius: 8px;
	padding: 20px;
	text-align: center;
	cursor: pointer;
	transition: all 0.3s ease;
}

.epofw-row-option:hover {
	border-color: #0073aa;
	background: #f8f9fa;
}

.epofw-row-option.active {
	border-color: #0073aa;
	background: #e3f2fd;
}

.epofw-row-preview {
	margin-bottom: 15px;
}

.epofw-row-visual {
	display: flex;
	gap: 8px;
	justify-content: center;
	margin-bottom: 10px;
}

.epofw-row-box {
	width: 40px;
	height: 30px;
	background: #0073aa;
	border-radius: 4px;
	opacity: 0.7;
}

.epofw-row-option.active .epofw-row-box {
	opacity: 1;
}

.epofw-row-option span {
	font-weight: 500;
	color: #333;
}

/* Row Container Styles */
.epofw-row-container {
	border: 2px dashed #ddd;
	border-radius: 8px;
	margin-bottom: 15px;
	background: #fafafa;
	flex: 1;
	min-width: 200px;
	margin-right: 15px;
}

.epofw-row-container:last-child {
	margin-right: 0;
}

.epofw-row-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 10px 15px;
	background: #f0f0f0;
	border-bottom: 1px solid #ddd;
	border-radius: 6px 6px 0 0;
}

.epofw-row-drag-handle {
	cursor: move;
	color: #666;
	margin-right: 10px;
	padding: 5px;
	border-radius: 3px;
	transition: background-color 0.2s ease;
}

.epofw-row-drag-handle:hover {
	background: #e0e0e0;
	color: #333;
}

.epofw-row-title {
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 500;
	color: #333;
}

.epofw-row-title i {
	color: #0073aa;
}

.epofw-row-actions {
	display: flex;
	gap: 5px;
}

/* .epofw-row-delete {
	background: #dc3545;
	color: white;
	border: none;
	padding: 5px 8px;
	border-radius: 4px;
	cursor: pointer;
	font-size: 12px;
}

.epofw-row-delete:hover {
	background: #c82333;
} */

.epofw-row-content {
	padding: 15px;
}

.epofw-row-container .epofw-elements-container {
	min-height: 60px;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.epofw-row-group.epofw-multi-group[data-rows-count="4"] .epofw-elements-container {
    flex-wrap: nowrap;
}

/* Rows container layout */
.epofw-rows-container {
	margin-top: 15px;
	padding-top: 15px;
	/* border-top: 1px solid #e0e0e0; */
	display: flex;
	flex-direction: column;
	gap: 20px;
}

/* Row group containers - matches section styling exactly */
.epofw-row-group {
	background: #fff;
	border: 1px solid #e5e5e5;
	border-radius: 8px;
	margin-bottom: 20px;
	overflow: hidden;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Row group header - matches section header styling */
.epofw-row-group-header {
	/* background: #f8f9fa; */
	padding: 0 20px;
	display: flex;
	align-items: center;
	gap: 12px;
	border-bottom: 1px solid #e5e5e5;
	position: relative;
}

.epofw-row-group-drag {
	color: #999;
	cursor: move;
	padding: 6px;
	border-radius: 4px;
	transition: all 0.2s ease;
	font-size: 14px;
}

.epofw-row-group-drag:hover {
	background: #e9ecef;
	color: #666;
}

.epofw-row-group-edit {
	color: #999;
	cursor: pointer;
	padding: 6px;
	border-radius: 4px;
	transition: all 0.2s ease;
	font-size: 14px;
}

.epofw-row-group-edit:hover {
	background: #e9ecef;
	color: #666;
}

.epofw-row-group-header .dashicons {
	font-family: dashicons !important;
	display: inline-block !important;
	vertical-align: middle !important;
	line-height: 1 !important;
	-webkit-font-smoothing: antialiased !important;
	-moz-osx-font-smoothing: grayscale !important;
}

.epofw-row-group-title {
	flex: 1;
	font-size: 16px;
	font-weight: 600;
	color: #333;
	display: flex;
	align-items: center;
	gap: 8px;
	margin-right: 16px;
}

.epofw-row-group-actions {
	display: flex;
	align-items: center;
}

.epofw-row-group-actions button {
	width: 32px;
	height: 32px;
	border: none;
	background: #f8f9fa;
	border-radius: 6px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s ease;
	color: #666;
	flex-shrink: 0;
}

.epofw-row-group-actions button:hover {
	background: #e9ecef;
	color: #333;
}

.epofw-add-column-btn {
	color: #28a745;
	margin-right: 4px;
}

.epofw-add-column-btn:hover {
	background: #d4edda;
	color: #155724;
}

.epofw-row-group-delete {
	color: #dc3545;
}

.epofw-row-group-delete:hover {
	background: #f8d7da;
	color: #721c24;
}

/* Row content - vertical stacking of columns containers */
.epofw-row-content,
.epofw-row-group-content {
	display: flex;
	flex-direction: column;
	gap: 15px;
	padding: 20px;
}

/* ============================================
   NEW CLEANER STRUCTURE - epofw-columns
   Structure: Section > Row > Columns > Column
   ============================================ */

/* Columns container - matches row group styling exactly */
.epofw-columns {
	background: #fff;
	border: 1px solid #e5e5e5;
	border-radius: 8px;
	margin-bottom: 15px;
	overflow: hidden;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
	display: flex;
	flex-direction: column;
}

/* Columns content wrapper - matches row-group-content */
.epofw-columns-content {
	padding: 15px;
	display: flex;
	flex-direction: row;
	gap: 15px;
	flex-wrap: nowrap;
	align-items: stretch;
}

/* Single column layout - full width */
.epofw-columns.epofw-columns-single .epofw-column {
	width: 100%;
}

/* Multi column layout - columns side by side */
.epofw-columns.epofw-columns-multi .epofw-column {
	flex: 1;
	min-width: 0;
}

/* Column (individual column inside columns container) */
.epofw-column {
	background: #fff;
	border: 1px solid #dee2e6;
	border-radius: 4px;
	min-height: 60px;
}

.epofw-column .epofw-column-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 8px 12px;
	background: #f1f3f5;
	border-bottom: 1px solid #dee2e6;
	border-radius: 4px 4px 0 0;
}

.epofw-column .epofw-column-title {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	font-weight: 500;
	color: #495057;
}

.epofw-column .epofw-column-title i {
	font-size: 14px;
	color: #6c757d;
}

.epofw-column .epofw-column-actions {
	display: flex;
	gap: 4px;
}

.epofw-column .epofw-column-actions button {
	padding: 4px;
	background: transparent;
	border: none;
	cursor: pointer;
	color: #6c757d;
	border-radius: 3px;
	transition: all 0.2s ease;
}

.epofw-column .epofw-column-actions button:hover {
	background: #e9ecef;
	color: #212529;
}

.epofw-column .epofw-column-content {
	padding: 10px;
}

/* Add Column button inside columns container */
.epofw-columns .epofw-add-column-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	min-width: 36px;
	background: #e8f5e9;
	border: 1px dashed #28a745;
	border-radius: 4px;
	color: #28a745;
	cursor: pointer;
	transition: all 0.2s ease;
	align-self: center;
}

.epofw-columns .epofw-add-column-btn:hover {
	background: #c8e6c9;
	border-style: solid;
	color: #155724;
}

.epofw-columns .epofw-add-column-btn i {
	font-size: 18px;
}

/* Empty columns placeholder */
.epofw-columns.epofw-columns-empty {
	background: #fff;
	border-style: dashed;
	justify-content: center;
	align-items: center;
	padding: 30px;
}

.epofw-columns-placeholder {
	text-align: center;
	color: #6c757d;
}

.epofw-columns-placeholder p {
	margin: 0;
	font-size: 13px;
}

/* Add Columns Button Container */
.epofw-add-columns-container,
.epofw-add-column-container {
	display: flex;
	justify-content: center;
	padding: 10px 0;
	border-top: 1px dashed #dee2e6;
	margin-top: 5px;
}

/* Add Columns Button */
.epofw-add-columns-btn {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 8px 16px;
	background: #f8f9fa;
	border: 1px dashed #28a745;
	border-radius: 6px;
	color: #28a745;
	cursor: pointer;
	font-size: 13px;
	font-weight: 500;
	transition: all 0.2s ease;
}

.epofw-add-columns-btn:hover {
	background: #d4edda;
	border-style: solid;
	color: #155724;
}

.epofw-add-columns-btn i {
	font-size: 16px;
}

/* ============================================
   LEGACY SUPPORT - Keep old class names working
   ============================================ */

/* Sub-row container (legacy) - same as epofw-columns */
.epofw-subrow-container {
	display: flex;
	flex-direction: row;
	gap: 15px;
	flex-wrap: nowrap;
	align-items: stretch;
}

.epofw-subrow-container.epofw-subrow-single {
	flex-direction: column;
}

.epofw-subrow-container.epofw-subrow-single .epofw-row-container {
	width: 100%;
}

.epofw-subrow-container.epofw-subrow-multi .epofw-row-container {
	flex: 1;
	min-width: 0;
}

/* Legacy support - Single group - one row, full width */
.epofw-row-group.epofw-single-group .epofw-row-group-content > .epofw-row-container {
	width: 100%;
}

/* Legacy support - Multi group - multiple rows side by side */
.epofw-row-group.epofw-multi-group .epofw-row-group-content > .epofw-row-container {
	flex: 1;
	min-width: 0;
}

.epofw-row-group.epofw-multi-group .epofw-row-group-content:not(:has(.epofw-subrow-container)):not(:has(.epofw-columns)) {
	flex-direction: row;
	flex-wrap: nowrap;
	align-items: stretch;
}

/* Legacy Add Sub-Row Button Container */
.epofw-add-subrow-container {
	display: flex;
	justify-content: center;
	padding: 10px 0;
	border-top: 1px dashed #dee2e6;
	margin-top: 5px;
}

/* Legacy Add Sub-Row Button */
.epofw-add-subrow-btn {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 8px 16px;
	background: #f8f9fa;
	border: 1px dashed #28a745;
	border-radius: 6px;
	color: #28a745;
	cursor: pointer;
	font-size: 13px;
	font-weight: 500;
	transition: all 0.2s ease;
}

.epofw-add-subrow-btn:hover {
	background: #d4edda;
	border-style: solid;
	color: #155724;
}

.epofw-add-subrow-btn i {
	font-size: 16px;
}

/* Mixed layout - handle both single and multi rows */
.epofw-rows-container.epofw-mixed-layout {
	display: flex;
	flex-direction: column;
	gap: 15px;
}

.epofw-rows-container.epofw-mixed-layout .epofw-single-row {
	width: 100%;
}

.epofw-rows-container.epofw-mixed-layout .epofw-multi-row {
	display: flex;
	flex-direction: row;
	gap: 15px;
}

/* Fallback for when data attribute is not set */
.epofw-rows-container.epofw-single-row-layout {
	display: flex;
	flex-direction: column;
	gap: 15px;
}

.epofw-rows-container.epofw-multi-row-layout {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	align-items: stretch;
	gap: 15px;
}

.epofw-row-container .epofw-element-add {
	margin: 0;
}

/* .epofw-row-container .epofw-add-element-btn {
	background: #f8f9fa;
	border: 2px dashed #ccc;
	color: #666;
	padding: 20px;
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	border-radius: 6px;
	transition: all 0.3s ease;
}

.epofw-row-container .epofw-add-element-btn:hover {
	border-color: #0073aa;
	color: #0073aa;
	background: #f0f8ff;
} */

.epofw-row-container .epofw-add-element-btn span {
	font-size: 14px;
}

/* Element in Row Styles */
.epofw-row-container .epofw-element {
	flex: 1;
	min-width: 200px;
	margin-bottom: 0;
}

/* Frontend Row-Based Layout Styles */
/* Removed display: flex from .epofw-row-group - flex is only on .epofw-row-group-content */

/* Single group - one row, full width */
.epofw-row-group.epofw-single-group .epofw-row-group-content {
	flex-direction: column;
}

.epofw-row-group.epofw-single-group .epofw-row-container {
	width: 100%;
}

/* Multi group - multiple rows side by side */
.epofw-row-group.epofw-multi-group .epofw-row-group-content {
	flex-wrap: nowrap;
	align-items: stretch;
}

.epofw-row-group.epofw-multi-group .epofw-row-container {
	flex: 1;
	min-width: 0;
}

/* Row container styles */
.epofw-row-container {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

/* Field container within rows */
.epofw-row-container .epofw_field_container {
	margin-bottom: 0;
}

/* Responsive behavior for row groups */
@media (max-width: 1200px) {
	.epofw-row-group.epofw-multi-group .epofw-row-group-content {
		flex-wrap: wrap;
	}
	
	.epofw-row-group.epofw-multi-group .epofw-row-container {
		flex: 1 1 calc(50% - 7.5px);
		min-width: 250px;
	}
}

@media (max-width: 768px) {
	.epofw-row-group.epofw-multi-group .epofw-row-group-content {
		flex-direction: column;
	}
	
	.epofw-row-group.epofw-multi-group .epofw-row-container {
		flex: none;
		width: 100%;
	}
}

.epofw-migrate-btn:disabled {
	background: #ccc !important;
	border-color: #ccc !important;
	cursor: not-allowed !important;
}
.epofw-migration-loading {
	background: rgba(255,255,255,0.95) !important;
}
.epofw-migration-notice {
	position: relative;
}
.epofw-migration-notice .notice-dismiss {
	position: absolute;
	top: 0;
	right: 0;
	padding: 10px;
	cursor: pointer;
}

/* Builder Header Styles */
.epofw-builder-header {
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 8px;
	padding: 24px;
	margin-bottom: 24px;
	box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.epofw-builder-settings {
	display: flex;
	flex-direction: column;
	gap: 24px;
	width: 100%;
	box-sizing: border-box;
}

.epofw-setting-field {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 24px;
	width: 100%;
	margin-bottom: 20px;
}



.epofw-setting-label {
	font-weight: 600;
	color: #23282d;
	font-size: 14px;
	min-width: 280px;
	flex-shrink: 0;
}

.epofw-setting-label .woocommerce-help-tip {
	margin-left: 8px;
	color: #666;
}

.epofw-setting-input {
	flex: 1;
	min-width: 0;
}

/* Additional Rules section - full width */
.epofw-additional-rules-field .epofw-setting-input {
	width: 100%;
	min-width: 0;
}

/* Ensure Additional Rules takes full remaining width */
.epofw-additional-rules-field {
	width: 100%;
	display: flex;
	flex-direction: row;
	align-items: flex-start;
	gap: 24px;
}

.epofw-additional-rules-field .epofw-setting-label {
	width: 280px;
	flex-shrink: 0;
}

.epofw-additional-rules-field .epofw-setting-input {
	flex: 1;
	min-width: 0;
	width: 100%;
	max-width: none;
}

.epofw-setting-input input[type="text"],
.epofw-setting-input select {
	width: 100%;
	max-width: 400px;
	padding: 10px 12px;
	border: 1px solid #ddd;
	border-radius: 6px;
	font-size: 14px;
	transition: border-color 0.2s ease;
	background: #fff;
}

.epofw-setting-input input[type="text"]:focus,
.epofw-setting-input select:focus {
	outline: none;
	border-color: #0073aa;
	box-shadow: 0 0 0 1px #0073aa;
}

/* Checkbox with toggle switch */
.epofw-setting-input input[type="checkbox"] {
	opacity: 0;
	width: 0;
	height: 0;
	position: absolute;
}

.epofw-setting-input .toggle-switch {
	position: relative;
	display: inline-block;
	width: 50px;
	height: 25px;
	margin-left: 12px;
	cursor: pointer;
	user-select: none;
	transition: all 0.3s ease;
}

.epofw-setting-input .toggle-switch:hover::before {
	background-color: #ccc;
}

.epofw-setting-input .toggle-switch::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: #ddd;
	border-radius: 25px;
	transition: background-color 0.3s ease;
}

.epofw-setting-input .toggle-switch::after {
	content: '';
	position: absolute;
	top: 2px;
	left: 2px;
	width: 21px;
	height: 21px;
	background-color: #fff;
	border-radius: 50%;
	transition: transform 0.3s ease;
	box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.epofw-setting-input input[type="checkbox"]:checked + .toggle-switch::before {
	background-color: #0073aa;
}

.epofw-setting-input input[type="checkbox"]:checked + .toggle-switch::after {
	transform: translateX(25px);
}

.epofw-setting-input input[type="checkbox"]:checked + .toggle-switch:hover::before {
	background-color: #005a87;
}

.epofw-additional-rules-section {
	border: 1px solid #ddd;
	border-radius: 4px;
	padding: 16px;
	background: #f9f9f9;
	width: 100%;
	min-width: 0;
	box-sizing: border-box;
}

/* Additional Rules - Field Layout */
.additional_rule_ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: flex-start;
	width: 100%;
}

.additional_rule_ul li {
	margin: 0;
}

.epofw_data_condition,
.epofw_data_operator {
	min-width: 120px;
	padding: 6px 8px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 13px;
	background: #fff;
	min-height: 32px;
	line-height: 1.4;
}

.epofw_condition_field_data {
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex: 1 1 200px;
	min-width: 150px;
	max-width: 100%;
}

.epofw_condition_data_class {
	min-height: 80px;
	border: 1px solid #ddd;
	border-radius: 4px;
	padding: 6px 8px;
	background: #fff;
	width: 100%;
}

.epofw_all_selection_btn {
	display: flex;
	gap: 8px;
	margin-top: 8px;
}

.epofw_all_selection_btn .button {
	padding: 4px 8px;
	font-size: 12px;
	height: auto;
	line-height: 1.4;
	background: #0073aa;
	color: #fff;
	border: 1px solid #0073aa;
	border-radius: 4px;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.epofw_all_selection_btn .button:hover {
	background: #005a87;
	border-color: #005a87;
}

.epofw_rule_repeater {
	margin-bottom: 16px;
	width: 100%;
}

.epofw_rule_repeater_main {
	background: #fff;
	border-radius: 4px;
	padding: 16px;
	width: 100%;
}

/* Nested Rule Groups Structure (v4.4.4+) */
.epofw-rule-groups-container {
	display: flex;
	flex-direction: column;
	gap: 0;
	margin-bottom: 16px;
}

.epofw-group-logic-separator {
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 8px 0;
	padding: 8px 0;
	position: relative;
}

.epofw-group-logic-separator::before,
.epofw-group-logic-separator::after {
	content: '';
	position: absolute;
	top: 50%;
	width: calc(50% - 30px);
	height: 1px;
	background: #ddd;
}

.epofw-group-logic-separator::before {
	left: 0;
}

.epofw-group-logic-separator::after {
	right: 0;
}

.epofw-group-logic-text {
	display: inline-block;
	background: #f9f9f9;
	padding: 4px 12px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 12px;
	font-weight: 600;
	color: #0073aa;
	position: relative;
	z-index: 1;
	min-width: 50px;
	text-align: center;
}

.epofw-rule-group {
	border: 1px solid #ddd;
	border-radius: 4px;
	padding: 16px;
	background: #fff;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.epofw-group-header {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 8px;
	padding-bottom: 12px;
	border-bottom: 1px solid #e5e5e5;
}

.epofw-group-logic-label {
	font-size: 13px;
	color: #555;
	font-weight: 500;
	white-space: nowrap;
}

.epofw-group-logic {
	min-width: 100px;
	padding: 6px 8px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 13px;
	background: #fff;
	font-weight: 600;
	color: #0073aa;
}

.epofw-group-header .epofw-remove-group {
	margin-left: auto;
}

.epofw-conditions-container {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding-left: 20px;
	border-left: 2px solid #e5e5e5;
	margin-left: 8px;
}

.epofw-add-condition-action {
	margin-top: 8px;
	padding-left: 20px;
}

.epofw-add-condition-action .button {
	font-size: 13px;
	padding: 6px 12px;
	height: auto;
	line-height: 1.5;
}

.epofw-add-group-action {
	display: flex;
	align-items: center;
	gap: 8px;
	padding-top: 12px;
	border-top: 1px solid #e5e5e5;
	margin-top: 8px;
}

.epofw-add-group-action .epofw-add-group {
	font-size: 14px;
	padding: 8px 16px;
	height: auto;
	line-height: 1.5;
}

.epofw-groups-logic-label {
	font-size: 13px;
	color: #555;
	font-weight: 500;
	white-space: nowrap;
	margin-left: auto;
}

.epofw-logic-between-groups {
	min-width: 100px;
	padding: 6px 8px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 13px;
	background: #fff;
	font-weight: 600;
	color: #0073aa;
}

/* Nested condition rows styling */
.epofw-rule-group .additional_rule_ul {
	margin: 0;
}

.epofw-rule-group .epofw-remove-condition {
	padding: 4px 8px;
	font-size: 12px;
	height: auto;
	line-height: 1.4;
}

/* Icon styling for nested rule groups */
.epofw-icon.-minus::before,
.epofw-remove-group.epofw-icon.-minus::before,
.epofw-remove-condition.epofw-icon.-minus::before {
	content: '\f158';
	font-family: dashicons;
	font-size: 16px;
	line-height: 1;
	display: inline-block;
	vertical-align: middle;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.epofw-icon.-minus,
.epofw-remove-group.epofw-icon.-minus,
.epofw-remove-condition.epofw-icon.-minus {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: auto;
	height: auto;
	padding: 4px 8px;
}

/* Ensure icon buttons have proper spacing */
.epofw-group-header .epofw-remove-group {
	min-width: 30px;
	height: 30px;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

/* Conditional logic elements alignment */
.epofw_data_condition,
.epofw_data_operator,
.epofw_condition_field_data {
	display: flex;
	align-items: center;
}

/* Ensure proper spacing for the "and" button */
.epofw_rule_repeater .additional_rule_ul li:last-child {
	align-self: flex-start;
	margin-top: 8px;
}

/* Make the multi-select field expand to fill available space */
.epofw_condition_field_data .epofw_condition_data_class {
	flex: 1;
	min-width: 250px;
}

/* Consistent spacing like modals */
.epofw-builder-header {
	padding: 32px;
}

.epofw-builder-settings {
	gap: 24px;
}

.epofw-setting-field {
	gap: 24px;
}

.epofw-setting-field-wide .epofw-setting-label {
	margin-bottom: 16px;
	width: 100%;
}

.epofw-additional-rules-section {
	padding: 20px;
	margin-top: 8px;
}

.epofw_rule_repeater_main {
	padding: 20px;
}

.additional_rule_ul {
	gap: 16px;
}

.epofw_condition_field_data {
	gap: 12px;
	flex: 1;
	min-width: 0;
	display: flex;
	align-items: flex-start;
	flex-wrap: wrap;
}

.epofw_all_selection_btn {
	margin-top: 8px;
	gap: 12px;
	display: flex;
	justify-content: flex-start;
	align-items: center;
	width: 100%;
	flex-basis: 100%;
}

/* Professional styling for conditional elements */
.epofw_data_condition,
.epofw_data_operator {
	height: 50px;
	padding: 8px 12px;
	font-size: 14px;
	border: 1px solid #ddd;
	border-radius: 6px;
	background: #fff;
	box-shadow: 0 1px 2px rgba(0,0,0,0.05);
	min-width: 250px;
	width: auto;
	white-space: nowrap;
	overflow: visible;
	line-height: revert !important;
}

.epofw_data_condition option,
.epofw_data_operator option {
	padding: 8px 12px;
	white-space: nowrap;
	overflow: visible;
}

.epofw_condition_data_class {
	height: 50px !important;
	padding: 8px 12px !important;
	border: 1px solid #ddd !important;
	border-radius: 6px !important;
	background: #fff !important;
	box-shadow: 0 1px 2px rgba(0,0,0,0.05) !important;
	flex: 1;
	min-width: 300px !important;
	max-width: 400px !important;
	width: auto !important;
	white-space: nowrap;
	overflow: visible;
	line-height: revert !important;
}

/* Force Select2 container to match other dropdowns */
.select2-container--default .select2-selection--multiple {
	min-height: 50px !important;
	height: auto !important;
	border: 1px solid #ddd !important;
	border-radius: 6px !important;
	background: #fff !important;
	box-shadow: 0 1px 2px rgba(0,0,0,0.05) !important;
	width: 100%;
}

.select2-container--default .select2-selection--multiple .select2-selection__rendered {
	padding: 8px 12px !important;
	line-height: 1.4 !important;
}

/* Force Select2 container width */
.select2-container--default {
	width: 100% !important;
}

/* Override any Select2 width calculations */
.select2-container {
    width: 100% !important;
}

/* Force the actual select element width */
.epofw_condition_data_class.multiselect2 {
    width: 100% !important;
}

.epofw_all_selection_btn .button {
	padding: 6px 12px;
	font-size: 13px;
	height: 32px;
	border-radius: 6px;
	font-weight: 500;
	transition: all 0.2s ease;
}

.epofw_all_selection_btn .button:hover {
	background-color: #005a87;
	border-color: #005a87;
	transform: translateY(-1px);
	box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    color: #ffffff;
}

/* Field Layout - Status, Name, Additional Rules, Display Position */
.epofw-setting-field {
	margin-bottom: 20px;
}

.epofw-setting-field:last-child {
	margin-bottom: 0;
}

.epofw-setting-field-wide .epofw-setting-label {
	margin-bottom: 12px;
}

/* Responsive for Additional Rules - tablet/laptop screens */
@media (max-width: 1400px) {
	.epofw-additional-rules-field {
		flex-direction: column;
		gap: 12px;
	}

	.epofw-additional-rules-field .epofw-setting-label {
		width: 100%;
	}

	.epofw-additional-rules-field .epofw-setting-input {
		width: 100%;
	}

	.additional_rule_ul {
		flex-wrap: wrap;
	}

	.additional_rule_ul li {
		flex: 1 1 auto;
		min-width: 140px;
	}

	.epofw_condition_field_data {
		flex: 1 1 100%;
		min-width: 100%;
	}

	.epofw_condition_field_data .select2-container,
	.epofw_condition_field_data .multiselect2 {
		width: 100% !important;
	}
}

@media (max-width: 768px) {
	.epofw-builder-settings {
		grid-template-columns: 1fr;
	}

	.additional_rule_ul {
		flex-direction: column;
		align-items: stretch;
	}

	.additional_rule_ul li {
		width: 100%;
		min-width: 100%;
	}

	.epofw_data_condition,
	.epofw_data_operator {
		min-width: auto;
		width: 100%;
	}
}


/* Addon Builder Box Styles */
.epofw-general-settings-container,
.epofw-addon-builder-container {
	margin: 20px 0;
}

.epofw-configuration-box,
.epofw-builder-box {
	background: #fff;
	border: 1px solid #ccd0d4;
	border-radius: 4px;
	box-shadow: 0 1px 1px rgba(0,0,0,.04);
	margin-bottom: 30px;
	overflow: hidden;
}

.epofw-box-header {
	background: #f9f9f9;
	border-bottom: 1px solid #ccd0d4;
	padding: 15px 20px;
	gap: 1rem;
}

.epofw-accordion-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
}

.epofw-accordion-toggle {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: #2271b1;
	text-decoration: none;
	background: transparent;
	border: 0;
	padding: 0;
	cursor: pointer;
	box-shadow: none;
}

.epofw-accordion-toggle .dashicons {
	font-size: 18px;
	line-height: 1;
}

.epofw-accordion-toggle:focus {
	box-shadow: none;
	outline: none;
}

.epofw-accordion-toggle:focus-visible {
	box-shadow: none;
	outline: none;
}

.epofw-accordion-toggle.button-link:focus,
.epofw-accordion-toggle.button-link:focus-visible,
.epofw-accordion-toggle.button-link:active {
	box-shadow: none;
	outline: none;
	border: 0;
}

.epofw-accordion-toggle.button-link::-moz-focus-inner {
	border: 0;
}



.epofw-box-header.epofw-addon-conf {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.epofw-box-header-title {
	flex: 1;
}

.epofw-box-header h3 {
	margin: 0 0 8px 0;
	font-size: 16px;
	font-weight: 600;
	color: #23282d;
}

.epofw-box-header .epofw-tutorial-buttons {
	margin-top: 4px;
}

.epofw-box-description {
	margin: 0;
	font-size: 13px;
	color: #666;
	line-height: 1.4;
	font-weight: 400;
	padding: 0;
	opacity: 0.8;
}

.epofw-box-content {
	padding: 20px;
}

/* Configuration Box Specific Styles */
.epofw-configuration-box .epofw-setting-field {
	margin-bottom: 20px;
	display: flex;
	align-items: flex-start;
}

.epofw-configuration-box .epofw-setting-field:last-child {
	margin-bottom: 0;
}

.epofw-configuration-box .epofw-setting-label {
	width: 200px;
	flex-shrink: 0;
	padding-top: 5px;
}

.epofw-configuration-box .epofw-setting-label label {
	font-weight: 600;
	color: #23282d;
	margin: 0;
	display: block;
}

.epofw-field-description {
	margin: 8px 0 0 0;
	font-size: 13px;
	color: #666;
	line-height: 1.4;
	font-weight: 400;
	opacity: 0.8;
}

.epofw-configuration-box .epofw-setting-input {
	flex: 1;
}
.epofw-custom-css-setting-field .epofw-setting-input {
    border: 1px solid #dddddd;
}

.epofw-configuration-box .epofw-setting-input input[type="text"],
.epofw-configuration-box .epofw-setting-input select {
	width: 100%;
	max-width: 400px;
}

/* Builder Box Specific Styles */
.epofw-builder-box .epofw-builder-action-bar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
	padding-bottom: 20px;
	border-bottom: 1px solid #e5e5e5;
}

.epofw-builder-box .epofw-action-left {
	display: flex;
	gap: 10px;
}

.epofw-builder-box .epofw-action-right {
	display: flex;
	gap: 10px;
}

.epofw-builder-box .epofw-btn {
	padding: 8px 16px;
	border: 1px solid transparent;
	border-radius: 4px;
	font-size: 13px;
	font-weight: 500;
	text-decoration: none;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	transition: all 0.2s ease;
}

.epofw-builder-box .epofw-btn-primary {
	background: #0073aa;
	color: #fff;
	border-color: #0073aa;
}

.epofw-builder-box .epofw-btn-primary:hover {
	background: #005a87;
	border-color: #005a87;
}

.epofw-builder-box .epofw-btn-secondary {
	background: #f7f7f7;
	color: #555;
	border-color: #ccc;
}

.epofw-builder-box .epofw-btn-secondary:hover {
	background: #eee;
	border-color: #999;
}

.epofw-builder-box .epofw-builder-canvas {
	min-height: 200px;
	background: #fafafa;
	border: 1px solid #e5e5e5;
	border-radius: 4px;
	padding: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
	.epofw-configuration-box .epofw-setting-field {
		flex-direction: column;
	}
	
	.epofw-configuration-box .epofw-setting-label {
		width: 100%;
		margin-bottom: 8px;
	}
	
	.epofw-builder-box .epofw-builder-action-bar {
		flex-direction: column;
		gap: 15px;
		align-items: stretch;
	}
	
	.epofw-builder-box .epofw-action-left,
	.epofw-builder-box .epofw-action-right {
		justify-content: center;
	}
}


/* Fix for Additional Rules dropdown text cutoff */
.epofw_main_form_section .epofw_main_left_section .aditional_rules_section ul.additional_rule_ul li select {
	min-width: 120px;
	max-width: 200px;
	overflow: visible;
	text-overflow: clip;
	white-space: nowrap;
}

.epofw_main_form_section .epofw_main_left_section .aditional_rules_section ul.additional_rule_ul li select option {
	white-space: nowrap;
	overflow: visible;
}

/* Ensure proper spacing for Additional Rules dropdowns */
.epofw_main_form_section .epofw_main_left_section .aditional_rules_section ul.additional_rule_ul {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
}

.epofw_main_form_section .epofw_main_left_section .aditional_rules_section ul.additional_rule_ul li {
	display: inline-block;
	margin-right: 10px;
	flex-shrink: 0;
}

/* Specific fix for condition field data */
.epofw_main_form_section .epofw_main_left_section .aditional_rules_section ul.additional_rule_ul li.epofw_condition_field_data {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	min-width: 150px;
}

/* Fix for multiselect2 dropdowns */
.epofw_main_form_section .epofw_main_left_section .aditional_rules_section .multiselect2 {
	min-width: 200px;
	max-width: 300px;
}

/* Responsive styles for Additional Rules */
@media (max-width: 782px) {
	.epofw_main_form_section .epofw_main_left_section .aditional_rules_section ul.additional_rule_ul {
		flex-direction: column;
		align-items: stretch;
	}

	.epofw_main_form_section .epofw_main_left_section .aditional_rules_section ul.additional_rule_ul li {
		display: block;
		width: 100%;
		margin-right: 0;
		margin-bottom: 10px;
	}

	.epofw_main_form_section .epofw_main_left_section .aditional_rules_section ul.additional_rule_ul li select,
	.epofw_main_form_section .epofw_main_left_section .aditional_rules_section ul.additional_rule_ul li input {
		width: 100%;
		max-width: 100%;
	}

	.epofw_main_form_section .epofw_main_left_section .aditional_rules_section ul.additional_rule_ul li.epofw_condition_field_data {
		width: 100%;
		min-width: 100%;
	}

	.epofw_main_form_section .epofw_main_left_section .aditional_rules_section .multiselect2,
	.epofw_main_form_section .epofw_main_left_section .aditional_rules_section .select2-container {
		width: 100% !important;
		max-width: 100% !important;
		min-width: 100% !important;
	}

	/* Ensure rule remove button is properly positioned */
	.epofw_main_form_section .epofw_main_left_section .aditional_rules_section ul.additional_rule_ul li.condition_addbtn {
		width: auto;
		align-self: flex-end;
	}
}

/* Drag and Drop Styles for Builder */
.epofw-section-placeholder,
.epofw-element-placeholder,
.epofw-column-placeholder {
    background: #f0f6fc;
    border: 2px dashed var(--epofw-blue-500);
    border-radius: 4px;
    margin: 10px 0;
    height: 60px;
    opacity: 0.7;
}

.epofw-section-placeholder {
    height: 80px;
}

.epofw-element-placeholder {
    height: 50px;
}

.epofw-column-placeholder {
    height: 100px;
    min-width: 100px;
    flex: 1;
    margin: 0 5px;
}

/* Dragging state styles */
.epofw-section.dragging,
.epofw-element.dragging,
.epofw-column.dragging,
.epofw-row-container.dragging {
    opacity: 0.8;
    transform: rotate(2deg);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

/* Drag handle styles */
.epofw-section-drag,
.epofw-element-drag,
.epofw-column-drag {
    cursor: move;
    cursor: grab;
    padding: 8px;
    border-radius: 3px;
    transition: background-color 0.2s ease;
}

.epofw-section-drag:hover,
.epofw-element-drag:hover,
.epofw-column-drag:hover,
.epofw-columns-drag:hover {
    background-color: #f0f0f1;
}

.epofw-section-drag:active,
.epofw-element-drag:active,
.epofw-column-drag:active,
.epofw-columns-drag:active {
    cursor: grabbing;
    background-color: #dcdcde;
}

/* Columns Group Header Styles - Match Row Group Header */
.epofw-columns-header {
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #e5e5e5;
    position: relative;
    background: transparent;
    min-height: 50px;
}

.epofw-columns-drag {
    cursor: move;
    cursor: grab;
    padding: 4px;
    border-radius: 3px;
    color: #646970;
    transition: background-color 0.2s ease;
    margin-right: 0;
}

.epofw-columns-drag:hover {
    background: #e0e0e0;
    color: #333;
}

.epofw-columns-title {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-grow: 1;
    font-weight: 500;
    color: #333;
}

.epofw-columns-title .dashicons {
    color: #0073aa;
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.epofw-columns-actions {
    display: flex;
    gap: 5px;
}

.epofw-columns-actions button {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #646970;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.epofw-columns-actions button:hover {
    background-color: #fff;
    color: #d63638;
}

.epofw-columns-content {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 15px;
    background: #fff;
    border-radius: 0 0 4px 4px;
}

/* Columns container (columns_group) styles */
/* Duplicate .epofw-columns definition removed - see line 7077 for main definition */

.epofw-columns.dragging {
    opacity: 0.8;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

/* Columns placeholder for drag-drop */
.epofw-columns-placeholder {
    background: #f0f6fc;
    border: 2px dashed var(--epofw-blue-500);
    border-radius: 4px;
    margin-bottom: 15px;
    min-height: 80px;
    opacity: 0.7;
}

/* Visual feedback during drag operations */
.epofw-sections-container.ui-sortable-helper,
.epofw-elements-container.ui-sortable-helper {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Sortable container styles */
.epofw-sections-container.ui-sortable,
.epofw-elements-container.ui-sortable {
    min-height: 20px;
}

/* Ensure proper spacing during drag operations */
.epofw-section.ui-sortable-helper + .epofw-section,
.epofw-element.ui-sortable-helper + .epofw-element {
    margin-top: 10px;
}

/* Editable Section Title Styles */
.epofw-section-title span {
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 3px;
    transition: background-color 0.2s ease;
}

.epofw-section-title span:hover {
    background-color: #f0f0f1;
}

.epofw-section-title span:active {
    background-color: #dcdcde;
}

.epofw-section-title-edit {
    background: #fff;
    border: 2px solid var(--epofw-blue-500);
    border-radius: 3px;
    padding: 4px 8px;
    font-size: inherit;
    font-weight: inherit;
    font-family: inherit;
    color: inherit;
    min-width: 150px;
    outline: none;
    box-shadow: 0 0 0 1px var(--epofw-blue-500);
}

.epofw-section-title-edit:focus {
    border-color: var(--epofw-blue-500);
    box-shadow: 0 0 0 1px var(--epofw-blue-500);
}

/* Fix for Options Drag and Drop - Clean Flexbox Layout */
.epofw-options-container.ui-sortable {
    min-height: 20px;
}

.epofw-option-row {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    padding: 15px !important;
    border: 1px solid #dcdcde !important;
    border-radius: 6px !important;
    background: #fff !important;
    margin-bottom: 10px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    transition: box-shadow 0.2s ease !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.epofw-option-row:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15) !important;
}

/* Drag handle styling */
.epofw-option-row .heading_nu_move {
    flex-shrink: 0 !important;
    width: 32px !important;
    height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: move !important;
    cursor: grab !important;
    background-color: #f0f0f1 !important;
    border: 1px solid #dcdcde !important;
    border-radius: 4px !important;
    transition: all 0.2s ease !important;
}

.epofw-option-row .heading_nu_move:hover {
    background-color: #e5e5e5 !important;
    border-color: #c3c4c7 !important;
    transform: scale(1.05) !important;
}

.epofw-option-row .heading_nu_move:active {
    cursor: grabbing !important;
    background-color: #dcdcde !important;
    border-color: #8c8f94 !important;
    transform: scale(0.95) !important;
}

.epofw-option-row .heading_nu_move i {
    font-size: 16px !important;
    color: #50575e !important;
    line-height: 1 !important;
}

/* Form controls - flexible width - override existing styles */
.epofw-option-row input.epofw-form-control,
.epofw-option-row select.epofw-form-control {
    flex: 1 !important;
    min-width: 0 !important;
    max-width: none !important;
    width: auto !important;
    border: 1px solid #dcdcde !important;
    border-radius: 4px !important;
    padding: 8px 12px !important;
    font-size: 14px !important;
    transition: border-color 0.2s ease !important;
    margin: 0 !important;
    float: none !important;
    display: block !important;
}

.epofw-option-row input.epofw-form-control:focus,
.epofw-option-row select.epofw-form-control:focus {
    border-color: var(--epofw-blue-500) !important;
    outline: none !important;
    box-shadow: 0 0 0 1px var(--epofw-blue-500) !important;
}

/* Specific override for select elements */
.epofw-option-row select.epofw-form-control {
    background: #fff !important;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%20%3D%20%2220%22%20height%20%3D%20%2220%22%20xmlns%20%3D%20%22http%3A//www.w3.org/2000/svg%22%3E%3Cpath%20d%20%3D%20%22M5%206l5%205%205-5%202%201-7%207-7-7%202-1z%22%20fill%20%3D%20%22%23555%22/%3E%3C/svg%3E") !important;
    background-position: right 8px center !important;
    background-repeat: no-repeat !important;
    background-size: 16px !important;
    padding-right: 32px !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
}

/* Delete button - fixed width */
.epofw-option-row .epofw-remove-option {
    flex-shrink: 0 !important;
    width: 32px !important;
    height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-color: #dc3232 !important;
    border: 1px solid #dc3232 !important;
    border-radius: 4px !important;
    color: #fff !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    margin: 0 !important;
    float: none !important;
}

.epofw-option-row .epofw-remove-option:hover {
    background-color: #a00 !important;
    border-color: #a00 !important;
    transform: scale(1.05) !important;
}

.epofw-option-row .epofw-remove-option:active {
    transform: scale(0.95) !important;
}

.epofw-option-row .epofw-remove-option i {
    font-size: 16px !important;
    line-height: 1 !important;
}

/* Options container - no padding needed */
.epofw-options-container {
    padding: 0 !important;
    position: relative !important;
    width: 100% !important;
}

/* Placeholder for options drag and drop */
.epofw-options-container .sortable-placeholder {
    background: #f0f6fc !important;
    border: 2px dashed var(--epofw-blue-500) !important;
    border-radius: 6px !important;
    margin: 8px 0 !important;
    height: 50px !important;
    opacity: 0.8 !important;
}

/* Dragging state for options */
.epofw-option-row.dragging {
    opacity: 0.9 !important;
    transform: rotate(1deg) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    z-index: 1000 !important;
}

/* Force override any conflicting grid or table styles */
.epofw-option-row.opt-li {
    display: flex !important;
    grid-template-columns: none !important;
    table-layout: auto !important;
}

/* Force override the specific conflicting grid rule */
.epofw-form-group.epofw-full-width .epofw-option-row {
    display: flex !important;
    grid-template-columns: none !important;
    grid-template-areas: none !important;
    grid-template-rows: none !important;
    grid-auto-columns: auto !important;
    grid-auto-rows: auto !important;
    grid-auto-flow: row !important;
    grid: none !important;
}

/* Additional specificity to override any remaining grid styles */
.epofw-options-container .epofw-option-row,
.epofw-options-container .epofw-option-row.opt-li,
.epofw-options-container .epofw-option-row.ui-sortable-helper {
    display: flex !important;
    grid: none !important;
    grid-template: none !important;
    grid-template-columns: none !important;
    grid-template-rows: none !important;
    grid-template-areas: none !important;
    grid-auto-columns: auto !important;
    grid-auto-rows: auto !important;
    grid-auto-flow: row !important;
    gap: 15px !important;
    align-items: center !important;
    padding: 15px !important;
    border: 1px solid #dcdcde !important;
    border-radius: 6px !important;
    background: #fff !important;
    margin-bottom: 10px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    transition: box-shadow 0.2s ease !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Ensure all direct children use flexbox properly */
.epofw-options-container .epofw-option-row > * {
    flex-shrink: 0 !important;
    margin: 0 !important;
    float: none !important;
}

.epofw-options-container .epofw-option-row > .heading_nu_move {
    flex-shrink: 0 !important;
    width: 32px !important;
    height: 32px !important;
}

.epofw-options-container .epofw-option-row > input.epofw-form-control,
.epofw-options-container .epofw-option-row > select.epofw-form-control {
    flex: 1 !important;
    min-width: 0 !important;
    max-width: none !important;
    width: auto !important;
}

.epofw-options-container .epofw-option-row > .epofw-remove-option {
    flex-shrink: 0 !important;
    width: 32px !important;
    height: 32px !important;
}

/* Imageswitcher File Upload Field Styling */
.epofw-options-container .epofw-option-row > .epofw-file-upload-field {
    flex-shrink: 0 !important;
    width: 200px !important;
    min-width: 200px !important;
}

.epofw-file-upload-field .file-upload {
    position: relative;
    width: 100%;
}

.epofw-file-upload-field .file-select {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.epofw-file-upload-field .file-select-button {
    background: #f0f0f1;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    padding: 8px 12px;
    text-align: center;
    cursor: pointer;
    font-size: 13px;
    color: #2c3338;
    transition: all 0.2s ease;
    user-select: none;
}

.epofw-file-upload-field .file-select-button:hover {
    background: #e5e5e5;
    border-color: #646970;
}

.epofw-file-upload-field .file-select-name {
    font-size: 12px;
    color: #646970;
    text-align: center;
    padding: 4px 8px;
    background: #f6f7f7;
    border-radius: 3px;
    min-height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    word-break: break-word;
}

.epofw-file-upload-field .file-upload.active .file-select-name {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.epofw-file-upload-field input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.epofw-file-upload-field .epofw-image-preview {
    margin-top: 8px;
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    border-radius: 4px;
    background: #f8f9fa;
    padding: 8px;
    border: 1px solid #e9ecef;
}

.epofw-file-upload-field .epofw-image-preview img {
    max-width: 100%;
    height: auto;
    max-height: 120px;
    border-radius: 4px;
    border: 1px solid #dcdcde;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    object-fit: cover;
    display: block;
    margin: 0 auto;
}

/* Ensure the file upload field maintains proper sizing */
.epofw-options-container .epofw-option-row > .epofw-file-upload-field {
    flex-shrink: 0 !important;
    width: 200px !important;
    min-width: 200px !important;
    max-width: 200px !important;
    overflow: hidden;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
    .epofw-options-container .epofw-option-row {
        flex-wrap: wrap !important;
        gap: 10px !important;
        padding: 12px !important;
    }
    
    .epofw-options-container .epofw-option-row > .epofw-file-upload-field {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        order: 2;
    }
    
    .epofw-options-container .epofw-option-row > .heading_nu_move {
        order: 1;
    }
    
    .epofw-options-container .epofw-option-row > input.epofw-form-control,
    .epofw-options-container .epofw-option-row > select.epofw-form-control {
        order: 3;
        min-width: calc(50% - 5px) !important;
    }
    
    .epofw-options-container .epofw-option-row > .epofw-remove-option {
        order: 4;
    }
    
    .epofw-file-upload-field .epofw-image-preview img {
        max-height: 100px;
    }
}

/* Colorswitcher Color Picker Field Styling */
.epofw-options-container .epofw-option-row > .epofw-color-picker-field {
    flex-shrink: 0 !important;
    width: 120px !important;
    min-width: 120px !important;
    margin: 0 !important;
    padding: 0 !important;
}

.epofw-color-picker-field .epofw-native-color-picker {
    width: 100% !important;
    height: 38px !important;
    padding: 4px !important;
    border: 1px solid #8c8f94 !important;
    border-radius: 4px !important;
    background: #fff !important;
    cursor: pointer !important;
    transition: border-color 0.2s ease !important;
    margin: 0 !important;
}

.epofw-color-picker-field .epofw-native-color-picker:focus {
    border-color: var(--epofw-blue-500) !important;
    box-shadow: 0 0 0 1px var(--epofw-blue-500) !important;
    outline: none !important;
}

.epofw-color-picker-field .epofw-native-color-picker:hover {
    border-color: var(--epofw-blue-500) !important;
}

/* Native Color Picker Customization */
.epofw-color-picker-field .epofw-native-color-picker::-webkit-color-swatch-wrapper {
    padding: 0 !important;
}

.epofw-color-picker-field .epofw-native-color-picker::-webkit-color-swatch {
    border: none !important;
    border-radius: 2px !important;
}

.epofw-color-picker-field .epofw-native-color-picker::-moz-color-swatch {
    border: none !important;
    border-radius: 2px !important;
}

.epofw-color-picker-field .epofw-native-color-picker::-moz-color-swatch {
    border: none !important;
    border-radius: 2px !important;
}

/* Ensure proper color picker display */
.epofw-native-color-picker[type="color"] {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    background: transparent !important;
}

.epofw-native-color-picker[type="color"]::-webkit-color-swatch {
    border: 2px solid #8c8f94 !important;
    border-radius: 4px !important;
    padding: 0 !important;
}

.epofw-native-color-picker[type="color"]::-moz-color-swatch {
    border: 2px solid #8c8f94 !important;
    border-radius: 4px !important;
    padding: 0 !important;
}

/* Remove any default browser styling */
.epofw-native-color-picker[type="color"]::-webkit-calendar-picker-indicator {
    display: none !important;
}

/* Force proper color picker dimensions */
.epofw-native-color-picker[type="color"] {
    min-width: 60px !important;
    min-height: 38px !important;
}

/* Ensure color picker field has no extra spacing */
.epofw-color-picker-field {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 !important;
}

/*--------------------------------------------------------------
# Product Group Addon - Admin Builder
--------------------------------------------------------------*/
.epofw-productgroup-options {
    margin-bottom: var(--epofw-space-md);
}

.epofw-productgroup-options .epofw-field-description-full-width {
    margin-bottom: var(--epofw-space-sm);
}

.epofw-productgroup-option-row.epofw-option-row.opt-li {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
}

/* Fixed width for product selection column (consistent across rows). */
.epofw-productgroup-option-row .epofw-product-search-cell {
    flex: 0 0 220px !important;
    width: 220px !important;
    min-width: 220px !important;
    max-width: 220px !important;
}

.epofw-productgroup-option-row .epofw-product-search-cell .epofw-wc-product-search,
.epofw-productgroup-option-row .epofw-product-search-cell .select2-container {
    min-width: 220px !important;
    width: 100% !important;
    max-width: 220px !important;
}

/* Fixed width for custom label column (consistent across rows). */
.epofw-productgroup-option-row .epofw-option-label {
    flex: 0 0 160px !important;
    width: 160px !important;
    min-width: 160px !important;
    max-width: 160px !important;
}

.epofw-productgroup-option-row .epofw-option-label input.epofw-form-control {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Fixed width for price type so "Percentage of Product Price" doesn't stretch the row. */
.epofw-productgroup-option-row .epofw-option-price-type {
    flex: 0 0 180px !important;
    width: 180px !important;
    min-width: 180px !important;
    max-width: 180px !important;
}

.epofw-productgroup-option-row .epofw-option-price-type select.epofw-form-control {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.epofw-productgroup-option-row .epofw-option-price {
    flex: 0 0 90px !important;
    width: 90px !important;
    min-width: 90px !important;
    max-width: 90px !important;
}

.epofw-productgroup-general-settings .epofw-form-group {
    margin-bottom: var(--epofw-space-lg);
}

.epofw-add-productgroup-option {
    margin-top: var(--epofw-space-sm);
}

/* Form Validation Styles */
.epofw-form-control.epofw-error {
    border-color: #dc3232 !important;
    box-shadow: 0 0 0 1px #dc3232 !important;
    background-color: #fff !important;
}

.epofw-error-message {
    color: #dc3232;
    font-size: 12px;
    margin-top: 8px;
    margin-bottom: 12px;
    display: block;
    padding: 8px 12px;
    background: #fef7f7;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    font-weight: 500;
    width: 100%;
    box-sizing: border-box;
    clear: both;
}

.epofw-error-message::before {
    content: "⚠ ";
    font-size: 14px;
    color: #dc3232;
    margin-right: 4px;
}

/* Tab Error Indicator */
.epofw-tab-btn.epofw-tab-error {
    position: relative;
    border-bottom: 3px solid #dc3232 !important;
    color: #dc3232 !important;
    background-color: transparent !important;
    box-shadow: none !important;
}

.epofw-tab-btn.epofw-tab-error:hover {
    background-color: #fef0f0 !important;
    border-bottom: 3px solid #dc3232 !important;
}

/* Focus states for error fields */
.epofw-form-control.epofw-error:focus {
    border-color: #dc3232 !important;
    box-shadow: 0 0 0 1px #dc3232 !important;
}

/* Smooth transitions for validation states */
.epofw-form-control,
.epofw-tab-btn {
    transition: all 0.2s ease;
}

/* Ensure all tab buttons share the same design (no extra arrow or pseudo-content). */
.epofw-settings-tabs .epofw-tab-btn::before,
.epofw-settings-tabs .epofw-tab-btn::after {
    content: none !important;
    display: none !important;
}

/* Prevent Select2 or other dropdowns inside conditional logic tab from visually leaking into tab bar when tab is inactive. */
.epofw-tab-content[data-tab="conditional-logic"]:not(.active) {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    visibility: hidden !important;
}

.epofw-tab-content[data-tab="conditional-logic"].active {
    position: static !important;
    left: auto !important;
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
    clip: auto !important;
    visibility: visible !important;
}

/* Error state for specific field types */
.epofw-form-control.epofw-error[type="color"] {
    border-color: #dc3232 !important;
    box-shadow: 0 0 0 1px #dc3232 !important;
}

.epofw-form-control.epofw-error[type="color"]::-webkit-color-swatch {
    border-color: #dc3232 !important;
}

.epofw-form-control.epofw-error[type="color"]::-moz-color-swatch {
    border-color: #dc3232 !important;
}

/* Ensure form layout stability */
.epofw-field-input {
    position: relative;
}

/* Basic error styling for form controls */
.epofw-form-control.epofw-error {
    border-color: #dc3232 !important;
    box-shadow: 0 0 0 1px #dc3232 !important;
    background-color: #fff !important;
}

/* Validation Summary */
.epofw-validation-summary {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.epofw-validation-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-weight: 600;
    color: #856404;
}

.epofw-validation-header .dashicons {
    font-size: 18px;
    color: #f39c12;
}

.epofw-validation-details p {
    margin: 4px 0;
    color: #856404;
    font-size: 13px;
}

/* Basic error styling for form controls */
.epofw-form-control.epofw-error {
    border-color: #dc3232 !important;
    box-shadow: 0 0 0 1px #dc3232 !important;
    background-color: #fff !important;
}

/* More specific error styling to override theme conflicts */
.epofw-field-input .epofw-form-control.epofw-error,
.epofw-form-group .epofw-form-control.epofw-error,
input.epofw-form-control.epofw-error,
select.epofw-form-control.epofw-error,
textarea.epofw-form-control.epofw-error {
    border: 2px solid #dc3232 !important;
    border-color: #dc3232 !important;
    box-shadow: 0 0 0 1px #dc3232 !important;
    background-color: #fff !important;
    outline: none !important;
}

/* Maximum specificity to override any conflicting styles */
.epofw-modal-content .epofw-field-input .epofw-form-control.epofw-error,
.epofw-modal-content .epofw-form-group .epofw-form-control.epofw-error,
.epofw-modal-content input.epofw-form-control.epofw-error,
.epofw-modal-content select.epofw-form-control.epofw-error,
.epofw-modal-content textarea.epofw-form-control.epofw-error {
    border: 2px solid #dc3232 !important;
    border-color: #dc3232 !important;
    box-shadow: 0 0 0 1px #dc3232 !important;
    background-color: #fff !important;
    outline: none !important;
}

/* Debug: Force red border with maximum specificity */
.epofw-modal-content .epofw-form-group .epofw-field-input input.epofw-form-control.epofw-error,
.epofw-modal-content .epofw-form-group .epofw-field-input select.epofw-form-control.epofw-error,
.epofw-modal-content .epofw-form-group .epofw-field-input textarea.epofw-form-control.epofw-error {
    border: 1px solid #dc3232 !important;
    border-color: #dc3232 !important;
    box-shadow: 0 0 0 1px #dc3232 !important;
    background-color: #fff !important;
    outline: none !important;
}

/* Custom Price Formula Info Styling - Maximum specificity to override theme conflicts */
.epofw-custom-price-formula-info,
.epofw-form-group.epofw-custom-price-formula-info,
.epofw-modal-content .epofw-custom-price-formula-info,
.epofw-modal-content .epofw-form-group.epofw-custom-price-formula-info,
.epofw-tab-content .epofw-custom-price-formula-info,
.epofw-tab-content .epofw-form-group.epofw-custom-price-formula-info {
    margin-top: 20px !important;
    padding: 20px !important;
    background: #f9f9f9 !important;
    border: 1px solid #e1e1e1 !important;
    border-radius: 4px !important;
    display: none !important; /* Force hide by default with maximum specificity */
}

.epofw-shortcode-examples {
    margin-top: 15px;
}

.epofw-shortcode-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.epofw-shortcode-item:last-child {
    border-bottom: none;
}

.epofw-shortcode-input {
    flex: 0 0 25%;
    margin-right: 15px;
}

.epofw-shortcode-display {
    background: #fff !important;
    border: 1px solid #ddd !important;
    font-family: monospace !important;
    font-size: 13px !important;
    color: #333 !important;
    cursor: text !important;
}

.epofw-shortcode-description {
    flex: 0 0 72%;
    color: #666;
    font-size: 13px;
    line-height: 1.4;
}

/* Slider Formula Examples Styling */
.epofw-slider-formula-examples {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.epofw-slider-formula-examples h4 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.epofw-formula-item {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    padding: 12px;
    background: #ffffff;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
}

.epofw-formula-item:hover {
    border-color: #0073aa;
    box-shadow: 0 2px 8px rgba(0, 115, 170, 0.1);
}

.epofw-formula-input {
    flex: 0 0 40%;
    margin-right: 16px;
}

.epofw-formula-input input {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 13px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #495057;
}

.epofw-formula-description {
    flex: 1;
    color: #666;
    font-size: 13px;
    line-height: 1.4;
}

.epofw-formula-description strong {
    color: #333;
    font-weight: 600;
}

.epofw-formula-note {
    margin-top: 20px;
    padding: 12px 16px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    color: #856404;
    font-size: 13px;
    line-height: 1.4;
}

.epofw-formula-note strong {
    color: #856404;
}

/* Slider Variables Styling */
.epofw-slider-variables {
    margin: 16px 0;
    padding: 16px;
    background: #e3f2fd;
    border-radius: 6px;
    border-left: 4px solid #2196f3;
}

.epofw-variable-item {
    margin-bottom: 8px;
    color: #1976d2;
    font-size: 13px;
    line-height: 1.4;
}

.epofw-variable-item:last-child {
    margin-bottom: 0;
}

.epofw-variable-item code {
    background: #ffffff;
    color: #d32f2f;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 12px;
    font-weight: 600;
}

/* Responsive styling for slider formula examples */
@media (max-width: 768px) {
    .epofw-slider-formula-examples {
        padding: 16px;
        margin-top: 16px;
    }
    
    .epofw-formula-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px;
    }
    
    .epofw-formula-input {
        flex: none;
        width: 100%;
        margin-right: 0;
        margin-bottom: 12px;
    }
    
    .epofw-formula-description {
        width: 100%;
    }
    
    .epofw-slider-variables {
        padding: 12px;
        margin: 12px 0;
    }
}

/* Show only when explicitly shown - Maximum specificity to override theme conflicts */
.epofw-custom-price-formula-info.show,
.epofw-form-group.epofw-custom-price-formula-info.show,
.epofw-modal-content .epofw-custom-price-formula-info.show,
.epofw-modal-content .epofw-form-group.epofw-custom-price-formula-info.show,
.epofw-tab-content .epofw-custom-price-formula-info.show,
.epofw-tab-content .epofw-form-group.epofw-custom-price-formula-info.show,
.epofw-custom-price-formula-info.active,
.epofw-form-group.epofw-custom-price-formula-info.active,
.epofw-modal-content .epofw-custom-price-formula-info.active,
.epofw-modal-content .epofw-form-group.epofw-custom-price-formula-info.active,
.epofw-tab-content .epofw-custom-price-formula-info.active,
.epofw-tab-content .epofw-form-group.epofw-custom-price-formula-info.active {
    display: block !important;
}

/* Additional overrides to prevent flexbox/grid conflicts */
.epofw-custom-price-formula-info,
.epofw-form-group.epofw-custom-price-formula-info {
    flex: none !important;
    flex-basis: auto !important;
    flex-grow: 0 !important;
    flex-shrink: 0 !important;
    order: unset !important;
    grid-area: unset !important;
    grid-column: unset !important;
    grid-row: unset !important;
}

/* Dynamic Pricing Fields - Hidden by default, shown with .active class */
.epofw-dynamic-pricing-field,
.epofw-dynamic-unit-qty-field,
.epofw-dynamic-base-qty-field,
.epofw-custom-pricing-info,
.epofw-dynamic-pricing-info,
.epofw-dynamic-excl-pricing-info {
    display: none !important;
}

/* Dynamic pricing form fields - use flex to match other form groups */
.epofw-dynamic-pricing-field.active,
.epofw-dynamic-unit-qty-field.active,
.epofw-dynamic-base-qty-field.active,
.epofw-modal-content .epofw-dynamic-pricing-field.active,
.epofw-modal-content .epofw-dynamic-unit-qty-field.active,
.epofw-modal-content .epofw-dynamic-base-qty-field.active,
.epofw-tab-content .epofw-dynamic-pricing-field.active,
.epofw-tab-content .epofw-dynamic-unit-qty-field.active,
.epofw-tab-content .epofw-dynamic-base-qty-field.active {
    display: flex !important;
}

/* Info boxes - use block display */
.epofw-custom-pricing-info.active,
.epofw-dynamic-pricing-info.active,
.epofw-dynamic-excl-pricing-info.active,
.epofw-modal-content .epofw-custom-pricing-info.active,
.epofw-modal-content .epofw-dynamic-pricing-info.active,
.epofw-modal-content .epofw-dynamic-excl-pricing-info.active,
.epofw-tab-content .epofw-custom-pricing-info.active,
.epofw-tab-content .epofw-dynamic-pricing-info.active,
.epofw-tab-content .epofw-dynamic-excl-pricing-info.active {
    display: block !important;
}

/* Dynamic pricing fields - ensure full width like other fields */
.epofw-dynamic-unit-qty-field .epofw-field-input,
.epofw-dynamic-base-qty-field .epofw-field-input {
    width: 100% !important;
}

.epofw-dynamic-unit-qty-field .epofw-field-input input,
.epofw-dynamic-base-qty-field .epofw-field-input input {
    width: 100% !important;
    max-width: 100% !important;
}

.epofw-logical-field-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 10px !important;
    margin-bottom: 15px !important;
}
.epofw-logical-field-row > div {
    flex: 1 !important;
    min-width: 0 !important;
}
.epofw-logical-field-row .opt-action {
    flex: 0 0 auto !important;
    width: auto !important;
}
.epofw-logical-field-row .epofw-form-control {
	width: 100% !important;
}

/* Additional CSS to ensure horizontal layout for advanced datepicker */
.epofw_apodp_logical_field_group.epofw-logical-field-row {
	display: flex !important;
	flex-direction: row !important;
	align-items: center !important;
	gap: 10px !important;
	margin-bottom: 15px !important;
	flex-wrap: nowrap !important;
}

.epofw_apodp_logical_field_group.epofw-logical-field-row > div {
	flex: 1 !important;
	min-width: 0 !important;
	max-width: none !important;
}

.epofw_apodp_logical_field_group.epofw-logical-field-row .opt-action {
	flex: 0 0 auto !important;
	width: auto !important;
	min-width: auto !important;
}

/* Modern Switch Field Styling */
.epofw-switch-icon-picker {
    width: 100%;
}

.epofw-switch-icon-picker input[type="text"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.4;
    background-color: #ffffff;
    transition: all 0.2s ease;
}

.epofw-switch-icon-picker input[type="text"]:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
    outline: none;
}

/* Modern icon picker wrapper styling */
.epofw-icon-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.epofw-icon-picker-wrapper input[type="text"] {
    flex: 1;
    min-width: 0;
}

.epofw-icon-picker-wrapper .epofw-button-group {
    display: flex;
    gap: 4px;
}

.epofw-icon-picker-wrapper .epofw-btn {
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #ffffff;
    color: #666;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
}

.epofw-icon-picker-wrapper .epofw-btn:hover {
    border-color: #0073aa;
    background-color: #f8f9fa;
    color: #0073aa;
}

.epofw-icon-picker-wrapper .epofw-btn:active {
    transform: translateY(1px);
}

/* Icon picker button specific styling */
.epofw-icon-picker-button {
    background: #0073aa !important;
    color: #ffffff !important;
    border-color: #0073aa !important;
}

.epofw-icon-picker-button:hover {
    background: #005a87 !important;
    border-color: #005a87 !important;
}

/* Remove button styling */
.epofw-icon-picker-wrapper .epofw-btn-remove {
    background: #dc3545 !important;
    color: #ffffff !important;
    border-color: #dc3545 !important;
}

.epofw-icon-picker-wrapper .epofw-btn-remove:hover {
    background: #c82333 !important;
    border-color: #c82333 !important;
}

/* Switch color picker styling */
.epofw-switch-color-picker {
    position: relative;
}

.epofw-switch-color-picker input[type="color"] {
    width: 100%;
    height: 40px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.epofw-switch-color-picker input[type="color"]:hover {
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

.epofw-switch-color-picker input[type="color"]:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
    outline: none;
}

/* Switch toggle styling */
.epofw-switch-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.epofw-switch-toggle input[type="checkbox"] {
    opacity: 0;
    width: 0;
    height: 0;
}

.epofw-switch-toggle .toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 24px;
}

.epofw-switch-toggle .toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.epofw-switch-toggle input:checked + .toggle-slider {
    background-color: #0073aa;
}

.epofw-switch-toggle input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

/* Switch field group styling */
.epofw-switch-field-group {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.epofw-switch-field-group .epofw-field-label {
    margin-bottom: 12px;
}

.epofw-switch-field-group .epofw-field-description {
    color: #666;
    font-size: 13px;
    line-height: 1.4;
    margin-top: 4px;
}

/* Switch layout and animation options styling */
.epofw-switch-layout,
.epofw-switch-animation {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background-color: #ffffff;
    transition: all 0.2s ease;
}

.epofw-switch-layout:focus,
.epofw-switch-animation:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
    outline: none;
}

/* Toggle switch styling */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    margin-left: 12px;
}

.toggle-switch input[type="checkbox"] {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-switch .toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 24px;
}

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

.toggle-switch input:checked + .toggle-slider {
    background-color: #0073aa;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

/* Enhanced color input styling */
.epofw-form-group input[type="color"] {
    width: 100%;
    height: 40px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #ffffff;
}

.epofw-form-group input[type="color"]:hover {
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

.epofw-form-group input[type="color"]:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
    outline: none;
}

/* Switch field label enhancement */
.epofw-form-group:has(.epofw-switch-icon-picker) .epofw-field-label,
.epofw-form-group:has(.epofw-switch-layout) .epofw-field-label,
.epofw-form-group:has(.epofw-switch-animation) .epofw-field-label,
.epofw-form-group:has(input[type="color"]) .epofw-field-label {
    margin-bottom: 16px;
}

.epofw-form-group:has(.epofw-switch-icon-picker) .epofw-field-label label,
.epofw-form-group:has(.epofw-switch-layout) .epofw-field-label label,
.epofw-form-group:has(.epofw-switch-animation) .epofw-field-label label,
.epofw-form-group:has(input[type="color"]) .epofw-field-label label {
    font-weight: 600;
    color: #333;
    font-size: 15px;
}

/* Switch field description enhancement */
.epofw-form-group:has(.epofw-switch-icon-picker) .epofw-field-description,
.epofw-form-group:has(.epofw-switch-layout) .epofw-field-description,
.epofw-form-group:has(.epofw-switch-animation) .epofw-field-description,
.epofw-form-group:has(input[type="color"]) .epofw-field-description {
    color: #666;
    font-size: 13px;
    line-height: 1.5;
    margin-top: 6px;
}

/* Icon picker input enhancement */
.epofw-icon-picker-wrapper input[type="text"] {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
    background: #ffffff;
    transition: all 0.2s ease;
}

.epofw-icon-picker-wrapper input[type="text"]:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
    outline: none;
}

/* Button group enhancement */
.epofw-button-group {
    gap: 6px;
}

.epofw-button-group .epofw-btn {
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.epofw-button-group .epofw-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Color picker enhancement */
.epofw-form-group input[type="color"] {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    height: 44px;
    transition: all 0.2s ease;
}

.epofw-form-group input[type="color"]:hover {
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.epofw-form-group input[type="color"]:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.2);
}

.epofw_apodp_logical_field_group.epofw-logical-field-row .epofw-form-control {
	width: 100% !important;
	min-width: 0 !important;
}

/* Force inline display for all child elements */
.epofw_apodp_logical_field_group.epofw-logical-field-row .epofw-logical-field-option,
.epofw_apodp_logical_field_group.epofw-logical-field-row .epofw-logical-field-start-date,
.epofw_apodp_logical_field_group.epofw-logical-field-row .epofw-logical-field-end-date,
.epofw_apodp_logical_field_group.epofw-logical-field-row .epofw-logical-field-price {
	display: inline-block !important;
	vertical-align: middle !important;
	float: none !important;
	clear: none !important;
}

/* Fix datepicker dropdown positioning and visibility */
.ui-datepicker {
	z-index: 999999 !important;
	max-height: none !important;
	overflow: visible !important;
}

.ui-datepicker .ui-datepicker-header {
	position: relative !important;
	overflow: visible !important;
}

.ui-datepicker .ui-datepicker-title {
	overflow: visible !important;
}

.ui-datepicker select.ui-datepicker-month,
.ui-datepicker select.ui-datepicker-year {
	position: relative !important;
	z-index: 1000000 !important;
	overflow: visible !important;
	max-height: none !important;
}

/* Ensure datepicker is above all other elements */
.ui-datepicker.ui-datepicker-popup {
	z-index: 999999 !important;
	position: absolute !important;
}

/* Fix for modal context */
.epofw-element-modal .ui-datepicker,
.epofw-section-modal .ui-datepicker {
	z-index: 999999 !important;
}

/* Ensure proper positioning in advanced datepicker context */
.epofw_apodp_logical_field_group .ui-datepicker {
	z-index: 999999 !important;
	position: absolute !important;
}

/* Time input field styling */
.epofw-time-input {
	width: 100% !important;
	padding: 8px 12px !important;
	border: 1px solid #ddd !important;
	border-radius: 4px !important;
	font-size: 14px !important;
	line-height: 1.4 !important;
}

.epofw-time-input:focus {
	border-color: #0073aa !important;
	box-shadow: 0 0 0 1px #0073aa !important;
	outline: none !important;
}

.time-format-indicator {
	display: inline-block !important;
	margin-left: 8px !important;
	color: #666 !important;
	font-size: 12px !important;
	font-style: italic !important;
}

/* Ensure time inputs work properly in form groups */
.epofw-form-group .epofw-time-input {
	margin-bottom: 0 !important;
}

/* Responsive time input */
@media (max-width: 768px) {
	.epofw-time-input {
		font-size: 16px !important; /* Prevents zoom on iOS */
	}
}

/* Additional time input enhancements */
.epofw-time-input::-webkit-calendar-picker-indicator {
	background-color: transparent;
	cursor: pointer;
}

.epofw-time-input::-webkit-inner-spin-button,
.epofw-time-input::-webkit-outer-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.epofw-time-input[type="time"] {
	-webkit-appearance: none;
	appearance: none;
}

/* Time input focus states */
.epofw-time-input:focus {
	border-color: #0073aa !important;
	box-shadow: 0 0 0 1px #0073aa !important;
	outline: none !important;
}

/* Time input hover states */
.epofw-time-input:hover {
	border-color: #999 !important;
}

/* Hour input styling */
.epofw-hour-input {
	width: 100% !important;
	padding: 8px 12px !important;
	border: 1px solid #ddd !important;
	border-radius: 4px !important;
	font-size: 14px !important;
	line-height: 1.4 !important;
}

.epofw-hour-input:focus {
	border-color: #0073aa !important;
	box-shadow: 0 0 0 1px #0073aa !important;
	outline: none !important;
}

.epofw-hour-input:hover {
	border-color: #999 !important;
}

/* Remove spinner arrows from number inputs */
.epofw-hour-input::-webkit-outer-spin-button,
.epofw-hour-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.epofw-hour-input[type="number"] {
	-moz-appearance: textfield;
}

/* Hour input field styling */
.epofw_min_hour_timepicker,
.epofw_max_hour_timepicker {
	background-color: #ffffff !important;
	border: 1px solid #ddd !important;
	border-radius: 4px !important;
	padding: 8px 12px !important;
	font-size: 14px !important;
	line-height: 1.4 !important;
	transition: all 0.2s ease !important;
	width: 100% !important;
}

.epofw_min_hour_timepicker:focus,
.epofw_max_hour_timepicker:focus {
	border-color: #0073aa !important;
	box-shadow: 0 0 0 1px #0073aa !important;
	outline: none !important;
}

/* Invalid state styling */
.epofw_min_hour_timepicker:invalid,
.epofw_max_hour_timepicker:invalid {
	border-color: #dc3232 !important;
	background-color: #fff5f5 !important;
}

.epofw_min_hour_timepicker:invalid:focus,
.epofw_max_hour_timepicker:invalid:focus {
	box-shadow: 0 0 0 1px #dc3232 !important;
}
.epofw-hide {
	display: none !important;
}

.woocommerce nav.woo-nav-tab-wrapper {
    margin: 0 !important;
}

.epofw-dashboard-header {
    display: flex;
    flex-direction: row;
    column-gap: 30%;
}

.epofw-section-edit {
    cursor: pointer;
}

/* Spacing Inputs Styling */
.epofw-spacing-inputs {
	display: grid;
	grid-template-columns: 0.25fr 0.25fr 0.25fr 0.25fr 0.75fr;
	gap: 10px;
}

.epofw-typography-inputs {
	display: grid !important;
	grid-template-columns: repeat(4, 1fr);
	gap: 12px;
	margin-bottom: 12px;
}

.epofw-typography-inputs:last-of-type {
	margin-bottom: 0;
}

/* Second row of typography inputs - use 3 columns */
.epofw-field-input .epofw-typography-inputs:nth-of-type(2) {
	display: grid !important;
	grid-template-columns: repeat(3, 1fr) !important;
	max-width: 75%;
}
.epofw-spacing-inputs.epofw-units-input {
	min-width: 400px;
}
.epofw-spacing-input,
.epofw-typography-input {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.epofw-spacing-input label,
.epofw-typography-input label {
	font-size: 12px;
	font-weight: 500;
	color: #666;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin: 0;
}

.epofw-spacing-input input[type="number"],
.epofw-typography-input input[type="number"],
.epofw-typography-input input[type="text"] {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
	background: #fff;
	transition: border-color 0.2s ease;
	min-width: 80px;
	box-sizing: border-box;
}

.epofw-spacing-input input[type="number"] {
	text-align: center;
}

.epofw-spacing-input input[type="number"]:focus,
.epofw-typography-input input[type="number"]:focus,
.epofw-typography-input input[type="text"]:focus {
	outline: none;
	border-color: #007cba;
	box-shadow: 0 0 0 1px #007cba;
}

.epofw-spacing-input input[type="number"]:hover,
.epofw-typography-input input[type="number"]:hover,
.epofw-typography-input input[type="text"]:hover {
	border-color: #999;
}

.epofw-modal-content .epofw-tab-content .epofw-spacing-inputs .epofw-spacing-input select,
.epofw-modal-content .epofw-tab-content .epofw-typography-inputs .epofw-typography-input select {
	width: 100% !important;
	padding: 10px 12px !important;
	border: 1px solid #ddd !important;
	border-radius: 4px !important;
	font-size: 14px !important;
	background: #fff !important;
	transition: border-color 0.2s ease !important;
	appearance: none !important;
	-webkit-appearance: none !important;
	-moz-appearance: none !important;
	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='%23475569' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e") !important;
	background-repeat: no-repeat !important;
	background-position: right 10px center !important;
	background-size: 12px 12px !important;
	padding-right: 35px !important;
	min-width: 140px !important;
	box-sizing: border-box !important;
}

.epofw-modal-content .epofw-tab-content .epofw-spacing-inputs .epofw-spacing-input select {
	text-align: center !important;
}

.epofw-spacing-input select:focus,
.epofw-typography-input select:focus {
	outline: none !important;
	border-color: #007cba !important;
	box-shadow: 0 0 0 1px #007cba !important;
}

.epofw-spacing-input select:hover,
.epofw-typography-input select:hover {
	border-color: #999 !important;
}

/* Responsive spacing inputs */
@media (max-width: 768px) {
	.epofw-spacing-inputs {
		grid-template-columns: repeat(2, 1fr);
		gap: 10px;
	}
	.epofw-typography-inputs {
		grid-template-columns: repeat(2, 1fr);
		gap: 10px;
	}
	.epofw-field-input .epofw-typography-inputs:nth-of-type(2) {
		display: grid !important;
		grid-template-columns: repeat(2, 1fr) !important;
		max-width: 100%;
	}
}

@media (max-width: 480px) {
	.epofw-spacing-inputs {
		grid-template-columns: 1fr;
		gap: 8px;
	}
	.epofw-typography-inputs {
		grid-template-columns: 1fr;
		gap: 8px;
	}
}

/* Div-based Structure Styling */
.epofw_fields_container {
	width: 100%;
	margin: 0;
	padding: 0;
}

.epofw_field_container {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	margin-bottom: 1em;
	/* No padding, border, background - theme handles this */
}

.epofw_field_container.epofw_label_left {
	flex-direction: row;
	gap: 0.75em;
	/* Minimal gap for label/input relationship */
}

.epofw_field_container.epofw_label_right {
	flex-direction: row-reverse;
}

.epofw_field_container.epofw_label_top {
	flex-direction: column;
}

.epofw_field_container.epofw_label_bottom {
	flex-direction: column-reverse;
}

/* Section Wrapper Styling - Theme-Friendly */
.epofw-section-wrapper {
	margin-bottom: 2em;
	/* No border, background - blends with theme */
}

.epofw-section-title {
	margin: 0 0 10px 0;
	font-weight: 600;
	line-height: 1.4;
}

.epofw-section-description {
	margin: 0 0 15px 0;
	font-size: 14px;
	line-height: 1.5;
	opacity: 0.8;
}

.epofw-section-fields {
	/* Fields will inherit the existing div structure */
}

/* Responsive Design */
@media (max-width: 768px) {
	.epofw_field_container {
		flex-direction: column;
	}
	
	.epofw_field_container.epofw_label_left,
	.epofw_field_container.epofw_label_right {
		flex-direction: column;
	}
}

.epofw-form-group .epofw-field-input .epofw-border-input:not(:first-child) {
    width: 120px;
}
.epofw-form-group .epofw-units-input select.epofw-form-control,
.epofw-form-group .epofw-field-input .epofw-border-style-input select {
    width: 120px;
}
.epofw-border-inputs {
    display: flex;
    flex-direction: row;
    gap: 20px;
}
.epofw-modal-content .epofw-form-group.epofw-form-typography-group .epofw-field-input {
	display: grid !important;
    max-width: 50% !important;
}
.epofw-addons-section.epofw-about-info-section {
    margin: 25px 0;
}
/* Card Loader Overlay */
.epofw-card-loader-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    border-radius: var(--epofw-radius-lg);
}

.epofw-card-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.epofw-card-loader .spinner {
    float: none;
    margin: 0;
}

.epofw-card-loader .epofw-loader-text {
    font-size: 13px;
    color: var(--epofw-gray-600);
    font-weight: 500;
}

/* Modal Loader Overlay */
.epofw-modal-loader-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    padding: 40px;
}

.epofw-modal-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.epofw-modal-loader .spinner {
    float: none;
    margin: 0;
}

.epofw-modal-loader .epofw-loader-text {
    font-size: 14px;
    color: var(--epofw-gray-600);
    font-weight: 500;
}

.epofw-modal-content .dashicons, .epofw-tab-content .epofw-add-logic i {
    line-height: 1.4 !important;
}

.epofw-element-selector-modal .epofw-modal-body .epofw-field-type-grid .dashicons {
    line-height: 1 !important;
}
.epofw-element-selector-modal .epofw-modal-content .epofw-modal-header h3 i {
    line-height: 1.2 !important;
}

/* ==========================================================================
   Conditional Logic - Visual Select for ColorSwitcher & ImageSwitcher
   ========================================================================== */

.epofw-cl-visual-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.epofw-cl-visual-wrapper select {
    flex: 1;
    min-width: 120px;
}

/* Color Swatch Preview */
.epofw-cl-color-preview {
    display: inline-block;
    width: 24px;
    height: 24px;
    border-radius: var(--epofw-radius-sm);
    border: 2px solid var(--epofw-gray-300);
    box-shadow: var(--epofw-shadow-sm);
    flex-shrink: 0;
}

.epofw-cl-color-preview:hover {
    border-color: var(--epofw-primary);
}

/* Image Thumbnail Preview */
.epofw-cl-image-preview {
    display: inline-block;
    width: 32px;
    height: 32px;
    border-radius: var(--epofw-radius-sm);
    border: 2px solid var(--epofw-gray-300);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--epofw-gray-100);
}

.epofw-cl-image-preview:hover {
    border-color: var(--epofw-primary);
}

.epofw-cl-image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ========================================
   Premium Feature Preview Styles
   ======================================== */
.epofw-premium-preview-wrapper {
    margin: 20px 0;
    padding: 0;
}

.epofw-premium-preview {
    border-radius: var(--epofw-radius-lg);
    overflow: hidden;
    box-shadow: var(--epofw-shadow-md);
    background: var(--epofw-white);
    border: 2px solid var(--epofw-gray-200);
}

/* Header with PRO badge and upgrade link - Clean professional look */
.epofw-premium-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #f0f4ff 0%, #e8eeff 100%);
    border-bottom: 2px solid #c7d2fe;
}

.epofw-premium-preview-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* PRO Badge - Purple/Violet theme */
.epofw-pro-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    color: #ffffff !important;
    font-size: 10px;
    font-weight: 700;
    padding: 5px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.3);
}

.epofw-pro-badge svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.epofw-premium-preview-title {
    color: #4338ca;
    font-size: 15px;
    font-weight: 600;
    margin: 0;
}

/* Upgrade Button - Green theme with white text */
.epofw-upgrade-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: #ffffff !important;
    font-size: 13px;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.3);
}

.epofw-upgrade-button:hover {
    background: linear-gradient(135deg, #047857 0%, #065f46 100%);
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.4);
    text-decoration: none;
}

.epofw-upgrade-button:focus {
    outline: none;
    color: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.3), 0 2px 8px rgba(5, 150, 105, 0.3);
}

.epofw-upgrade-button:visited {
    color: #ffffff !important;
}

.epofw-upgrade-button svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* Image container - clear, no blur */
.epofw-premium-preview-image {
    padding: 0;
    background: var(--epofw-gray-50);
}

.epofw-premium-preview-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Optional description below header - Light blue theme */
.epofw-premium-preview-description {
    padding: 12px 20px;
    background: #f0f4ff;
    color: #4338ca;
    font-size: 13px;
    line-height: 1.5;
    border-bottom: 1px solid #c7d2fe;
}

/* Inline premium badge for field type dropdown - Purple theme */
.epofw-field-type-pro-badge {
    display: inline-block;
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    color: #ffffff !important;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 6px;
    vertical-align: middle;
}

/* Small PRO badge for premium tabs - Purple theme */
.epofw-pro-badge-small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    color: #ffffff !important;
    font-size: 8px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-left: 6px;
    vertical-align: middle;
    box-shadow: 0 1px 3px rgba(124, 58, 237, 0.3);
    flex-shrink: 0;
    line-height: 1;
}

/* Premium tab styling */
.epofw-tab-btn.epofw-premium-tab {
    position: relative;
    padding-right: 0.5rem;
}

.epofw-tab-btn.epofw-premium-tab:hover .epofw-pro-badge-small {
    box-shadow: 0 2px 6px rgba(124, 58, 237, 0.4);
}

/* Modal header for premium field types */
.epofw-modal-header.epofw-premium-field-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.epofw-modal-header.epofw-premium-field-header h3 {
    margin-right: 0;
}

/* Modal PRO badge */
.epofw-modal-pro-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    color: #ffffff !important;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 6px rgba(124, 58, 237, 0.3);
}

.epofw-modal-pro-badge svg {
    flex-shrink: 0;
}

/* Modal Upgrade button - Freemius blue */
.epofw-modal-upgrade-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #00b9eb 0%, #0099cc 100%);
    color: #ffffff !important;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 185, 235, 0.3);
    margin-left: auto;
}

.epofw-modal-upgrade-btn:hover {
    background: linear-gradient(135deg, #0099cc 0%, #007aa3 100%);
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 185, 235, 0.4);
    text-decoration: none;
}

.epofw-modal-upgrade-btn:focus,
.epofw-modal-upgrade-btn:visited {
    color: #ffffff !important;
    text-decoration: none;
}

.epofw-modal-upgrade-btn svg {
    flex-shrink: 0;
}

/* Settings tabs container - better spacing */
.epofw-settings-tabs {
    display: flex;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 1.5rem;
    overflow-x: auto;
    gap: 0;
    padding: 0 4px;
    scrollbar-width: thin;
}

.epofw-settings-tabs::-webkit-scrollbar {
    height: 4px;
}

.epofw-settings-tabs::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 2px;
}

.epofw-settings-tabs::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 2px;
}

.epofw-settings-tabs::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Premium Preview Responsive Styles */
@media (max-width: 768px) {
    .epofw-premium-preview-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 14px 16px;
    }

    .epofw-premium-preview-header-left {
        width: 100%;
    }

    .epofw-upgrade-button {
        width: 100%;
        justify-content: center;
        padding: 12px 16px;
    }

    .epofw-premium-preview-title {
        font-size: 14px;
    }

    .epofw-premium-preview-description {
        padding: 10px 16px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .epofw-premium-preview-header {
        padding: 12px;
    }

    .epofw-pro-badge {
        font-size: 10px;
        padding: 4px 8px;
    }

    .epofw-premium-preview-title {
        font-size: 13px;
    }

    .epofw-upgrade-button {
        font-size: 12px;
        padding: 10px 14px;
    }
}

/* ==========================================================================
   Premium Disabled Fields - Show premium fields with disabled state
   ========================================================================== */

/* Wrapper for premium disabled field groups */
.epofw-premium-field-disabled {
    position: relative;
}

.epofw-form-group.epofw-premium-field-disabled {
    opacity: 0.7 !important;
    cursor: not-allowed !important;
}

.epofw-premium-field-disabled .epofw-field-input {
    pointer-events: none !important;
}

/* Disable all toggle switches in premium disabled fields */
.epofw-premium-field-disabled .epofw-field-input .toggle-switch {
    pointer-events: none !important;
    cursor: not-allowed !important;
}

/* Allow toggle ONLY for checkboxes with epofw-has-sub class (they control dependent fields) */
.epofw-premium-field-disabled .epofw-field-input input.epofw-has-sub,
.epofw-premium-field-disabled .epofw-field-input input.epofw-has-sub + .toggle-switch {
    pointer-events: auto !important;
    cursor: pointer !important;
    opacity: 1 !important;
}

/* Disable conditional logic container and its children */
.epofw-conditional-logic-container.epofw-premium-field-disabled,
.epofw-premium-field-disabled .epofw-conditional-logic-container {
    pointer-events: none !important;
    cursor: not-allowed !important;
}

.epofw-premium-field-disabled .epofw-conditional-logic-container *,
.epofw-conditional-logic-container.epofw-premium-field-disabled * {
    pointer-events: none !important;
    cursor: not-allowed !important;
}

/* Disable hover effects on conditional logic selects and buttons */
.epofw-premium-field-disabled .epofw-conditional-logic-container select:hover,
.epofw-premium-field-disabled .epofw-conditional-logic-container button:hover,
.epofw-premium-field-disabled .epofw-conditional-logic-container .epofw-btn:hover {
    border-color: #ddd !important;
    background: inherit !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Disable hover effects for premium disabled fields */
.epofw-form-group.epofw-premium-field-disabled .epofw-field-input input:hover,
.epofw-form-group.epofw-premium-field-disabled .epofw-field-input select:hover,
.epofw-form-group.epofw-premium-field-disabled .epofw-field-input textarea:hover,
.epofw-form-group.epofw-premium-field-disabled input:hover,
.epofw-form-group.epofw-premium-field-disabled select:hover,
.epofw-form-group.epofw-premium-field-disabled textarea:hover {
    border-color: #ddd !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Inline PRO badge next to field label */
.epofw-pro-badge-inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    color: #ffffff !important;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-left: 8px;
    vertical-align: middle;
    box-shadow: 0 1px 3px rgba(124, 58, 237, 0.3);
    line-height: 1.2;
}

/* Disabled input styling - more specific selectors */
.epofw-premium-field-disabled input[type="text"],
.epofw-premium-field-disabled input[type="number"],
.epofw-premium-field-disabled input[type="email"],
.epofw-premium-field-disabled input[type="url"],
.epofw-premium-field-disabled input[type="password"],
.epofw-premium-field-disabled input[type="checkbox"],
.epofw-premium-field-disabled select,
.epofw-premium-field-disabled textarea,
.epofw-premium-field-disabled .epofw-form-control {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    background-color: #f0f0f0 !important;
    color: #999 !important;
    border-color: #ddd !important;
}

.epofw-tab-content .epofw-premium-field-disabled .epofw-form-group .epofw-field-input input[disabled], 
.epofw-premium-field-disabled select[disabled], 
.epofw-premium-field-disabled textarea[disabled] {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    background-color: #f0f0f0 !important;
    color: #999 !important;
    border-color: #f0f0f0 !important;
}

/* Color picker disabled state */
.epofw-premium-field-disabled .wp-picker-container,
.epofw-premium-field-disabled .epofw_colorpicker {
    opacity: 0.5 !important;
    pointer-events: none !important;
}

.epofw-premium-field-disabled .wp-color-result {
    cursor: not-allowed !important;
    pointer-events: none !important;
}

/* Border inputs group disabled */
.epofw-premium-field-disabled .epofw-border-inputs,
.epofw-premium-field-disabled .epofw-spacing-inputs,
.epofw-premium-field-disabled .epofw-typography-inputs {
    opacity: 0.5;
    cursor: not-allowed;
}

.epofw-premium-field-disabled .epofw-border-input label,
.epofw-premium-field-disabled .epofw-spacing-input label,
.epofw-premium-field-disabled .epofw-typography-input label {
    cursor: not-allowed;
}

.epofw-premium-field-disabled .toggle-switch {
    opacity: 0.5;
    cursor: not-allowed !important;
}

.epofw-premium-field-disabled .toggle-switch::before {
    background-color: #ccc !important;
}

/* Disabled field label styling */
.epofw-premium-field-disabled .epofw-field-label label {
    color: #888;
    cursor: not-allowed;
}

.epofw-premium-field-disabled .epofw-field-label {
    cursor: not-allowed;
}

.epofw-premium-field-disabled .epofw-field-description {
    color: #aaa;
    cursor: not-allowed;
}

/* Premium fields container with subtle border */
.epofw-premium-fields-group {
    border: 1px dashed #c7d2fe;
    border-radius: 8px;
    padding: 16px;
    margin-top: 12px;
    background: linear-gradient(135deg, #faf5ff 0%, #f5f3ff 100%);
}

.epofw-premium-fields-group .epofw-form-group:last-child {
    margin-bottom: 0 !important;
}

/* Premium section header */
.epofw-premium-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e9d5ff;
}

.epofw-premium-section-title {
    font-size: 13px;
    font-weight: 600;
    color: #6d28d9;
    margin: 0;
}

/* Upgrade link in premium section */
.epofw-premium-upgrade-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #059669 !important;
    text-decoration: none;
    margin-left: auto;
    transition: all 0.2s ease;
    pointer-events: auto;
}

.epofw-premium-upgrade-link:hover {
    color: #047857 !important;
    text-decoration: underline;
}

.epofw-premium-upgrade-link svg {
    width: 12px;
    height: 12px;
}

/* General Settings page premium field disabled styles */
.epofw-setting-field.epofw-premium-field-disabled {
    opacity: 0.7;
    position: relative;
}

.epofw-setting-field.epofw-premium-field-disabled .epofw-setting-input {
    pointer-events: none;
}

.epofw-setting-field.epofw-premium-field-disabled .epofw-setting-label label {
    color: #888;
    cursor: not-allowed;
}

.epofw-setting-field.epofw-premium-field-disabled .epofw-field-description {
    color: #aaa;
}

.epofw-setting-field.epofw-premium-field-disabled input,
.epofw-setting-field.epofw-premium-field-disabled select,
.epofw-setting-field.epofw-premium-field-disabled textarea {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #f0f0f0;
    color: #999;
    border-color: #ddd;
}

.epofw-setting-field.epofw-premium-field-disabled .toggle-switch {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.epofw-setting-field.epofw-premium-field-disabled .toggle-switch::before {
    background-color: #ccc;
}

/* Separator/Divider Field Styling */
.epofw-separator-wrapper {
    width: 100%;
    margin: 10px 0;
}

.epofw-separator {
    border: none;
    border-top: 1px dashed #959595;
    margin: 0;
    width: 100%;
    display: block;
    min-height: 1px;
}

/* Global settings dependent fields styling */
.epofw-dependent-fields {
    margin-top: 12px;
    margin-left: 20px;
    padding: 16px;
    border: 1px solid #ccd0d4;
    border-left: 3px solid #ccd0d4;
    border-radius: 6px;
    background: #fff;
}

.epofw-dependent-fields .epofw-setting-input input[type="number"] {
    width: 120px;
    max-width: 120px;
}

.epofw_rule_repeater .additional_rule_ul:not(:first-child) {
    margin: 25px 0;
}

/* ==========================================================================
   Mobile Responsive - Column layout for small screens
   ========================================================================== */
@media (max-width: 480px) {

    /* Setting fields: row → column */
    .epofw-setting-field {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .epofw-setting-label {
        min-width: 0;
        width: 100%;
    }

    .epofw-setting-input {
        width: 100%;
    }

    .epofw-setting-input input[type="text"],
    .epofw-setting-input input[type="number"],
    .epofw-setting-input select,
    .epofw-setting-input textarea {
        max-width: 100%;
    }

    /* Additional rules: row → column */
    .epofw-additional-rules-field {
        flex-direction: column;
        gap: 8px;
    }

    .epofw-additional-rules-field .epofw-setting-label {
        width: 100%;
    }

    /* Configuration box adjustments */
    .epofw-configuration-box .epofw-setting-label {
        width: 100%;
    }

    .epofw-configuration-box .epofw-setting-input input[type="text"],
    .epofw-configuration-box .epofw-setting-input select {
        max-width: 100%;
    }

    /* Box header and content */
    .epofw-box-header {
        padding: 12px;
    }

    .epofw-box-header-title h3 {
        font-size: 14px;
    }

    .epofw-box-content {
        padding: 12px;
    }

    /* Settings groups */
    .epofw-settings-group {
        padding: 10px;
        margin: 10px 0;
    }

    /* Border inputs: row → column */
    .epofw-border-inputs {
        flex-direction: column;
        gap: 10px;
    }

    /* Dependent fields */
    .epofw-dependent-fields {
        margin-left: 0;
        padding: 10px;
    }

    /* Section layout sub-options */
    .epofw-section-layout-field {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .epofw-section-layout-field .epofw-setting-label {
        min-width: 0;
        width: 100%;
    }

    .epofw-section-layout-field .epofw-setting-input {
        width: 100%;
    }

    .epofw-section-layout-field .epofw-setting-input select {
        max-width: 100%;
    }

    /* Premium preview header */
    .epofw-premium-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .epofw-premium-upgrade-link {
        margin-left: 0;
    }
}
/* ──────────────────────────────────────────────────────────────────── */
/* Smart Validation Field Disabling Styles */

/* Disabled validation field - STRONGLY VISUALLY DISABLED */
.epofw-validation-disabled {
	opacity: 0.45 !important;
	cursor: not-allowed !important;
	background-color: #efefef !important;
	background-image: repeating-linear-gradient(
		45deg,
		transparent,
		transparent 10px,
		rgba(0, 0, 0, 0.03) 10px,
		rgba(0, 0, 0, 0.03) 20px
	) !important;
	border-color: #d1d5db !important;
	border-style: dashed !important;
	color: #9ca3af !important;
	pointer-events: none !important;
}

.epofw-validation-disabled:focus {
	outline: none !important;
	box-shadow: none !important;
}

.epofw-validation-disabled::placeholder {
	color: #d1d5db !important;
	opacity: 0.6;
}

/* Disable the entire form group when field is disabled */
.epofw-form-group:has(.epofw-validation-disabled) {
	opacity: 0.85;
	position: relative;
}

.epofw-form-group:has(.epofw-validation-disabled) label {
	color: #9ca3af;
	font-weight: normal;
}

/* Dimmed field (not fully disabled, but not recommended) */
.epofw-validation-dimmed {
	opacity: 0.6 !important;
	background-color: #fafafa !important;
	border-color: #e5e7eb !important;
	border-style: dotted !important;
	color: #9ca3af !important;
}

.epofw-form-group:has(.epofw-validation-dimmed) {
	opacity: 0.9;
}

.epofw-form-group:has(.epofw-validation-dimmed) label {
	color: #9ca3af;
}

/* Disabled note/tooltip message */
.epofw-validation-disabled-note {
	color: #dc2626;
	font-size: 12px;
	font-weight: 600;
	margin-left: 8px;
	display: inline-block;
	padding: 3px 8px;
	background-color: #fee2e2;
	border-radius: 3px;
	border-left: 3px solid #dc2626;
	letter-spacing: 0.3px;
}

.epofw-validation-disabled-note[style*="display: inline"] {
	animation: slideIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dimmed note (gray, for non-critical info) */
.epofw-validation-disabled-note[style*="color: rgb(107, 114, 128)"] {
	background-color: #f3f4f6;
	color: #6b7280 !important;
	padding: 3px 8px;
	border-radius: 3px;
	border-left: 3px solid #9ca3af;
}

@keyframes slideIn {
	from {
		opacity: 0;
		transform: translateX(-6px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

/* ──────────────────────────────────────────────────────────────────── */
/* Native Disabled Attribute Overrides - Remove Focus Styles */
/* ──────────────────────────────────────────────────────────────────── */

/* Remove all browser default focus styles from disabled inputs */
input[disabled],
textarea[disabled],
select[disabled] {
	outline: none !important;
	box-shadow: none !important;
	-webkit-appearance: none !important;
	appearance: none !important;
}

input[disabled]:focus,
textarea[disabled]:focus,
select[disabled]:focus {
	outline: none !important;
	box-shadow: none !important;
	border-color: #d1d5db !important;
}

input[disabled]:hover,
textarea[disabled]:hover,
select[disabled]:hover {
	border-color: #d1d5db !important;
	background-color: #efefef !important;
}

/* Remove focus visible styling */
input[disabled]:focus-visible,
textarea[disabled]:focus-visible,
select[disabled]:focus-visible {
	outline: none !important;
	box-shadow: none !important;
}

/* Stronger disabled styling */
.epofw-validation-disabled[disabled],
[disabled].epofw-validation-disabled {
	opacity: 0.45 !important;
	cursor: not-allowed !important;
	background-color: #efefef !important;
	background-image: repeating-linear-gradient(
		45deg,
		transparent,
		transparent 10px,
		rgba(0, 0, 0, 0.03) 10px,
		rgba(0, 0, 0, 0.03) 20px
	) !important;
	border-color: #d1d5db !important;
	border-style: dashed !important;
	color: #9ca3af !important;
	pointer-events: none !important;
	user-select: none !important;
	-webkit-user-select: none !important;
	-moz-user-select: none !important;
	-ms-user-select: none !important;
}

.epofw-validation-disabled[disabled]:focus,
[disabled].epofw-validation-disabled:focus {
	outline: none !important;
	box-shadow: none !important;
	border-color: #d1d5db !important;
	border-style: dashed !important;
}

.epofw-validation-disabled[disabled]::placeholder,
[disabled].epofw-validation-disabled::placeholder {
	color: #d1d5db !important;
	opacity: 0.6 !important;
}

/* ──────────────────────────────────────────────────────────────────── */
/* DISABLED STATE OVERRIDES - Higher Specificity Match */
/* ──────────────────────────────────────────────────────────────────── */

/* Override base styles for disabled inputs */
.epofw-option-row input[disabled],
.epofw-option-row select[disabled],
.epofw_apodp_logical_field_group select[disabled],
.epofw_apodp_logical_field_group input[disabled],
.epofw_logical_field_group select[disabled],
.epofw_logical_field_group input[disabled],
.epofw-form-group .epofw-field-input input[type="text"][disabled],
.epofw-form-group .epofw-field-input input[type="number"][disabled],
.epofw-form-group .epofw-field-input select[disabled],
.epofw-form-group > select[disabled],
.epofw-form-group > input[type="text"][disabled],
.epofw-form-group > input[type="number"][disabled],
.epofw-tab-content input[type="text"][disabled],
.epofw-tab-content input[type="number"][disabled],
.epofw-tab-content select[disabled] {
	opacity: 0.45 !important;
	cursor: not-allowed !important;
	color: #9ca3af !important;
	background-color: #efefef !important;
	background-image: repeating-linear-gradient(
		45deg,
		transparent,
		transparent 10px,
		rgba(0, 0, 0, 0.03) 10px,
		rgba(0, 0, 0, 0.03) 20px
	) !important;
	border-color: #d1d5db !important;
	border-style: dashed !important;
	pointer-events: none !important;
	user-select: none !important;
	-webkit-user-select: none !important;
	-moz-user-select: none !important;
	-ms-user-select: none !important;
}

/* Override focus states for disabled inputs */
.epofw-option-row input[disabled]:focus,
.epofw-option-row select[disabled]:focus,
.epofw_apodp_logical_field_group select[disabled]:focus,
.epofw_apodp_logical_field_group input[disabled]:focus,
.epofw_logical_field_group select[disabled]:focus,
.epofw_logical_field_group input[disabled]:focus,
.epofw-form-group .epofw-field-input input[type="text"][disabled]:focus,
.epofw-form-group .epofw-field-input input[type="number"][disabled]:focus,
.epofw-form-group .epofw-field-input select[disabled]:focus,
.epofw-form-group > select[disabled]:focus,
.epofw-form-group > input[type="text"][disabled]:focus,
.epofw-form-group > input[type="number"][disabled]:focus,
.epofw-tab-content input[type="text"][disabled]:focus,
.epofw-tab-content input[type="number"][disabled]:focus,
.epofw-tab-content select[disabled]:focus {
	outline: none !important;
	border-color: #d1d5db !important;
	border-style: dashed !important;
	box-shadow: none !important;
}

/* Override hover states for disabled inputs */
.epofw-option-row input[disabled]:hover,
.epofw-option-row select[disabled]:hover,
.epofw_apodp_logical_field_group select[disabled]:hover,
.epofw_apodp_logical_field_group input[disabled]:hover,
.epofw_logical_field_group select[disabled]:hover,
.epofw_logical_field_group input[disabled]:hover,
.epofw-form-group .epofw-field-input input[type="text"][disabled]:hover,
.epofw-form-group .epofw-field-input input[type="number"][disabled]:hover,
.epofw-form-group .epofw-field-input select[disabled]:hover,
.epofw-form-group > select[disabled]:hover,
.epofw-form-group > input[type="text"][disabled]:hover,
.epofw-form-group > input[type="number"][disabled]:hover,
.epofw-tab-content input[type="text"][disabled]:hover,
.epofw-tab-content input[type="number"][disabled]:hover,
.epofw-tab-content select[disabled]:hover {
	border-color: #d1d5db !important;
	background-color: #efefef !important;
	background-image: repeating-linear-gradient(
		45deg,
		transparent,
		transparent 10px,
		rgba(0, 0, 0, 0.03) 10px,
		rgba(0, 0, 0, 0.03) 20px
	) !important;
}

/* Override focus-visible for disabled inputs */
.epofw-option-row input[disabled]:focus-visible,
.epofw-option-row select[disabled]:focus-visible,
.epofw_apodp_logical_field_group select[disabled]:focus-visible,
.epofw_apodp_logical_field_group input[disabled]:focus-visible,
.epofw_logical_field_group select[disabled]:focus-visible,
.epofw_logical_field_group input[disabled]:focus-visible,
.epofw-form-group .epofw-field-input input[type="text"][disabled]:focus-visible,
.epofw-form-group .epofw-field-input input[type="number"][disabled]:focus-visible,
.epofw-form-group .epofw-field-input select[disabled]:focus-visible,
.epofw-form-group > select[disabled]:focus-visible,
.epofw-form-group > input[type="text"][disabled]:focus-visible,
.epofw-form-group > input[type="number"][disabled]:focus-visible,
.epofw-tab-content input[type="text"][disabled]:focus-visible,
.epofw-tab-content input[type="number"][disabled]:focus-visible,
.epofw-tab-content select[disabled]:focus-visible {
	outline: none !important;
	box-shadow: none !important;
	border-color: #d1d5db !important;
	border-style: dashed !important;
}

/* Group the "Your Addons" title with the Import/Export buttons on the left. */
.epofw-section-title-group {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

/* ==========================================================================
   Pricing Options UI — cards (merged from epofw-pricing-ui-admin.css)
   ========================================================================== */
/* EPOFW Pricing Options UI — cards. BEM-lite, .epofw-pricing-ui prefix. */
.epofw-pricing-ui__card { border:1px solid #e4e7ec; border-radius:11px; background:#fff; margin-bottom:16px; overflow:hidden; }
.epofw-pricing-ui__header { display:flex; align-items:flex-start; gap:13px; padding:16px 18px; cursor:pointer; }
.epofw-pricing-ui__header:focus-visible { outline:2px solid #2271b1; outline-offset:-2px; }
.epofw-pricing-ui__body { border-top:1px solid #eceef1; padding:16px 18px; background:#fcfdfe; }
.epofw-pricing-ui__card--closed .epofw-pricing-ui__body { display:none; }

/* Option-based fields price per option (Options tab), so the Field Price card is
   hidden — its enable input still renders/submits so saved data is unchanged. */
.epofw-tab-content.epofw-pricing-rules-only [data-epofw-card="field-price"] { display: none; }

/* Price Rules / Volume sections are now cards; neutralize the old standalone
   top-divider spacing, but keep the card's own top border — `border-top:none`
   left the card open-topped (3-sided). */
.epofw-price-rules-section.epofw-pricing-ui__card,
.epofw-volume-pricing-section.epofw-pricing-ui__card { margin-top: 0; padding-top: 0; border-top: 1px solid #e4e7ec; }

.epofw-pricing-ui__icon { width:38px; height:38px; border-radius:10px; display:flex; align-items:center; justify-content:center; flex-shrink:0; font-size:18px; }
.epofw-pricing-ui__icon--a { background:#eaf2fb; color:#2271b1; }
.epofw-pricing-ui__icon--b { background:#f4f0fb; color:#6941c6; }
.epofw-pricing-ui__icon--c { background:#fef7ec; color:#b54708; }
.epofw-pricing-ui__meta { flex:1; min-width:0; }
.epofw-pricing-ui__title-row { display:flex; align-items:center; gap:9px; }
.epofw-pricing-ui__title-row h3 { margin:0; font-size:14.5px; font-weight:700; }
.epofw-pricing-ui__step-badge { font:700 9.5px/1 monospace; letter-spacing:.05em; text-transform:uppercase; padding:3px 8px; border-radius:999px; white-space:nowrap; }
.epofw-pricing-ui__step-badge--a { background:#eaf2fb; color:#2271b1; }
.epofw-pricing-ui__step-badge--b { background:#f4f0fb; color:#6941c6; }
.epofw-pricing-ui__step-badge--c { background:#fef7ec; color:#b54708; }
.epofw-pricing-ui__desc { margin:4px 0 0; font-size:12px; color:#667085; line-height:1.45; }
.epofw-pricing-ui__summary { margin:4px 0 0; font-size:11.5px; color:#667085; display:none; }
.epofw-pricing-ui__card--closed .epofw-pricing-ui__desc { display:none; }
.epofw-pricing-ui__card--closed .epofw-pricing-ui__summary { display:block; }
.epofw-pricing-ui__toggle-wrap { display:inline-flex; align-items:center; margin-top:6px; flex-shrink:0; }
/* The header toggle uses the native checkbox; the empty .toggle-switch label (sized
   50px + 12px margin by the shared rule, but with no slider) only added dead space
   between the checkbox and the chevron — hide it here. */
/* Header on/off as a clean toggle slider (self-contained: the shared slider styling is scoped to .epofw-field-input). Raw checkbox visually hidden but still functional/submittable; redundant ON/OFF text pill dropped. */
.epofw-pricing-ui__toggle-wrap input[type="checkbox"] { position:absolute; opacity:0; width:0; height:0; margin:0; }
.epofw-pricing-ui__toggle-wrap .toggle-switch { display:inline-block; width:44px; height:24px; margin:0; border-radius:999px; background:#cbd5e1; position:relative; cursor:pointer; transition:background .18s; }
.epofw-pricing-ui__toggle-wrap .toggle-switch::after { content:''; position:absolute; top:2px; left:2px; width:20px; height:20px; border-radius:50%; background:#fff; box-shadow:0 1px 2px rgba(16,24,40,.25); transition:transform .18s; }
.epofw-pricing-ui__toggle-wrap input[type="checkbox"]:checked + .toggle-switch { background:#2271b1; }
.epofw-pricing-ui__toggle-wrap input[type="checkbox"]:checked + .toggle-switch::after { transform:translateX(20px); }
.epofw-pricing-ui__toggle-wrap input[type="checkbox"]:disabled + .toggle-switch { opacity:.5; cursor:not-allowed; }
.epofw-pricing-ui__pill { display:none; }
.epofw-pricing-ui__chev { color:#667085; font-size:18px; line-height:1; margin-top:5px; transition:transform .18s; flex-shrink:0; }
.epofw-pricing-ui__card--closed .epofw-pricing-ui__chev { transform:rotate(-90deg); }

/* Shown when an addon's display rules would hide it on every product. */
.epofw-rules-warning {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin-bottom: 12px;
	padding: 10px 12px;
	border: 1px solid var(--epofw-warning, #eab308);
	border-left-width: 4px;
	border-radius: 4px;
	background-color: rgba(234, 179, 8, 0.08);
	font-size: 13px;
	line-height: 1.5;
}

.epofw-rules-warning-icon {
	flex-shrink: 0;
	color: var(--epofw-warning, #eab308);
}
