/* Enhanced Form Builder Layout - Updated Structure */
.ef-builder-container {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    min-height: 700px;
    background: #f0f0f1;
    padding: 20px;
    border-radius: 8px;
}

/* Left Sidebar - Field Types */
.ef-left-sidebar {
    width: 240px; /* slightly narrower to create more canvas space */
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    height: fit-content;
    overflow: hidden;
}

/* Center - Form Builder Canvas */
.ef-builder-canvas {
    flex: 1;
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    min-height: 600px;
    overflow-x: auto;
}

/* Right Sidebar - Form Settings + Field Settings */
.ef-right-sidebar {
    width: 300px; /* slightly narrower to balance layout */
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Form Settings (Top of Right Sidebar) */
.ef-form-settings {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    padding: 20px;
}

.ef-form-settings h3 {
    margin: 0 0 20px 0;
    color: #1d2327;
    font-size: 16px;
    font-weight: 600;
}

.ef-form-settings h4 {
    margin: 25px 0 15px 0;
    padding-top: 20px;
    border-top: 1px solid #e1e1e1;
    color: #1d2327;
    font-size: 14px;
    font-weight: 600;
}

/* Field Settings (Bottom of Right Sidebar) */
.ef-field-settings {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
    flex: 1;
    min-height: 300px;
    display: flex;
    flex-direction: column;
}

.ef-field-settings > h3 {
    margin: 0;
    padding: 20px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 16px;
    font-weight: 600;
    border-bottom: 1px solid #e1e1e1;
    flex-shrink: 0;
}

#ef-field-settings-content {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.ef-field-settings-content,
.ef-no-field-selected {
    padding: 24px;
}

.ef-entries-stats {
    display: flex;
    gap: 20px;
    margin: 20px 0;
    align-items: flex-start;
}

.ef-stat-card {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 6px;
    padding: 20px;
    text-align: center;
    min-width: 150px;
}

.ef-stat-card h3 {
    font-size: 32px;
    margin: 0 0 8px 0;
    color: #1d2327;
}

.ef-stat-card p {
    margin: 0;
    color: #646970;
    font-size: 14px;
}

.ef-download-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.ef-download-entries-btn {
    display: flex;
    align-items: center;
    white-space: nowrap;
    font-size: 13px;
    height: 36px;
    padding: 0 15px;
}

.ef-download-entries-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ef-download-section .description {
    margin: 0;
    font-size: 12px;
    color: #646970;
    font-style: italic;
}

.ef-no-entries {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 6px;
}

.ef-status {
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
}

.ef-status-published {
    background: #d4edda;
    color: #155724;
}

.ef-status-draft {
    background: #fff3cd;
    color: #856404;
}

.ef-file-path-info {
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.ef-path-message h4 {
    margin: 0 0 15px 0;
    color: #1d2327;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ef-path-message h4 .dashicons {
    color: #0073aa;
}

.ef-file-path {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 15px 0;
    padding: 12px;
    background: #ffffff;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.ef-file-path code {
    flex: 1;
    background: none;
    padding: 0;
    font-family: Monaco, "Lucida Console", monospace;
    font-size: 13px;
    color: #d63638;
    font-weight: 600;
}

.ef-copy-path {
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.ef-copy-path .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

.ef-path-steps {
    margin: 20px 0;
    padding: 15px;
    background: #ffffff;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.ef-path-steps ol {
    margin: 10px 0 0 20px;
    padding: 0;
}

.ef-path-steps li {
    margin-bottom: 8px;
    color: #646970;
}

.ef-file-stats {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
}

.ef-file-count {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: #0073aa;
    font-weight: 500;
}

.ef-no-files-message,
.ef-no-directory-message {
    text-align: center;
    padding: 20px;
}

.ef-no-files-message p:first-child,
.ef-no-directory-message p:first-child {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 16px;
    margin-bottom: 15px;
}

.ef-no-files-message .dashicons,
.ef-no-directory-message .dashicons {
    color: #646970;
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.ef-file-path-info .description {
    color: #646970;
    font-size: 13px;
    font-style: italic;
}

@media (max-width: 600px) {
    .ef-file-path {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .ef-copy-path {
        justify-content: center;
    }
}

/* Field Types (Left Sidebar) */
.ef-field-types {
    padding: 20px;
}

.ef-field-types h3 {
    margin: 0 0 10px 0;
    color: #1d2327;
    font-size: 16px;
    font-weight: 600;
}

.ef-drag-instruction {
    margin: 0 0 20px 0;
    color: #646970;
    font-size: 13px;
    font-style: italic;
}

.ef-field-category {
    margin-bottom: 20px;
}

.ef-field-category h4 {
    margin: 0 0 10px 0;
    color: #646970;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Enhanced Canvas Header */
.ef-canvas-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e1e1e1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ef-canvas-title h3 {
    margin: 0 0 4px 0;
    color: white;
    font-size: 18px;
    font-weight: 600;
}

.ef-form-preview-text {
    font-size: 14px;
    opacity: 0.9;
}

.ef-canvas-actions {
    display: flex;
    gap: 12px;
}

.ef-canvas-actions .button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    font-weight: 500;
}

.ef-canvas-actions .button-primary {
    background: #00a32a;
    border-color: #00a32a;
}

.ef-canvas-actions .button-primary:hover {
    background: #008a20;
    border-color: #008a20;
}

.ef-canvas-actions .button:not(.button-primary) {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
}

.ef-canvas-actions .button:not(.button-primary):hover {
    background: rgba(255,255,255,0.3);
}

/* Enhanced Canvas Area */
.ef-canvas {
    flex: 1;
    padding: 24px;
    min-height: 400px;
    position: relative;
    background: #fafafa;
    background-image: 
        linear-gradient(45deg, #f0f0f0 25%, transparent 25%), 
        linear-gradient(-45deg, #f0f0f0 25%, transparent 25%), 
        linear-gradient(45deg, transparent 75%, #f0f0f0 75%), 
        linear-gradient(-45deg, transparent 75%, #f0f0f0 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

.ef-canvas.ef-has-fields {
    background: #fff;
    background-image: none;
}

/* Enhanced Canvas Placeholder */
.ef-canvas-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 400px;
    border: 3px dashed #c3c4c7;
    border-radius: 12px;
    background: white;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

.ef-canvas-placeholder::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border: 3px dashed transparent;
    border-radius: 12px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ef-canvas-placeholder:hover::before {
    opacity: 0.1;
}

.ef-placeholder-content {
    max-width: 400px;
    padding: 40px 20px;
}

.ef-placeholder-icon {
    font-size: 64px;
    color: #8c8f94;
    margin-bottom: 24px;
}

.ef-placeholder-icon .dashicons {
    font-size: 64px;
    width: 64px;
    height: 64px;
}

.ef-placeholder-content h3 {
    margin: 0 0 16px 0;
    color: #1d2327;
    font-size: 24px;
    font-weight: 600;
}

.ef-placeholder-content p {
    margin: 0 0 32px 0;
    color: #646970;
    font-size: 16px;
    line-height: 1.6;
}

.ef-placeholder-features {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.ef-feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #646970;
    font-size: 13px;
    font-weight: 500;
}

.ef-feature-item .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
    color: #667eea;
}

/* Canvas Footer */
.ef-canvas-footer {
    padding: 16px 24px;
    border-top: 1px solid #e1e1e1;
    background: #f6f7f7;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #646970;
}

.ef-field-count {
    font-weight: 500;
}

.ef-count-text {
    display: flex;
    align-items: center;
    gap: 4px;
}

#ef-field-counter {
    background: #667eea;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 12px;
}

.ef-canvas-help {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Form Settings Styling */
.ef-setting-group {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f1;
}

.ef-setting-group:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.ef-setting-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 13px;
    color: #1d2327;
}

.ef-setting-input,
.ef-setting-select,
.ef-setting-textarea,
.ef-form-title-input,
.ef-form-description-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    font-size: 13px;
    transition: all 0.2s ease;
}

.ef-setting-input:focus,
.ef-setting-select:focus,
.ef-setting-textarea:focus,
.ef-form-title-input:focus,
.ef-form-description-input:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
    outline: none;
}

.ef-setting-textarea,
.ef-form-description-input {
    min-height: 80px;
    resize: vertical;
    font-family: inherit;
}

.ef-setting-checkbox {
    margin-right: 8px;
}

.ef-setting-group small {
    display: block;
    margin-top: 6px;
    color: #646970;
    font-size: 12px;
    line-height: 1.4;
}

.ef-setting-input.ef-invalid,
.ef-setting-textarea.ef-invalid {
    border-color: #d63638;
    box-shadow: 0 0 0 1px #d63638;
}

.ef-setting-input.ef-valid {
    border-color: #00a32a;
    box-shadow: 0 0 0 1px #00a32a;
}

.ef-url-validation-feedback {
    font-size: 12px;
    margin-top: 5px;
    padding: 4px 8px;
    background: #fff2f2;
    border: 1px solid #f0b8b8;
    border-radius: 3px;
}

/* Enhanced Field Type Items */
/* Compact field type tiles */
.ef-field-type {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 20px 10px; /* slightly taller tiles */
    margin-bottom: 6px;
    background: #f8f9fa;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    cursor: grab;
    position: relative;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
    user-select: none;
    min-height: 34px;
}

.ef-field-type:hover {
    background: #eef6ff;
    border-color: #9ec5fe;
}

.ef-field-type:active {
    cursor: grabbing;
    transform: translateY(0) scale(0.98);
}

.ef-field-type.ef-dragging {
    opacity: 0.7;
    transform: rotate(3deg) scale(1.05);
    z-index: 1000;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.ef-field-type .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    color: #667eea;
}

.ef-field-label {
    font-size: 13px;
    font-weight: 500;
    color: #1d2327;
}

/* Pro field tiles (non-addable discovery items) */
.ef-field-type-pro {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 20px 10px;
    background: #f6f7f7;
    border: 1px dashed #c3c4c7;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    transition: background 0.2s ease, border-color 0.2s ease;
    user-select: none;
    min-height: 34px;
    width: 100%;
    text-align: left;
    font: inherit;
}

.ef-field-type-pro:hover {
    background: #fff8e5;
    border-color: #dba617;
}

.ef-field-type-pro .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    color: #dba617;
}

.ef-pro-badge {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.4px;
    padding: 2px 6px;
    border-radius: 10px;
    background: #dba617;
    color: #ffffff;
}

.ef-pro-fields-note {
    grid-column: 1 / -1;
    margin: 0 0 6px 0;
    font-size: 12px;
    color: #646970;
    line-height: 1.4;
}

/* Settings Placeholder */
.ef-settings-placeholder {
    text-align: center;
    padding: 40px 20px;
}

.ef-settings-placeholder .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: #c3c4c7;
    margin-bottom: 16px;
}

.ef-settings-placeholder h4 {
    margin: 0 0 12px 0;
    color: #1d2327;
    font-size: 16px;
}

.ef-settings-placeholder p {
    margin: 0;
    color: #646970;
    line-height: 1.5;
}

/* Drag and Drop States */
.ef-canvas.ef-drag-over {
    background: #e7f3ff;
    background-image: none;
}

.ef-canvas.ef-drag-over .ef-canvas-placeholder {
    border-color: #007cba;
    border-style: solid;
    background: #f0f8ff;
}

.ef-canvas.ef-drag-over .ef-canvas-placeholder::before {
    opacity: 0.2;
}

.ef-drop-indicator {
    height: 4px;
    background: linear-gradient(90deg, #007cba, #667eea);
    border-radius: 2px;
    margin: 8px 0;
    opacity: 0;
    transform: scaleX(0);
    transition: all 0.3s ease;
}

.ef-drop-indicator.active {
    opacity: 1;
    transform: scaleX(1);
}

/* Field Items in Canvas */
.ef-field-item {
    position: relative;
    padding: 15px;
    margin-bottom: 10px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.ef-field-item:hover {
    border-color: #007cba;
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.1);
    transform: translateY(-1px);
}

.ef-field-item.ef-selected {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.ef-field-item.ef-selected::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    z-index: 1;
}

.ef-field-header {
    padding: 12px 16px;
    background: #f6f7f7;
    border-bottom: 1px solid #e1e1e1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ef-field-handle {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 30px;
    background: #f7f7f7;
    border-right: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    cursor: move;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ef-field-handle::before {
    content: "⋮⋮";
    color: #666;
    font-size: 16px;
    line-height: 1;
}

.ef-field-item.ui-sortable-helper {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid #007cba;
    transform: scale(1.02);
}

.ef-sort-placeholder {
    border: 2px dashed #007cba;
    background: rgba(0,120,186,0.05);
    margin-bottom: 10px;
    border-radius: 4px;
}

.ef-field-item:focus-within {
    border-color: #007cba;
    box-shadow: 0 0 0 1px #007cba;
}

.ef-field-item.is-dragging {
    opacity: 0.7;
}

.ef-field-title {
    flex: 1;
    font-weight: 500;
    color: #1d2327;
}

.ef-field-type-badge {
    background: #e1e1e1;
    color: #646970;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
}

.ef-field-required-badge {
    color: #d63638;
    font-weight: 600;
    font-size: 16px;
}

.ef-field-actions {
    display: flex;
    gap: 8px;
}

.ef-field-actions .dashicons {
    cursor: pointer;
    color: #8c8f94;
    font-size: 16px;
    transition: color 0.2s ease;
}

.ef-field-actions .dashicons:hover {
    color: #1d2327;
}

.ef-field-actions .dashicons-trash:hover {
    color: #d63638;
}

.ef-field-preview {
    padding: 16px;
}

.ef-field-description {
    padding: 0 16px 16px 16px;
}

.ef-field-description small {
    color: #646970;
    font-style: italic;
}

/* Field Preview Styles */
.ef-field-wrapper label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #1d2327;
    font-size: 13px;
}

.ef-field-wrapper .required {
    color: #d63638;
}

.ef-input,
.ef-textarea,
.ef-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    background: #f6f7f7;
}

.ef-checkbox-option,
.ef-radio-option {
    display: block;
    margin-bottom: 8px;
}

/* Responsive Design */
@media (max-width: 1600px) {
    .ef-right-sidebar { width: 280px; }
    .ef-left-sidebar { width: 220px; }
}

@media (max-width: 1400px) {
    .ef-builder-container {
        flex-direction: column;
        gap: 16px;
    }
    
    .ef-left-sidebar,
    .ef-right-sidebar {
        width: 100%;
    }
    
    .ef-left-sidebar {
        order: 1;
    }
    
    .ef-builder-canvas {
        order: 2;
    }
    
    .ef-right-sidebar {
        order: 3;
        flex-direction: row;
        gap: 16px;
    }
    
    .ef-form-settings,
    .ef-field-settings {
        flex: 1;
    }
    
    .ef-field-types {
        columns: 3;
        column-gap: 16px;
    }
    
    .ef-field-category {
        break-inside: avoid;
        margin-bottom: 16px;
    }
}

@media (max-width: 768px) {
    .ef-builder-container {
        padding: 12px;
        gap: 12px;
    }
    
    .ef-canvas-header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .ef-canvas-actions {
        justify-content: center;
    }
    
    .ef-field-types {
        columns: 2;
    }
    
    .ef-placeholder-features {
        flex-direction: column;
        gap: 16px;
    }
    
    .ef-canvas-footer {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    .ef-right-sidebar {
        flex-direction: column;
    }
}

/* Animation for field counter */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.ef-field-counter-updated {
    animation: pulse 0.3s ease-in-out;
}

/* -------------------------------------------------------------------
 * Custom layout for field types
 * Display each field category as a two-column grid to make field types
 * easier to scan. The category heading spans both columns. On mobile
 * screens (max-width 768px) fall back to a single column layout.
 */
.ef-field-types {
    /* Override default multi-column layout */
    columns: 1 !important;
}

.ef-field-category {
    display: grid;
    grid-template-columns: repeat(2, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 14px;
    justify-items: stretch;
    align-items: stretch;
}

.ef-field-category h4 {
    grid-column: 1 / -1;
    margin: 6px 0 6px;
    font-size: 13px;
    font-weight: 700;
    color: #646970;
    letter-spacing: .4px;
}

.ef-field-category .ef-field-type {
    margin: 0;
    width: 100%;
}

@media (max-width: 768px) {
    .ef-field-category {
        grid-template-columns: 1fr;
    }
}

/* Loading state for save button */
.ef-save-btn .dashicons.spin {
    animation: ef-spin 2s linear infinite;
}

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

/* Admin notices */
.notice {
    margin: 20px 0;
    padding: 10px;
    border-left: 4px solid #00a0d2;
    background: #fff;
}

.notice-success {
    border-color: #46b450;
}

.notice-error {
    border-color: #dc3232;
}

.notice p {
    margin: 0.5em 0;
    padding: 2px;
}

/* Field Settings Content */
.ef-settings-section {
    padding: 20px;
    border-bottom: 1px solid #e1e1e1;
}

.ef-settings-section:last-child {
    border-bottom: none;
}

.ef-settings-section h4 {
    margin: 0 0 16px 0;
    color: #1d2327;
    font-size: 14px;
    font-weight: 600;
}

.ef-setting-row {
    margin-bottom: 16px;
}

.ef-setting-row:last-child {
    margin-bottom: 0;
}

.ef-setting-row label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 13px;
    color: #1d2327;
}

.ef-setting-row small {
    display: block;
    margin-top: 4px;
    color: #646970;
    font-size: 12px;
    line-height: 1.4;
}

/* Options Container */
.ef-options-container {
    margin-bottom: 12px;
}

.ef-option-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    align-items: center;
}

.ef-option-label,
.ef-option-value {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
}

.ef-remove-option {
    padding: 4px;
    background: none;
    border: none;
    color: #8c8f94;
    cursor: pointer;
    transition: color 0.2s ease;
}

.ef-remove-option:hover {
    color: #d63638;
}

.ef-add-option {
    font-size: 13px;
}

/* Inline action buttons under options */
.ef-option-actions {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}

/* Pro field upgrade modal */
.ef-pro-field-modal { position: fixed; inset: 0; z-index: 10000; display:none; }
.ef-pro-field-backdrop { position:absolute; inset:0; background: rgba(0,0,0,0.35); }
.ef-pro-field-content {
    position: absolute; left: 50%; top: 20%; transform: translateX(-50%);
    width: 520px; max-width: calc(100% - 40px);
    background: #fff; border: 1px solid #dcdcde; border-radius: 8px; overflow: hidden;
    box-shadow: 0 12px 30px rgba(0,0,0,0.2);
}
.ef-pro-field-header { display:flex; align-items:center; justify-content: space-between; padding: 10px 14px; background: #fff8e5; border-bottom: 1px solid #dcdcde; }
.ef-pro-field-header h3 { margin:0; font-size:16px; }
.ef-pro-field-close { background:none; border:none; color:#1d2327; font-size:20px; cursor:pointer; line-height: 1; }
.ef-pro-field-body { padding: 14px; }
.ef-pro-field-body p { margin:0; font-size:13px; line-height:1.5; }
.ef-pro-field-footer { display:flex; gap:8px; justify-content:flex-end; padding: 10px 14px; border-top: 1px solid #eee; }

/* Deletion Animation */
.ef-field-item.ef-deleting {
    animation: fadeOut 0.3s ease-out forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: scale(0.95);
    }
}

/* Form Settings Accordion Styles */
.ef-settings-panel {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    margin-bottom: 10px;
    overflow: hidden;
}

.ef-settings-panel:last-child {
    margin-bottom: 0;
}

.ef-settings-panel .ef-panel-header {
    padding: 12px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8f9fa;
    border-bottom: 1px solid #dcdcde;
    transition: background-color 0.2s ease;
}

.ef-settings-panel .ef-panel-header:hover {
    background: #f0f0f1;
}

.ef-settings-panel .ef-panel-title {
    font-size: 14px;
    font-weight: 600;
    color: #1d2327;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ef-settings-panel .ef-panel-toggle {
    color: #50575e;
    font-size: 12px;
    transition: transform 0.2s ease;
}

.ef-settings-panel.ef-panel-open .ef-panel-toggle {
    transform: rotate(90deg);
}

.ef-settings-panel .ef-panel-content {
    padding: 15px;
    display: none;
    background: #fff;
}

.ef-settings-panel.ef-panel-open .ef-panel-content {
    display: block;
    border-top: 1px solid #dcdcde;
}

/* Animation */
.ef-panel-content {
    transition: all 0.3s ease-in-out;
}

/* Toggle Switch Styles */
.ef-toggle-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.ef-toggle-switch {
    display: none;
}

.ef-toggle-slider {
    position: relative;
    width: 40px;
    height: 20px;
    background: #ccc;
    border-radius: 20px;
    transition: background 0.2s ease;
}

.ef-toggle-slider:before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.2s ease;
}

.ef-toggle-switch:checked + .ef-toggle-slider {
    background: #2271b1;
}

.ef-toggle-switch:checked + .ef-toggle-slider:before {
    transform: translateX(20px);
}
.ef-empty-state {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 6px;
    padding: 60px 40px;
    text-align: center;
    margin: 20px 0;
}

.ef-empty-content h2 {
    margin: 0 0 16px 0;
    color: #1d2327;
}

.ef-empty-content p {
    margin: 0 0 24px 0;
    color: #646970;
    font-size: 16px;
}

.ef-entries-stats {
    display: flex;
    gap: 20px;
    margin: 20px 0;
    align-items: flex-start;
}

.ef-stat-card {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 6px;
    padding: 20px;
    text-align: center;
    min-width: 150px;
}

.ef-stat-card h3 {
    font-size: 32px;
    margin: 0 0 8px 0;
}

.ef-stat-card p {
    margin: 0;
    color: #646970;
    font-size: 14px;
}

.ef-file-stats {
    display: flex;
    gap: 20px;
    margin: 20px 0;
}

.ef-file-stats .ef-stat-card {
    flex: 1;
}

.ef-setting-group {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f1;
}

.ef-setting-group:last-child {
    border-bottom: none;
}

.ef-setting-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 13px;
    color: #1d2327;
}

.ef-setting-input,
.ef-setting-select,
.ef-setting-textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.ef-setting-input:focus,
.ef-setting-select:focus,
.ef-setting-textarea:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px rgba(34, 113, 177, 0.2);
    outline: none;
}

.ef-setting-help {
    font-size: 12px;
    color: #646970;
    margin-top: 4px;
}

.spin {
    animation: spin 1s linear infinite;
}

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