/**
 * FormPays Pro Admin CSS
 * 
 * Comprehensive styling for admin interface including form builder,
 * field management, conditional logic, and form management
 */

/* ==========================================================================
   General Admin Styles
   ========================================================================== */

/* Required field indicators */
.required-indicator {
    color: #d63638;
    font-weight: bold;
    margin-left: 4px;
}

.quick-field-btn.required-field {
    border-left: 3px solid #d63638;
    background: #fff5f5;
}

.quick-field-btn.required-field:hover {
    background: #ffe5e5;
    border-left-color: #b32d2e;
}

/* Gateway-specific field requirements */
.gateway-required-field {
    border-left: 3px solid #00a32a;
    background: #f0f8f0;
}

.gateway-required-field:hover {
    background: #e8f5e8;
    border-left-color: #007cba;
}

.formpays-pro-admin-page {
    margin: 20px 0;
}

/* Clean up WordPress admin wrapper */
.wrap {
    margin: 10px 20px 0 2px;
}

.wrap h1 {
    margin: 0 0 20px 0;
}

.formpays-pro-admin-header {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
}

.formpays-pro-admin-header h1 {
    margin: 0 0 10px 0;
    color: #23282d;
}

.formpays-pro-admin-header p {
    margin: 0;
    color: #666;
}

/* ==========================================================================
   Form Builder Interface
   ========================================================================== */

/* Form Builder Header Styles */
.formpays-pro-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.formpays-pro-header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.formpays-pro-header-actions .button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    pointer-events: auto;
    position: relative;
    z-index: 10;
}

.formpays-pro-header-actions .button .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Ensure buttons are clickable */
.formpays-pro-header-actions .button,
.formpays-pro-header-actions .button:hover,
.formpays-pro-header-actions .button:focus,
.formpays-pro-header-actions .button:active {
    cursor: pointer !important;
    pointer-events: auto !important;
    position: relative !important;
    z-index: 100 !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
}

/* Template section button fixes */
.template-actions .button,
.template-actions .button:hover,
.template-actions .button:focus,
.template-actions .button:active {
    cursor: pointer !important;
    pointer-events: auto !important;
    position: relative !important;
    z-index: 10 !important;
}

/* ==========================================================================
   Template Selection Interface
   ========================================================================== */

/* Template Selection Section */
.formpays-pro-template-section {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 8px;
    padding: 40px;
    margin-bottom: 30px;
    text-align: center;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 100 !important;
}

/* Template selection interface - JavaScript will control visibility */
#template_selection_section {
    display: block;
    visibility: visible;
    opacity: 1;
    position: relative;
    z-index: 100;
}

/* Ensure template browser is hidden by default */
#template_browser_section {
    display: none;
}

/* Hidden state for template browser section */
#template_browser_section.hidden,
#template_browser_section[style*="display: none"],
#template_browser_section[style*="display:none"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    z-index: -1 !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
}

/* Hidden state for template selection section */
#template_selection_section.hidden,
#template_selection_section[style*="display: none"],
#template_selection_section[style*="display:none"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    z-index: -1 !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
}

/* Hidden state for form builder interface */
#form_builder_interface.hidden,
#form_builder_interface[style*="display: none"],
#form_builder_interface[style*="display:none"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    z-index: -1 !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
}

.template-selection-header h2 {
    font-size: 28px;
    color: #23282d;
    margin: 0 0 15px 0;
    font-weight: 600;
}

.template-intro {
    font-size: 16px;
    color: #666;
    margin: 0 0 40px 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.template-selection-options {
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 800px;
    margin: 0 auto;
}

.template-option-card {
    background: #f9f9f9;
    border: 2px solid #e1e1e1;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    flex: 1;
    min-width: 280px;
    max-width: 350px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.template-option-card:hover {
    border-color: #0073aa;
    box-shadow: 0 8px 25px rgba(0, 115, 170, 0.15);
    transform: translateY(-2px);
}

.template-option-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #0073aa, #00a0d2);
}

.template-option-icon {
    margin-bottom: 20px;
}

.template-option-icon .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: #0073aa;
}

.template-option-card h3 {
    font-size: 20px;
    color: #23282d;
    margin: 0 0 15px 0;
    font-weight: 600;
}

.template-option-card p {
    color: #666;
    margin: 0 0 25px 0;
    line-height: 1.5;
    min-height: 60px;
}

.template-option-card .button {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.3s ease;
    cursor: pointer !important;
    pointer-events: auto !important;
    position: relative !important;
    z-index: 10 !important;
}

.template-option-card .button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Ensure template selection buttons are clickable */
#show_templates_btn,
#start_from_scratch_main,
.back-to-selection {
    cursor: pointer !important;
    pointer-events: auto !important;
    position: relative !important;
    z-index: 10 !important;
}

/* Template Browser Section */
.formpays-pro-template-browser {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
}

.template-browser-header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

.back-to-selection {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.template-browser-header h2 {
    font-size: 24px;
    color: #23282d;
    margin: 0 0 10px 0;
}

.template-browser-header p {
    color: #666;
    margin: 0;
}

/* Template Categories */
.template-categories {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.template-category-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 13px;
}

.template-category-btn:hover,
.template-category-btn.active {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

/* Templates Grid */
.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Template Items */
.template-item {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.template-item:hover {
    border-color: #0073aa;
    box-shadow: 0 4px 15px rgba(0, 115, 170, 0.15);
    transform: translateY(-2px);
}

.template-header {
    text-align: center;
    margin-bottom: 15px;
}

.template-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.template-name {
    font-size: 18px;
    color: #23282d;
    margin: 0 0 10px 0;
    font-weight: 600;
}

.template-content {
    margin-bottom: 20px;
}

.template-description {
    color: #666;
    margin: 0 0 15px 0;
    line-height: 1.5;
    min-height: 40px;
}

.template-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #888;
}

.template-category {
    background: #f0f0f0;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.template-fields {
    color: #666;
}

.template-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.template-actions .button {
    flex: 1;
    padding: 8px 16px;
    font-size: 13px;
}

/* Template Actions */
.template-actions {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* Responsive Design */
@media (max-width: 768px) {
    .template-selection-options {
        flex-direction: column;
        align-items: center;
    }
    
    .template-option-card {
        min-width: 100%;
        max-width: 100%;
    }
    
    .template-browser-header {
        text-align: center;
    }
    
    .back-to-selection {
        position: static;
        transform: none;
        margin-bottom: 20px;
        display: inline-flex;
    }
    
    .template-categories {
        justify-content: center;
    }
}

/* Validation Rules Styling */
.validation-rules-container {
    margin-bottom: 15px;
}

.validation-rule-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.validation-rule-type {
    min-width: 200px;
    flex: 1;
}

.validation-rule-value {
    min-width: 150px;
    flex: 1;
}

.validation-target-field {
    min-width: 200px;
    flex: 1;
}

.remove-validation-rule {
    background: #dc3545 !important;
    border-color: #dc3545 !important;
    color: #fff !important;
    padding: 6px 12px !important;
    height: auto !important;
    line-height: 1.4 !important;
}

.remove-validation-rule:hover {
    background: #c82333 !important;
    border-color: #bd2130 !important;
}

.add-validation-rule {
    background: #28a745 !important;
    border-color: #28a745 !important;
    color: #fff !important;
    margin-top: 10px !important;
}

.add-validation-rule:hover {
    background: #218838 !important;
    border-color: #1e7e34 !important;
}

.validation-help {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 15px;
    margin-top: 15px;
    font-size: 13px;
    line-height: 1.5;
}

.validation-help code {
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
    font-size: 12px;
}

/* Accessibility Features */
.accessibility-features {
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    padding: 20px;
    margin: 20px 0;
}

.accessibility-features h4 {
    margin: 0 0 15px 0;
    color: #23282d;
    font-size: 16px;
    font-weight: 600;
}

.accessibility-toggle {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 15px;
    align-items: center;
}

.accessibility-toggle label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.accessibility-toggle label:hover {
    background-color: #e9ecef;
}

.accessibility-toggle input[type="checkbox"] {
    margin: 0;
    width: 18px;
    height: 18px;
}

.accessibility-toggle input[type="checkbox"]:checked {
    accent-color: #0073aa;
}

/* Responsive accessibility layout */
@media (max-width: 768px) {
    .accessibility-toggle {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    .accessibility-toggle label {
        width: 100%;
    }
}

.accessibility-help {
    padding: 12px;
    background: #e7f3ff;
    border: 1px solid #b3d9ff;
    border-radius: 4px;
    color: #005a87;
    font-size: 13px;
    line-height: 1.4;
}

.accessibility-help small {
    color: inherit;
    font-size: inherit;
}

/* Accessibility Feature CSS Classes */
.formpays-high-contrast {
    --formpays-primary-color: #000000 !important;
    --formpays-secondary-color: #ffffff !important;
    --formpays-border-color: #000000 !important;
    --formpays-text-color: #000000 !important;
    --formpays-bg-color: #ffffff !important;
}

.formpays-high-contrast .formpays-pro-form-builder,
.formpays-high-contrast .formpays-pro-sidebar,
.formpays-high-contrast .formpays-pro-field-item {
    border: 2px solid #000000 !important;
    background: #ffffff !important;
    color: #000000 !important;
}

.formpays-high-contrast .formpays-pro-field input,
.formpays-high-contrast .formpays-pro-field select,
.formpays-high-contrast .formpays-pro-field textarea {
    border: 2px solid #000000 !important;
    background: #ffffff !important;
    color: #000000 !important;
}

.formpays-large-text {
    --formpays-font-size: 18px !important;
    --formpays-line-height: 1.6 !important;
}

.formpays-large-text .formpays-pro-form-builder,
.formpays-large-text .formpays-pro-sidebar,
.formpays-large-text .formpays-pro-field-item {
    font-size: 18px !important;
    line-height: 1.6 !important;
}

.formpays-large-text .formpays-pro-field input,
.formpays-large-text .formpays-pro-field select,
.formpays-large-text .formpays-pro-field textarea {
    font-size: 18px !important;
    padding: 12px 16px !important;
}

.formpays-large-text .formpays-pro-field label {
    font-size: 18px !important;
    margin-bottom: 8px !important;
}

.formpays-screen-reader .formpays-pro-field input,
.formpays-screen-reader .formpays-pro-field select,
.formpays-screen-reader .formpays-pro-field textarea {
    outline: 3px solid #0073aa !important;
    outline-offset: 2px !important;
}

.formpays-screen-reader .formpays-pro-field label {
    font-weight: 700 !important;
}

.formpays-screen-reader .formpays-pro-field input:focus,
.formpays-screen-reader .formpays-pro-field select:focus,
.formpays-screen-reader .formpays-pro-field textarea:focus {
    outline: 3px solid #0073aa !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.3) !important;
}

.formpays-pro-form-builder {
    background: #fff;
    border: 1px solid #ccd0d4;
    padding: 15px;
    border-radius: 4px;
    overflow: hidden;
}

/* Hide form builder by default for new forms */
#form_builder_interface {
    display: none;
}

.formpays-pro-form-builder-container {
    display: flex;
    min-height: 600px;
}

/* Sidebar Styles */
.formpays-pro-sidebar {
    width: 350px;
    background: #f9f9f9;
    border-right: 1px solid #ccd0d4;
    padding: 20px;
    overflow-y: auto;
}

.formpays-pro-sidebar-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e1e1e1;
}

.formpays-pro-sidebar-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.formpays-pro-sidebar-section h3 {
    margin: 0 0 15px 0;
    color: #23282d;
    font-size: 16px;
    font-weight: 600;
}

.formpays-pro-sidebar .formpays-pro-field {
    margin-bottom: 15px;
}

.formpays-pro-sidebar .formpays-pro-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #23282d;
}

.formpays-pro-sidebar .formpays-pro-field input,
.formpays-pro-sidebar .formpays-pro-field select,
.formpays-pro-sidebar .formpays-pro-field textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.formpays-pro-sidebar .formpays-pro-field input:focus,
.formpays-pro-sidebar .formpays-pro-field select:focus,
.formpays-pro-sidebar .formpays-pro-field textarea:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
    outline: none;
}

/* Main Content Styles */
.formpays-pro-main-content {
    flex: 1;
    padding: 20px;
    background: #fff;
}

.formpays-pro-form-builder-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e1e1e1;
}

.formpays-pro-form-builder-header h2 {
    margin: 0;
    color: #23282d;
    font-size: 18px;
    font-weight: 600;
}

.add-field-btn {
    background: #0073aa;
    border-color: #0073aa;
    color: #fff;
}

.add-field-btn:hover {
    background: #005a87;
    border-color: #005a87;
}

/* ==========================================================================
   Field Management
   ========================================================================== */

.formpays-pro-fields-container {
    margin-bottom: 30px;
}

.formpays-pro-field-item {
    background: #f9f9f9;
    border: 1px solid #e1e1e1;
    border-radius: 4px;
    margin-bottom: 10px;
    overflow: visible;
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: move;
    transition: all 0.3s ease;
    padding-left: 35px;
}

.formpays-pro-field-item:hover {
    border-color: #0073aa;
    box-shadow: 0 2px 8px rgba(0, 115, 170, 0.15);
}

/* Drag and Drop Styles */
.formpays-pro-field-item.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
    z-index: 1000;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.formpays-pro-field-item.drag-over {
    border-color: #0073aa;
    background: #f8fbff;
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.2);
}

.formpays-pro-field-item.drag-over::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 2px dashed #0073aa;
    border-radius: 6px;
    background: rgba(0, 115, 170, 0.05);
    z-index: -1;
}

/* Drag Handle */
.field-drag-handle {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background: #ddd;
    border-radius: 3px;
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.2s ease;
    z-index: 100;
    pointer-events: auto;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.field-drag-handle:hover {
    background: #0073aa;
    color: #fff;
}

.field-drag-handle:active {
    cursor: grabbing;
}

.formpays-pro-field-item:hover .field-drag-handle {
    opacity: 1;
}

/* Make drag handle always visible for debugging */
.field-drag-handle {
    opacity: 0.7 !important;
}

.formpays-pro-field-item:hover .field-drag-handle {
    opacity: 1 !important;
}

.field-drag-handle::before {
    content: '⋮⋮';
    font-size: 12px;
    line-height: 1;
    color: #666;
    font-weight: bold;
    letter-spacing: -1px;
}

.field-drag-handle:hover::before {
    color: #fff;
}

/* Drag placeholder */
.drag-placeholder {
    background: #e3f2fd;
    border: 2px dashed #2196f3;
    border-radius: 4px;
    margin-bottom: 10px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1976d2;
    font-weight: 500;
    font-size: 14px;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.drag-placeholder::before {
    content: 'Drop field here';
    font-style: italic;
}

/* Drag feedback */
.drag-feedback {
    position: fixed;
    top: -100px;
    left: -100px;
    background: #0073aa;
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    z-index: 9999;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.drag-feedback.show {
    opacity: 1;
}

/* Sortable container */
.formpays-pro-fields-container.sortable-active {
    position: relative;
}

.formpays-pro-fields-container.sortable-active .formpays-pro-field-item {
    transition: all 0.3s ease;
}

/* Visual indicator that sortable is initialized */
.formpays-pro-fields-container.sortable-initialized {
    border: 2px dashed #0073aa;
    border-radius: 8px;
    padding: 10px;
    background: rgba(0, 115, 170, 0.05);
}

.formpays-pro-fields-container.sortable-initialized::before {
    content: '✓ Drag & Drop Enabled - You can now drag fields to reorder them';
    display: block;
    color: #0073aa;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 10px;
    padding: 8px 12px;
    background: rgba(0, 115, 170, 0.1);
    border-radius: 4px;
    border-left: 4px solid #0073aa;
}

/* Mobile drag and drop adjustments */
@media (max-width: 768px) {
    .field-drag-handle {
        opacity: 1;
        left: 5px;
        width: 18px;
        height: 18px;
    }
    
    .field-drag-handle::before {
        font-size: 10px;
    }
    
    .formpays-pro-field-item.dragging {
        transform: none;
    }
}

/* PHASE 4: BULK SELECTION STYLES */
.field-bulk-select {
    position: relative;
    top: auto;
    left: auto;
    z-index: 10;
    background: rgba(255, 255, 255, 0.95);
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #0073aa;
    box-shadow: 0 2px 4px rgba(0, 115, 170, 0.2);
    flex-shrink: 0;
    margin-top: 8px;
}

.field-bulk-select input[type="checkbox"] {
    margin: 0;
    transform: scale(1.2);
    cursor: pointer;
}

.field-bulk-select:hover {
    background: rgba(255, 255, 255, 1);
    border-color: #0073aa;
}

.field-header {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: #f1f1f1;
    border-bottom: 1px solid #e1e1e1;
    flex: 1;
}

.field-type-badge {
    background: #0073aa;
    color: #fff;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    margin-right: 10px;
}

.field-label {
    flex: 1;
    font-weight: 500;
    color: #23282d;
}

.field-label.required::after {
    content: ' *';
    color: #dc3232;
}

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

.field-actions .button {
    padding: 4px 8px;
    font-size: 12px;
    height: auto;
    line-height: 1.4;
}

/* PHASE 4: BULK OPERATIONS STYLES */
.form-builder-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.bulk-operations {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #f0f6fc;
    border: 1px solid #0073aa;
    border-radius: 4px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0, 115, 170, 0.1);
}

.bulk-selection-info {
    font-weight: 500;
    color: #0073aa;
    margin-right: 10px;
}

.bulk-operations .button {
    padding: 4px 8px;
    font-size: 12px;
    height: auto;
    line-height: 1.4;
}

.bulk-select-btn {
    background: #0073aa !important;
    color: #fff !important;
    border-color: #0073aa !important;
    font-weight: 500;
}

.bulk-select-btn:hover {
    background: #005a87 !important;
    border-color: #005a87 !important;
}

.bulk-operations .button:disabled,
.bulk-operations .button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #ccc !important;
    border-color: #ccc !important;
    color: #666 !important;
}

/* Field bulk select checkboxes */
.field-bulk-select {
    display: none;
    margin-right: 10px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #0073aa;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 115, 170, 0.2);
}

.field-bulk-select input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
    transform: scale(1.2);
}

.field-bulk-select:hover {
    background: rgba(255, 255, 255, 1);
    border-color: #005a87;
    box-shadow: 0 2px 8px rgba(0, 115, 170, 0.3);
}

/* Show bulk select when active */
.field-bulk-select.active {
    display: block;
}

/* Enhanced bulk operations styling */
.bulk-operations {
    animation: slideIn 0.3s ease-out;
    position: relative;
}

.bulk-operations.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #0073aa;
    font-weight: 500;
}

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

/* Disabled button states */
.bulk-operations .button:disabled,
.bulk-operations .button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #ccc !important;
    border-color: #ccc !important;
    color: #666 !important;
    position: relative;
}

.bulk-operations .button:disabled::after,
.bulk-operations .button.disabled::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

/* PHASE 4: KEYBOARD SHORTCUTS HELP */
.keyboard-shortcuts-help {
    background: #f0f6fc;
    border: 1px solid #0073aa;
    border-radius: 4px;
    padding: 10px 15px;
    margin-bottom: 20px;
}

.keyboard-shortcuts-help kbd {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 3px;
    padding: 2px 6px;
    font-family: monospace;
    font-size: 12px;
    box-shadow: 0 1px 0 rgba(0,0,0,0.2);
}

/* PHASE 4: ACCESSIBILITY FEATURES - REMOVED DUPLICATE */

/* PHASE 4: ACCESSIBILITY MODES */
.high-contrast-mode {
    --primary-color: #000;
    --secondary-color: #fff;
    --border-color: #000;
    --text-color: #000;
    --background-color: #fff;
}

.high-contrast-mode .formpays-pro-field-item {
    border-color: #000;
    background: #fff;
}

.high-contrast-mode .field-header {
    background: #000;
    color: #fff;
}

.large-text-mode {
    font-size: 16px;
}

.large-text-mode .formpays-pro-field-item {
    font-size: 16px;
}

.large-text-mode .field-header {
    padding: 16px 20px;
}

.screen-reader-mode .formpays-pro-field-item {
    border: 2px solid #000;
}

.screen-reader-mode .field-header {
    background: #000;
    color: #fff;
}

.field-content {
    padding: 15px;
    background: #fff;
    flex: 1;
}

/* ==========================================================================
   Field Editor Modal
   ========================================================================== */

/* Field-specific options styling */
.field-specific-options {
    margin-top: 15px;
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #e1e1e1;
    border-radius: 4px;
}

.field-specific-options label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #23282d;
}

.field-specific-options input[type="text"],
.field-specific-options input[type="number"],
.field-specific-options select,
.field-specific-options textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 10px;
}

.field-specific-options small {
    display: block;
    color: #666;
    font-size: 12px;
    margin-top: -8px;
    margin-bottom: 10px;
}

/* Address fields checkboxes */
.address-fields-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.address-fields-checkboxes label {
    display: flex;
    align-items: center;
    margin-bottom: 0;
    font-weight: normal;
}

.address-fields-checkboxes input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

/* PHASE 4: ENHANCED VALIDATION STYLES */
.validation-rules-container {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    background: #f9f9f9;
    margin-bottom: 10px;
}

.validation-rule-row {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
    padding: 10px;
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 4px;
}

.validation-rule-row:last-child {
    margin-bottom: 0;
}

.validation-rule-type {
    min-width: 150px;
}

.validation-rule-value,
.validation-target-field {
    flex: 1;
    min-width: 120px;
}

.validation-help {
    background: #f0f6fc;
    border: 1px solid #0073aa;
    border-radius: 4px;
    padding: 10px;
    margin-top: 10px;
}

.validation-help code {
    background: #fff;
    padding: 2px 4px;
    border-radius: 3px;
    font-family: monospace;
}

/* PHASE 4: PAYMENT SCHEDULING STYLES */
.time-slots-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.time-slots-container label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
}

.time-slots-container input[type="checkbox"] {
    margin: 0;
}

/* ==========================================================================
   PHASE 2: CALCULATION ENGINE STYLES
   ========================================================================== */

/* Formula Builder Styles */
.formula-builder {
    margin-bottom: 20px;
}

.formula-input-container {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.formula-input-container input {
    flex: 1;
}

.formula-input-container .button {
    white-space: nowrap;
}

.formula-help {
    margin-bottom: 15px;
}

.formula-help small {
    color: #666;
    font-style: italic;
}

/* Formula Preview Styles */
.formula-preview {
    margin-bottom: 20px;
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #e1e1e1;
    border-radius: 4px;
}

.formula-preview-display {
    min-height: 60px;
    padding: 10px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: monospace;
}

.formula-preview-content .formula-display {
    font-weight: bold;
    color: #0073aa;
    margin-bottom: 8px;
    padding: 5px;
    background: #f0f8ff;
    border-radius: 3px;
}

.formula-preview-content .formula-example {
    color: #666;
    margin-bottom: 8px;
    font-size: 13px;
}

.formula-preview-content .formula-result {
    font-weight: bold;
    color: #28a745;
    font-size: 14px;
}

.placeholder-text {
    color: #999;
    font-style: italic;
}

/* Calculation Settings Styles */
.calculation-settings {
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #e1e1e1;
    border-radius: 4px;
}

.calculation-settings label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.calculation-settings input,
.calculation-settings select {
    width: 100%;
    margin-bottom: 15px;
}

/* Field Selector Modal Styles */
.field-search {
    margin-bottom: 20px;
}

.field-search input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.available-fields {
    margin-bottom: 20px;
}

.available-fields h4 {
    margin: 0 0 15px 0;
    margin: 0 0 15px 0;
    color: #23282d;
    font-size: 14px;
    font-weight: 600;
}

.field-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    margin-bottom: 8px;
    background: #f9f9f9;
    border: 1px solid #e1e1e1;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.field-item:hover {
    background: #f0f0f0;
    border-color: #0073aa;
}

.field-item.selected {
    background: #e7f3ff;
    border-color: #0073aa;
}

.field-item .field-label {
    font-weight: 500;
    color: #23282d;
}

.field-item .field-type {
    color: #666;
    font-size: 12px;
    font-style: italic;
}

.field-item .select-field-btn {
    padding: 4px 8px;
    font-size: 12px;
}

.field-preview {
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #e1e1e1;
    border-radius: 4px;
}

.field-preview h4 {
    margin: 0 0 15px 0;
    color: #23282d;
    font-size: 14px;
    font-weight: 600;
}

.field-preview-item {
    background: #fff;
    padding: 10px;
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.4;
}

.field-preview-item code {
    background: #f0f0f0;
    padding: 2px 4px;
    border-radius: 2px;
    font-family: monospace;
}

/* Field type badges */
.field-type-badge {
    background: #0073aa;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Enhanced field editor modal */
.formpays-pro-modal .modal-content {
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.formpays-pro-modal .modal-body {
    padding: 20px;
}

.formpays-pro-field {
    margin-bottom: 20px;
}

.formpays-pro-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #23282d;
}

.formpays-pro-field input,
.formpays-pro-field select,
.formpays-pro-field textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.formpays-pro-field input:focus,
.formpays-pro-field select:focus,
.formpays-pro-field textarea:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 1px #0073aa;
}

.formpays-pro-modal {
    display: none;
    position: fixed;
    z-index: 100000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.formpays-pro-modal .modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 0;
    border-radius: 4px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.formpays-pro-modal .modal-large {
    max-width: 800px;
}

.formpays-pro-modal .modal-header {
    padding: 20px 20px 15px 20px;
    border-bottom: 1px solid #e1e1e1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.formpays-pro-modal .modal-header h3 {
    margin: 0;
    color: #23282d;
    font-size: 18px;
    font-weight: 600;
}

.formpays-pro-modal .close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.formpays-pro-modal .close:hover {
    color: #000;
}

.formpays-pro-modal .modal-body {
    padding: 20px;
}

.formpays-pro-modal .modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #e1e1e1;
    text-align: right;
}

.formpays-pro-modal .modal-footer .button {
    margin-left: 10px;
}

/* Field Editor Form */
.formpays-pro-modal .formpays-pro-field {
    margin-bottom: 20px;
}

.formpays-pro-modal .formpays-pro-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #23282d;
}

.formpays-pro-modal .formpays-pro-field input,
.formpays-pro-modal .formpays-pro-field select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.formpays-pro-modal .formpays-pro-field input:focus,
.formpays-pro-modal .formpays-pro-field select:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
    outline: none;
}

.formpays-pro-modal .formpays-pro-field small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

.formpays-pro-modal .formpays-pro-field input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

/* Field Options */
#field_options_container {
    border: 1px solid #e1e1e1;
    border-radius: 4px;
    padding: 15px;
    background: #f9f9f9;
}

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

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

.option-row input {
    flex: 1;
}

.option-row .button {
    padding: 6px 10px;
    font-size: 12px;
    height: auto;
    line-height: 1.4;
}

.add-option-btn {
    margin-top: 10px;
}

/* ==========================================================================
   Conditional Logic
   ========================================================================== */

.formpays-pro-conditional-logic {
    background: #f9f9f9;
    border: 1px solid #e1e1e1;
    border-radius: 4px;
    padding: 20px;
}

.formpays-pro-conditional-logic h3 {
    margin: 0 0 10px 0;
    color: #23282d;
    font-size: 16px;
    font-weight: 600;
}

.formpays-pro-conditional-logic p {
    margin: 0 0 20px 0;
    color: #666;
    font-size: 14px;
}

/* Enhanced Conditional Logic Styles */
.conditional-rule-group {
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 20px;
    background: #f9f9f9;
    padding: 15px;
}

.rule-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

.rule-group-header h4 {
    margin: 0;
    color: #333;
    font-size: 14px;
    font-weight: 600;
}

.rule-group-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rule-group-logic {
    font-size: 12px;
    padding: 5px 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
    background: #fff;
}

.rule-group-rules {
    margin-bottom: 10px;
}

.conditional-rule {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
    padding: 15px;
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.conditional-rule select,
.conditional-rule input[type="text"] {
    min-width: 120px;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 13px;
}

.conditional-rule select {
    background: #fff;
    cursor: pointer;
}

.conditional-rule input[type="text"] {
    flex: 1;
    min-width: 100px;
}

.rule-value-container {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 150px;
}

.rule-value2 {
    font-size: 12px !important;
    padding: 6px 8px !important;
    background: #f8f8f8 !important;
    border-style: dashed !important;
}

.rule-style-container {
    width: 100%;
    margin-top: 10px;
}

.rule-style-container input {
    width: 100%;
    font-size: 12px;
    font-family: monospace;
    background: #f0f0f0;
    border-style: dashed;
}

.conditional-logic-actions {
    margin-top: 20px;
    text-align: center;
}

.conditional-logic-help {
    margin-top: 10px;
    color: #666;
    font-style: italic;
}

.add-rule-group-btn {
    background: #2271b1;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}

.add-rule-group-btn:hover {
    background: #135e96;
}

.remove-rule-group-btn {
    background: #d63638;
    color: #fff;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 12px;
    cursor: pointer;
}

.remove-rule-group-btn:hover {
    background: #b32d2e;
}

/* Enhanced Field Editor Styles */
.field-specific-options {
    margin-top: 15px;
    padding: 15px;
    background: #f8f8f8;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
}

.formula-builder {
    margin-bottom: 15px;
}

.formula-input-container {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.formula-input-container input {
    flex: 1;
    font-family: monospace;
    font-size: 13px;
}

.insert-field-btn {
    background: #2271b1;
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

.insert-field-btn:hover {
    background: #135e96;
}

.formula-help {
    margin-bottom: 10px;
}

.formula-help small {
    color: #666;
    font-style: italic;
}

.formula-preview {
    margin-top: 15px;
}

.formula-preview-display {
    padding: 10px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 3px;
    min-height: 50px;
    font-family: monospace;
    font-size: 12px;
}

.formula-preview-content {
    line-height: 1.5;
}

.formula-display {
    font-weight: bold;
    color: #2271b1;
    margin-bottom: 5px;
}

.formula-example {
    color: #666;
    margin-bottom: 5px;
}

.formula-result {
    color: #008a00;
    font-weight: bold;
}

.placeholder-text {
    color: #999;
    font-style: italic;
}

.calculation-settings {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
}

.calculation-settings label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.calculation-settings select,
.calculation-settings input {
    width: 100%;
    margin-bottom: 10px;
}

/* Field Selector Modal Enhancements */
.field-search {
    margin-bottom: 15px;
}

.field-search input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.available-fields h4,
.field-preview h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 14px;
    font-weight: 600;
}

.field-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    margin-bottom: 5px;
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.field-item:hover {
    background: #f0f8ff;
    border-color: #2271b1;
}

.field-item.selected {
    background: #e7f3ff;
    border-color: #2271b1;
    box-shadow: 0 2px 5px rgba(34, 113, 177, 0.2);
}

.field-label {
    font-weight: 500;
    color: #333;
}

.field-type {
    font-size: 12px;
    color: #666;
    font-style: italic;
}

.select-field-btn {
    padding: 5px 10px;
    font-size: 12px;
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.select-field-btn:hover {
    background: #135e96;
}

.field-preview-item {
    background: #f9f9f9;
    padding: 10px;
    border: 1px solid #e5e5e5;
    border-radius: 3px;
    font-size: 13px;
    line-height: 1.5;
}

.field-preview-item strong {
    color: #333;
}

.field-preview-item code {
    background: #f0f0f0;
    padding: 2px 4px;
    border-radius: 2px;
    font-family: monospace;
    color: #d63638;
    font-weight: bold;
}

/* Address field checkboxes */
.address-fields-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.address-fields-checkboxes label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .conditional-rule {
        flex-direction: column;
        align-items: stretch;
    }
    
    .conditional-rule select,
    .conditional-rule input[type="text"] {
        width: 100%;
        min-width: unset;
        margin-bottom: 10px;
    }
    
    .rule-group-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .rule-group-actions {
        justify-content: space-between;
    }
    
    .formula-input-container {
        flex-direction: column;
    }
    
    .address-fields-checkboxes {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   PHASE 3: TEMPLATE SYSTEM STYLES
   ======================================== */

/* Template Section Container */
.formpays-pro-template-section {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin-bottom: 30px;
    display: block !important;
    position: relative !important;
    z-index: 1 !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.formpays-pro-template-section h2 {
    color: #1d2327;
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 10px 0;
    text-align: center;
}

.formpays-pro-template-section p {
    color: #646970;
    font-size: 16px;
    text-align: center;
    margin: 0 0 30px 0;
}

/* Template Categories */
.template-categories {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.template-category-btn {
    background: #f6f7f7;
    border: 2px solid #e5e5e5;
    border-radius: 25px;
    color: #646970;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    padding: 10px 20px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.template-category-btn:hover {
    background: #e5e5e5;
    border-color: #d1d5db;
    color: #1d2327;
}

.template-category-btn.active {
    background: #0073aa;
    border-color: #0073aa;
    color: #fff;
}

/* Templates Grid */
.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Template Cards */
.template-card {
    background: #fff;
    border: 2px solid #e5e5e5;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

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

.template-card.selected {
    border-color: #0073aa;
    box-shadow: 0 4px 20px rgba(0, 115, 170, 0.25);
    background: #f8fbff;
}

/* Template Header */
.template-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.template-icon {
    font-size: 32px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.template-info {
    flex: 1;
}

.template-name {
    color: #1d2327;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 5px 0;
    line-height: 1.3;
}

.template-category {
    background: #0073aa;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Template Body */
.template-body {
    padding: 20px;
}

.template-description {
    color: #646970;
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 15px 0;
}

.template-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #8c8f94;
}

.field-count {
    background: #f0f6fc;
    color: #0073aa;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 500;
}

.template-type {
    background: #f0f6fc;
    color: #0073aa;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 500;
}

/* Template Footer */
.template-footer {
    background: #f8f9fa;
    padding: 20px;
    display: flex;
    gap: 10px;
    border-top: 1px solid #e5e5e5;
}

.template-footer .button {
    flex: 1;
    font-size: 13px;
    padding: 8px 16px;
    height: auto;
}

/* Template Actions */
.template-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    align-items: center;
}

.template-actions .button {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    height: auto;
    cursor: pointer !important;
    pointer-events: auto !important;
    position: relative !important;
    z-index: 10 !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
}

/* Template Item Styles */
.template-item {
    background: #fff;
    border: 2px solid #e5e5e5;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    padding: 20px;
}

.template-item:hover {
    border-color: #0073aa;
    box-shadow: 0 4px 16px rgba(0, 115, 170, 0.15);
    transform: translateY(-2px);
}

.template-item.selected {
    border-color: #0073aa;
    box-shadow: 0 4px 20px rgba(0, 115, 170, 0.25);
    background: #f8fbff;
}

.template-item .template-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.template-item .template-icon {
    font-size: 32px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.template-item .template-name {
    color: #1d2327;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
}

.template-item .template-content {
    margin-bottom: 20px;
}

.template-item .template-description {
    color: #646970;
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 15px 0;
}

.template-item .template-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #8c8f94;
}

.template-item .template-category {
    background: #f0f6fc;
    color: #0073aa;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.template-item .template-fields {
    background: #f0f6fc;
    color: #0073aa;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 500;
}

.template-item .template-actions {
    display: flex;
    gap: 10px;
}

.template-item .template-actions .button {
    flex: 1;
    font-size: 13px;
    padding: 8px 16px;
    height: auto;
}

/* Template Details Modal */
.template-details-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.template-details-modal .modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.template-details-modal .modal-content {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    z-index: 1;
}

.template-details-modal .modal-header {
    padding: 20px 20px 0 20px;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.template-details-modal .modal-header h3 {
    margin: 0;
    color: #1d2327;
    font-size: 20px;
    font-weight: 600;
}

.template-details-modal .modal-header .close {
    font-size: 24px;
    color: #646970;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.template-details-modal .modal-header .close:hover {
    background: #f0f0f0;
    color: #1d2327;
}

.template-details-modal .modal-body {
    padding: 20px;
}

.template-details-modal .template-info {
    margin-bottom: 20px;
}

.template-details-modal .template-info p {
    margin: 0 0 10px 0;
    color: #646970;
    line-height: 1.5;
}

.template-details-modal .template-info strong {
    color: #1d2327;
}

.template-details-modal .template-fields-preview h4 {
    margin: 0 0 15px 0;
    color: #1d2327;
    font-size: 16px;
    font-weight: 600;
}

.template-details-modal .fields-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 15px;
    background: #f8f9fa;
}

.template-details-modal .field-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #e5e5e5;
}

.template-details-modal .field-preview:last-child {
    border-bottom: none;
}

.template-details-modal .field-type {
    background: #0073aa;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    min-width: 60px;
    text-align: center;
}

.template-details-modal .field-label {
    flex: 1;
    color: #1d2327;
    font-size: 14px;
}

.template-details-modal .field-required {
    background: #dc3545;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

.template-details-modal .modal-footer {
    padding: 20px;
    border-top: 1px solid #e5e5e5;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.template-details-modal .modal-footer .button {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    height: auto;
}

/* Notification Styles */
.formpays-pro-notification {
    position: fixed;
    top: 32px; /* Position below WordPress admin bar */
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: #fff;
    font-weight: 500;
    z-index: 999999;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    animation: slideInRight 0.3s ease;
    min-width: 300px;
    max-width: 400px;
    word-wrap: break-word;
    font-size: 14px;
    line-height: 1.4;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.formpays-pro-notification.visible {
    opacity: 1 !important;
    transform: translateX(0) !important;
    visibility: visible !important;
    display: block !important;
}

/* Ensure notification is above all other elements */
.formpays-pro-notification {
    position: fixed !important;
    z-index: 999999 !important;
    pointer-events: auto !important;
}

.formpays-pro-notification.success {
    background: #28a745 !important;
    border: 2px solid #1e7e34;
}

.formpays-pro-notification.error {
    background: #dc3545 !important;
    border: 2px solid #c82333;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Field Item Styles */
.formpays-pro-field-item {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.formpays-pro-field-item:hover {
    border-color: #0073aa;
    box-shadow: 0 4px 8px rgba(0, 115, 170, 0.1);
}

.formpays-pro-field-item.drag-over {
    border-color: #0073aa;
    background: #f8fbff;
    transform: scale(1.02);
}

.formpays-pro-field-item .field-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    background: #f8f9fa;
}

.formpays-pro-field-item .field-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.formpays-pro-field-item .field-type {
    background: #0073aa;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

.formpays-pro-field-item .field-label {
    color: #1d2327;
    font-weight: 500;
    font-size: 14px;
}

.formpays-pro-field-item .field-required {
    background: #dc3545;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

.formpays-pro-field-item .field-actions {
    display: flex;
    gap: 5px;
}

.formpays-pro-field-item .field-actions .button {
    font-size: 11px;
    padding: 4px 8px;
    height: auto;
    line-height: 1.2;
}

.formpays-pro-field-item .field-preview {
    padding: 15px;
}

.formpays-pro-field-item .field-preview input,
.formpays-pro-field-item .field-preview textarea,
.formpays-pro-field-item .field-preview select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f8f9fa;
    color: #666;
}

.formpays-pro-field-item .field-preview .radio-options,
.formpays-pro-field-item .field-preview .checkbox-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.formpays-pro-field-item .field-preview .radio-options label,
.formpays-pro-field-item .field-preview .checkbox-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #666;
}

.formpays-pro-field-item .field-preview .address-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.formpays-pro-field-item .field-preview .section-divider {
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border: 1px dashed #ddd;
    border-radius: 4px;
    color: #666;
    font-weight: 500;
}

.formpays-pro-field-item .field-preview .section-divider.box {
    background: #e3f2fd;
    border-color: #2196f3;
    color: #1976d2;
}

.formpays-pro-field-item .field-preview .section-divider.card {
    background: #fff3e0;
    border-color: #ff9800;
    color: #f57c00;
}

.formpays-pro-field-item .field-preview .calculation-field {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #f0f6fc;
    border: 1px solid #0073aa;
    border-radius: 4px;
}

.formpays-pro-field-item .field-preview .calculation-field .formula {
    font-family: monospace;
    background: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #ddd;
    flex: 1;
}

.formpays-pro-field-item .field-preview .calculation-field .prefix {
    background: #0073aa;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 500;
}

/* Template Preview Modal */
.template-preview-modal {
    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;
    padding: 20px;
}

.template-preview-content {
    background: #fff;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.template-preview-header {
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    color: #fff;
    padding: 25px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.template-preview-header h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
}

.close-preview-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.close-preview-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.template-preview-body {
    padding: 25px;
}

.template-preview-info p {
    margin: 0 0 10px 0;
    color: #646970;
    font-size: 14px;
    line-height: 1.5;
}

.template-preview-info strong {
    color: #1d2327;
}

.template-preview-fields h3 {
    color: #1d2327;
    font-size: 18px;
    font-weight: 600;
    margin: 25px 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e5e5;
}

.fields-list {
    display: grid;
    gap: 10px;
}

.field-item {
    background: #f8f9fa;
    padding: 12px 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-left: 4px solid #0073aa;
}

.field-type {
    background: #0073aa;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 60px;
    text-align: center;
}

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

.field-label .required {
    color: #d63638;
    font-weight: 700;
}

.template-preview-footer {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 0 0 12px 12px;
    text-align: center;
    border-top: 1px solid #e5e5e5;
}

.use-this-template-btn {
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    height: auto;
}

/* Template Messages */
.template-selection-message,
.import-success-message {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    border: 1px solid #bee5eb;
    border-radius: 8px;
    padding: 15px 20px;
    margin: 20px 0;
    animation: slideInDown 0.5s ease;
}

.import-success-message {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-color: #c3e6cb;
}

.message-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.message-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.message-text {
    color: #0c5460;
    font-size: 14px;
    font-weight: 500;
    margin: 0;
}

.import-success-message .message-text {
    color: #155724;
}

/* Responsive Design */
@media (max-width: 768px) {
    .formpays-pro-template-section {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .template-categories {
        gap: 8px;
        margin-bottom: 20px;
    }
    
    .template-category-btn {
        font-size: 13px;
        padding: 8px 16px;
    }
    
    .templates-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-bottom: 20px;
    }
    
    .template-header {
        padding: 15px;
    }
    
    .template-icon {
        width: 40px;
        height: 40px;
        font-size: 24px;
    }
    
    .template-name {
        font-size: 16px;
    }
    
    .template-body {
        padding: 15px;
    }
    
    .template-footer {
        padding: 15px;
        flex-direction: column;
    }
    
    .template-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .template-preview-content {
        margin: 20px;
        max-height: 90vh;
    }
    
    .template-preview-header {
        padding: 20px;
    }
    
    .template-preview-header h2 {
        font-size: 20px;
    }
    
    .template-preview-body {
        padding: 20px;
    }
    
    .template-preview-footer {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .formpays-pro-template-section {
        padding: 15px;
    }
    
    .template-categories {
        flex-direction: column;
        align-items: stretch;
    }
    
    .template-category-btn {
        text-align: center;
    }
    
    .template-header {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .template-meta {
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
    }
    
    .template-preview-content {
        margin: 10px;
    }
}

/* Animations */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Template Card Hover Effects */
.template-card {
    position: relative;
}

.template-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 115, 170, 0.05) 0%, rgba(0, 115, 170, 0.02) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 12px;
    pointer-events: none;
}

.template-card:hover::before {
    opacity: 1;
}

/* Template Selection State */
.template-card.selected::after {
    content: '✓';
    position: absolute;
    top: 15px;
    right: 15px;
    background: #0073aa;
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0, 115, 170, 0.3);
}

/* Loading State for Templates */
.templates-grid.loading {
    opacity: 0.6;
    pointer-events: none;
}

.templates-grid.loading::after {
    content: 'Loading templates...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #646970;
    font-size: 14px;
    font-style: italic;
}

/* ========================================
   AMOUNT OPTIONS
   ======================================== */

.amount-option-row {
    display: grid;
    grid-template-columns: 2fr 2fr auto;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

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

.amount-option-row input {
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
}

.amount-option-row .button {
    padding: 6px 10px;
    font-size: 12px;
    height: auto;
    line-height: 1.4;
}

.add-amount-option {
    margin-top: 10px;
}

/* ========================================
   FORM ACTIONS
   ======================================== */

.formpays-pro-form-actions {
    background: #f9f9f9;
    border-top: 1px solid #e1e1e1;
    padding: 20px;
    text-align: right;
}

.formpays-pro-form-actions .button {
    margin-left: 10px;
}

/* ========================================
   FORMS LIST
   ======================================== */

.formpays-pro-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.formpays-pro-overview-item {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    padding: 20px;
    text-align: center;
}

.overview-number {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: #0073aa;
    margin-bottom: 5px;
}

.overview-label {
    color: #666;
    font-size: 14px;
}

/* No Forms Message */
.formpays-pro-no-forms {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
}

.no-forms-icon {
    font-size: 64px;
    color: #ccc;
    margin-bottom: 20px;
}

.formpays-pro-no-forms h2 {
    margin: 0 0 15px 0;
    color: #23282d;
    font-size: 24px;
}

.formpays-pro-no-forms p {
    margin: 0 0 25px 0;
    color: #666;
    font-size: 16px;
}

/* Forms Table */
.formpays-pro-forms-table-wrapper {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    overflow: hidden;
}

.formpays-pro-forms-table {
    margin: 0;
}

.formpays-pro-forms-table th {
    font-weight: 600;
}

.formpays-pro-forms-table .column-title{
    width: 25%;
}

.formpays-pro-forms-table .column-gateway{
    width: 10%;
}

.formpays-pro-forms-table .column-amount{
    width: 10%;
}

.formpays-pro-forms-table .column-status{
    width: 10%;
}

.formpays-pro-forms-table .column-shortcode{
    width: 25%;
}

.formpays-pro-forms-table .column-actions{
    width: 20%;
}

@media (max-width: 768px) {

    .formpays-pro-forms-table .column-title{
        width: 100%;
    }


    .formpays-pro-forms-table .column-gateway{
        width: 100%;
    }

    .formpays-pro-forms-table .column-amount{
        width: 100%;
    }

    .formpays-pro-forms-table .column-status{
        width: 100%;
    }

    .formpays-pro-forms-table .column-shortcode{
        width: 100%;
    }

    .formpays-pro-forms-table .column-actions{
        width: 100%;
    }
}

.formpays-pro-forms-table .form-title a {
    color: #0073aa;
    text-decoration: none;
    font-weight: 600;
}

.formpays-pro-forms-table .form-title a:hover {
    color: #005a87;
}

.form-description {
    color: #666;
    font-size: 13px;
    margin: 5px 0;
}

.form-meta {
    font-size: 12px;
    color: #999;
}

.form-meta span {
    margin-right: 15px;
}

/* Status and Gateway Badges */
.gateway-badge,
.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.gateway-razorpay {
    background: #f0f8ff;
    color: #0066cc;
}

.gateway-payu {
    background: #fff0f0;
    color: #cc0000;
}

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

.status-inactive {
    background: #f8d7da;
    color: #721c24;
}

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

/* Amount Display */
.amount-fixed {
    font-weight: 600;
    color: #0073aa;
}

.amount-multiple,
.amount-custom {
    color: #666;
    font-style: italic;
}

/* Shortcode Container */
.shortcode-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-shortcode {
    background: #f1f1f1;
    padding: 6px 10px;
    border-radius: 3px;
    font-family: monospace;
    font-size: 12px;
    color: #333;
}

.copy-shortcode-btn {
    padding: 4px 8px;
    font-size: 11px;
    height: auto;
    line-height: 1.4;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.action-buttons .button {
    padding: 4px 8px;
    font-size: 11px;
    height: auto;
    line-height: 1.4;
}

/* Bulk Actions */
.formpays-pro-bulk-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.bulk-actions-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bulk-actions-right {
    color: #666;
    font-size: 14px;
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

.formpays-pro-error {
    color: #dc3232;
    border-left: 4px solid #dc3232;
    padding: 10px 15px;
    background: #fff;
    margin: 20px 0;
}

.formpays-pro-success {
    color: #46b450;
    border-left: 4px solid #46b450;
    padding: 10px 15px;
    background: #fff;
    margin: 20px 0;
}

.formpays-pro-warning {
    color: #ffb900;
    border-left: 4px solid #ffb900;
    padding: 10px 15px;
    background: #fff;
    margin: 20px 0;
}

/* ========================================
   LOADING STATES
   ======================================== */

.formpays-pro-loading {
    opacity: 0.6;
    pointer-events: none;
}

.formpays-pro-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: formpays-pro-spin 1s linear infinite;
}

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

/* ========================================
   PHASE 3: TEMPLATE SYSTEM STYLES
   ======================================== */

.formpays-pro-template-section {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    padding: 30px;
    margin-bottom: 20px;
}

.formpays-pro-template-section h2 {
    margin: 0 0 10px 0;
    color: #23282d;
    font-size: 24px;
}

.formpays-pro-template-section p {
    margin: 0 0 25px 0;
    color: #666;
    font-size: 16px;
}

/* Template Categories */
.template-categories {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.template-category-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: #f9f9f9;
    color: #666;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.template-category-btn:hover {
    background: #e9e9e9;
    border-color: #ccc;
}

.template-category-btn.active {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

/* Templates Grid */
.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.template-item {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    background: #fff;
    transition: all 0.3s ease;
    cursor: pointer;
}

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

.template-preview {
    text-align: center;
    margin-bottom: 15px;
}

.template-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto;
    background: #f0f8ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #0073aa;
}

.template-icon .dashicons {
    font-size: 28px;
    width: 28px;
    height: 28px;
}

.donation-icon { background: #fff0f0; color: #dc3232; }
.event-icon { background: #f0fff0; color: #46b450; }
.contact-icon { background: #f0f0ff; color: #0073aa; }
.ecommerce-icon { background: #fff8f0; color: #ffb900; }
.business-icon { background: #f8f0ff; color: #9c27b0; }

.template-info h4 {
    margin: 0 0 8px 0;
    color: #23282d;
    font-size: 18px;
    font-weight: 600;
}

.template-info p {
    margin: 0 0 15px 0;
    color: #666;
    font-size: 14px;
    line-height: 1.4;
}

.template-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 12px;
    color: #999;
}

.template-fields {
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 10px;
}

.template-category {
    text-transform: uppercase;
    font-weight: 500;
}

.template-actions {
    display: flex;
    gap: 10px;
}

.template-actions .button {
    flex: 1;
    text-align: center;
}

/* Template Actions */
.template-actions {
    margin-top: 20px;
    text-align: center;
}

.template-actions .button {
    margin: 0 5px;
}

/* Template Preview Modal */
.template-preview-modal {
    padding: 20px;
}

.template-preview-modal h3 {
    margin: 0 0 10px 0;
    color: #23282d;
    font-size: 20px;
}

.template-preview-modal .template-description {
    margin: 0 0 20px 0;
    color: #666;
    font-size: 14px;
}

.template-fields-preview h4 {
    margin: 0 0 15px 0;
    color: #23282d;
    font-size: 16px;
}

.fields-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    background: #f9f9f9;
}

.field-preview-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

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

.field-preview-item .field-type {
    background: #0073aa;
    color: #fff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 500;
}

.field-preview-item .field-label {
    color: #23282d;
    font-weight: 500;
}

.field-preview-item .required {
    color: #dc3232;
    font-weight: bold;
}

/* Responsive Design */
@media (max-width: 768px) {
    .templates-grid {
        grid-template-columns: 1fr;
    }
    
    .template-categories {
        justify-content: center;
    }
    
    .template-actions {
        flex-direction: column;
    }
    
    .template-actions .button {
        margin: 5px 0;
    }
}

/* ========================================
   PHASE 4: ADVANCED FEATURES STYLES
   ======================================== */

/* Advanced Validation Styles */
.validation-rules-container {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    background: #f9f9f9;
    margin-bottom: 15px;
}

.validation-rule-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
}

.validation-rule-row:last-child {
    margin-bottom: 0;
}

.validation-rule-type {
    flex: 2;
    min-width: 150px;
}

.validation-rule-value {
    flex: 2;
    min-width: 120px;
}

.remove-validation-rule {
    flex: 0 0 auto;
    padding: 4px 8px;
    font-size: 11px;
    height: auto;
    line-height: 1.4;
}

.add-validation-rule {
    margin-top: 10px;
}

/* Payment Methods Checkboxes */
.payment-methods-checkboxes,
.export-formats-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.payment-methods-checkboxes label,
.export-formats-checkboxes label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    cursor: pointer;
}

.payment-methods-checkboxes input[type="checkbox"],
.export-formats-checkboxes input[type="checkbox"] {
    width: auto;
    margin: 0;
}

/* Payment Plan Options */
#installment_options,
#subscription_options {
    background: #f0f8ff;
    border: 1px solid #cce5ff;
    border-radius: 4px;
    padding: 15px;
    margin-top: 10px;
}

/* Analytics & Export Section */
.formpays-pro-sidebar-section h3 {
    color: #0073aa;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 8px;
}

/* Validation Preview */
.validation-preview {
    background: #f0f8ff;
    border: 1px solid #cce5ff;
    border-radius: 4px;
    padding: 15px;
    margin-top: 15px;
}

.validation-preview h4 {
    margin: 0 0 10px 0;
    color: #0073aa;
    font-size: 14px;
}

.validation-preview-content {
    font-size: 13px;
    color: #666;
}

/* Enhanced Payment Features */
.payment-method-icon {
    width: 24px;
    height: 24px;
    margin-right: 8px;
    vertical-align: middle;
}

.payment-plan-calculator {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    margin-top: 15px;
}

.payment-plan-calculator h4 {
    margin: 0 0 10px 0;
    color: #23282d;
    font-size: 14px;
}

.payment-plan-result {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    margin-top: 10px;
    text-align: center;
    font-weight: 600;
    color: #0073aa;
}

/* ==========================================================================
   Dashboard Styles
   ========================================================================== */

.formpays-pro-dashboard {
    margin-top: 20px;
}

/* Dashboard Header */
.formpays-pro-dashboard h1 {
    margin: 0 0 20px 0;
    color: #23282d;
    font-size: 28px;
    font-weight: 600;
    padding-bottom: 15px;
    border-bottom: 2px solid #0073aa;
}

/* Statistics Grid */
.formpays-pro-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.formpays-pro-stat-card {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 8px;
    padding: 25px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.formpays-pro-stat-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.formpays-pro-stat-card .stat-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #0073aa, #005a87);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    flex-shrink: 0;
}

.formpays-pro-stat-card .stat-icon .dashicons {
    font-size: 28px;
    color: #fff;
    width: auto;
    height: auto;
}

.formpays-pro-stat-card .stat-content h3 {
    margin: 0 0 5px 0;
    font-size: 32px;
    font-weight: 700;
    color: #23282d;
    line-height: 1;
}

.formpays-pro-stat-card .stat-content p {
    margin: 0;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Quick Actions */
.formpays-pro-quick-actions {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.formpays-pro-quick-actions h2 {
    margin: 0 0 20px 0;
    color: #23282d;
    font-size: 20px;
    font-weight: 600;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.quick-actions-grid .button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px 20px;
    height: auto;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.quick-actions-grid .button .dashicons {
    margin-right: 8px;
    font-size: 16px;
    width: auto;
    height: auto;
}

.quick-actions-grid .button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Recent Transactions */
.formpays-pro-recent-transactions {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.formpays-pro-recent-transactions h2 {
    margin: 0 0 20px 0;
    color: #23282d;
    font-size: 20px;
    font-weight: 600;
}

.formpays-pro-no-transactions {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 40px 20px;
}

.formpays-pro-view-all {
    text-align: center;
    margin-top: 20px;
}

/* Getting Started */
.formpays-pro-getting-started {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.formpays-pro-getting-started h2 {
    margin: 0 0 25px 0;
    color: #23282d;
    font-size: 20px;
    font-weight: 600;
}

.getting-started-steps {
    display: grid;
    gap: 25px;
}

.getting-started-steps .step {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.getting-started-steps .step-number {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #0073aa, #005a87);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    flex-shrink: 0;
}

.getting-started-steps .step-content h3 {
    margin: 0 0 10px 0;
    color: #23282d;
    font-size: 16px;
    font-weight: 600;
}

.getting-started-steps .step-content p {
    margin: 0 0 15px 0;
    color: #666;
    line-height: 1.6;
}

.getting-started-steps .step-content .button {
    margin-top: 10px;
}

/* Status Badges */
.formpays-pro-status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.formpays-pro-status-success {
    background: #d4edda;
    color: #155724;
}

.formpays-pro-status-pending {
    background: #fff3cd;
    color: #856404;
}

.formpays-pro-status-failed {
    background: #f8d7da;
    color: #721c24;
}

.formpays-pro-status-refunded {
    background: #e2e3e5;
    color: #383d41;
}

.formpays-pro-status-none {
    background: #e7f3ff;
    color: #0073aa;
}

/* Analytics Dashboard */
.analytics-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.analytics-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    text-align: center;
}

.analytics-card h4 {
    margin: 0 0 8px 0;
    color: #666;
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 500;
}

.analytics-card .value {
    font-size: 24px;
    font-weight: 600;
    color: #0073aa;
}

.analytics-card .change {
    font-size: 12px;
    color: #46b450;
    margin-top: 5px;
}

/* Export Options */
.export-options {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    margin-top: 15px;
}

.export-options h4 {
    margin: 0 0 10px 0;
    color: #23282d;
    font-size: 14px;
}

.export-format-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.export-format-item:last-child {
    border-bottom: none;
}

.export-format-item .format-name {
    font-weight: 500;
}

.export-format-item .export-button {
    padding: 4px 8px;
    font-size: 11px;
    height: auto;
    line-height: 1.4;
}

/* Responsive Design for Phase 4 */
@media (max-width: 768px) {
    .validation-rule-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .validation-rule-type,
    .validation-rule-value {
        min-width: auto;
    }
    
    .analytics-summary {
        grid-template-columns: 1fr;
    }
    
    .payment-methods-checkboxes,
    .export-formats-checkboxes {
        gap: 12px;
    }
    
    /* Dashboard Responsive */
    .formpays-pro-stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .formpays-pro-stat-card {
        padding: 20px;
    }
    
    .formpays-pro-stat-card .stat-icon {
        width: 50px;
        height: 50px;
        margin-right: 15px;
    }
    
    .formpays-pro-stat-card .stat-icon .dashicons {
        font-size: 24px;
    }
    
    .formpays-pro-stat-card .stat-content h3 {
        font-size: 28px;
    }
    
    .quick-actions-grid {
        grid-template-columns: 1fr;
    }
    
    .getting-started-steps .step {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .getting-started-steps .step-number {
        align-self: center;
    }
    
    /* Validation Rules Responsive */
    .validation-rule-row {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .validation-rule-type,
    .validation-rule-value,
    .validation-target-field {
        min-width: auto;
        width: 100%;
    }
    
    .remove-validation-rule {
        align-self: flex-end;
        width: auto;
    }
}

/* ==========================================================================
   Form Size Indicator and Optimization Panel
   ========================================================================== */

.form-size-panel {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.form-size-panel:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.form-size-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 15px 0;
    color: #495057;
    font-size: 16px;
    font-weight: 600;
}

.form-size-header .dashicons {
    color: #007cba;
    font-size: 18px;
}

.form-size-content {
    background: #fff;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.size-info {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.size-info strong {
    color: #495057;
}

#current-form-size {
    font-weight: 600;
    color: #007cba;
    font-size: 16px;
}

#size-status {
    font-weight: 600;
    font-size: 14px;
}

.optimization-suggestions {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 12px;
    margin-top: 15px;
}

.optimization-suggestions strong {
    color: #856404;
    display: block;
    margin-bottom: 8px;
}

#suggestions-list {
    margin: 0;
    padding-left: 20px;
    color: #856404;
}

#suggestions-list li {
    margin-bottom: 5px;
    line-height: 1.4;
}

.form-stats {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 10px;
    margin-top: 15px;
    font-size: 12px;
    color: #6c757d;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.form-stats span {
    background: #fff;
    padding: 4px 8px;
    border-radius: 3px;
    border: 1px solid #dee2e6;
    font-weight: 500;
}

.form-size-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.form-size-actions .button {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    height: auto;
    line-height: 1.4;
    font-size: 13px;
}

.form-size-actions .button .dashicons {
    font-size: 14px;
}

/* Large form warning styles */
.formpays-pro-field-item.large-form-warning {
    border: 2px solid #ffc107;
    background: #fffbf0;
    position: relative;
}

.formpays-pro-field-item.large-form-warning .field-label {
    color: #856404;
}

.warning-icon {
    margin-left: 8px;
    font-size: 14px;
    cursor: help;
}

/* Responsive design for form size panel */
@media (max-width: 768px) {
    .form-size-panel {
        margin: 15px 0;
        padding: 12px;
    }
    
    .form-size-content {
        padding: 12px;
    }
    
    .form-size-actions {
        flex-direction: column;
    }
    
    .form-size-actions .button {
        width: 100%;
        justify-content: center;
    }
    
    .form-stats {
        flex-direction: column;
        gap: 8px;
    }
    
    .form-stats span {
        text-align: center;
    }
}

/* Form size status colors */
#size-status span[style*="color: #46b450"] {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
}

#size-status span[style*="color: #ffb900"] {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
}

#size-status span[style*="color: #dc3232"] {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
}

/* ==========================================================================
   Server Limits Section
   ========================================================================== */

.server-limits-info {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 20px;
}

.server-limits-info p {
    margin: 8px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.server-limits-info strong {
    color: #495057;
    min-width: 150px;
}

.server-limits-recommendations {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 15px;
}

.server-limits-recommendations h4 {
    margin: 0 0 10px 0;
    color: #856404;
    font-size: 14px;
}

.server-limits-recommendations ul {
    margin: 0 0 15px 0;
    padding-left: 20px;
    color: #856404;
}

.server-limits-recommendations li {
    margin-bottom: 5px;
    line-height: 1.4;
}

.server-limits-recommendations ul:last-child {
    margin-bottom: 0;
}

/* Server limit status indicators */
.limit-ok {
    background: #d4edda;
    color: #155724;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 12px;
    border: 1px solid #c3e6cb;
}

.limit-warning {
    background: #fff3cd;
    color: #856404;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 12px;
    border: 1px solid #ffeaa7;
}

.limit-error {
    background: #f8d7da;
    color: #721c24;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 12px;
    border: 1px solid #f5c6cb;
}

/* Settings section styling */
.formpays-pro-settings-section {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
}

.formpays-pro-settings-section h3 {
    margin: 0 0 15px 0;
    color: #23282d;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.formpays-pro-settings-section p {
    margin: 0 0 15px 0;
    color: #666;
    font-style: italic;
}

/* Auto-optimize button special styling */
#auto-optimize-btn {
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%) !important;
    border-color: #005a87 !important;
    color: #fff !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 4px rgba(0, 124, 186, 0.3) !important;
    transition: all 0.3s ease !important;
}

#auto-optimize-btn:hover {
    background: linear-gradient(135deg, #005a87 0%, #004a6f 100%) !important;
    border-color: #004a6f !important;
    box-shadow: 0 4px 8px rgba(0, 124, 186, 0.4) !important;
    transform: translateY(-1px) !important;
}

#auto-optimize-btn:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 4px rgba(0, 124, 186, 0.3) !important;
}

/* ==========================================================================
   Quick Field Buttons
   ========================================================================== */

.quick-field-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
}

.quick-field-btn {
    background: #f0f0f1;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    color: #2c3338;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    padding: 8px 12px;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.quick-field-btn:hover {
    background: #007cba;
    border-color: #007cba;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 124, 186, 0.2);
}

.quick-field-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 124, 186, 0.3);
}

.quick-field-btn:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Responsive design for quick field buttons */
@media (max-width: 768px) {
    .quick-field-buttons {
        flex-direction: column;
    }
    
    .quick-field-btn {
        width: 100%;
        text-align: center;
    }
}

/* ==========================================================================
   Common Settings Layout
   ========================================================================== */

/* 3-Column Layout for Page Handling */
.page-handling-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-top: 15px;
}

.page-handling-row .form-group {
    margin-bottom: 0;
}

.page-handling-row .form-group label {
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #23282d;
}

.page-handling-row .form-group select {
    width: 100%;
    max-width: none;
    height: 36px;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.page-handling-row .form-group select:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
    outline: none;
}

/* Email Notifications Layout */
.admin-email-field {
    margin-bottom: 15px;
}

.admin-email-field label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #23282d;
}

.admin-email-field input[type="email"] {
    width: 100%;
    max-width: 400px;
    height: 36px;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.admin-email-field input[type="email"]:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
    outline: none;
}

.admin-email-field .description {
    margin-top: 5px;
    font-size: 13px;
    color: #666;
    font-style: italic;
}

.email-checkbox-field {
    margin-top: 10px;
}

.email-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #23282d;
    cursor: pointer;
    transition: color 0.2s ease;
}

.email-checkbox-label:hover {
    color: #0073aa;
}

.email-checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
    cursor: pointer;
    transform: scale(1.1);
}

/* Responsive Design for Common Settings */
@media (max-width: 768px) {
    .page-handling-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .admin-email-field input[type="email"] {
        max-width: 100%;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    .page-handling-row {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }
    
    .page-handling-row .form-group:last-child {
        grid-column: 1 / -1;
    }
}

/* Transaction View Styles */
.transaction-overview {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    padding: 20px;
    margin: 20px 0;
}

.transaction-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.transaction-header h2 {
    margin: 0;
    color: #23282d;
}

.transaction-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.detail-card {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 4px;
    border-left: 4px solid #0073aa;
}

.detail-card h3 {
    margin: 0 0 8px 0;
    font-size: 12px;
    text-transform: uppercase;
    color: #666;
    font-weight: 600;
}

.detail-value {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    color: #23282d;
}

.detail-value.amount {
    font-size: 20px;
    color: #0073aa;
    font-weight: 600;
}

.transaction-section {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    padding: 20px;
    margin: 20px 0;
}

.transaction-section h2 {
    margin: 0 0 20px 0;
    color: #23282d;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

.customer-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.customer-info h4 {
    margin: 0 0 5px 0;
    font-size: 12px;
    text-transform: uppercase;
    color: #666;
    font-weight: 600;
}

.customer-info p {
    margin: 0;
    font-size: 14px;
    color: #23282d;
}

.form-data-table {
    overflow-x: auto;
}

.gateway-response {
    background: #f1f1f1;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    overflow-x: auto;
}

.gateway-response pre {
    margin: 0;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.4;
    color: #333;
}

.technical-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.tech-info h4 {
    margin: 0 0 5px 0;
    font-size: 12px;
    text-transform: uppercase;
    color: #666;
    font-weight: 600;
}

.tech-info p {
    margin: 0;
    font-size: 14px;
    color: #23282d;
    word-break: break-all;
}

/* Status Badge Styles (Transaction View specific) */
.transaction-view .status-badge {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.transaction-view .status-badge .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

.transaction-view .status-success {
    background: #28a745;
    color: #ffffff;
    border: 1px solid #1e7e34;
}

.transaction-view .status-pending {
    background: #fff3cd;
    color: #856404;
}

.transaction-view .status-failed {
    background: #f8d7da;
    color: #721c24;
}

/* Transactions Page Styles */
.formpays-pro-overview {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin: 20px 0;
}

.overview-stats {
    display: flex;
    gap: 20px;
}

.export-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.formpays-pro-overview-item {
    background: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    text-align: center;
    min-width: 120px;
}

.overview-number {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: #0073aa;
}

.overview-label {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

.formpays-pro-filters {
    background: #fff;
    padding: 15px;
    margin: 20px 0;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.formpays-pro-filters select,
.formpays-pro-filters input[type="date"] {
    margin-right: 10px;
    margin-bottom: 10px;
}

.formpays-pro-no-transactions {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.no-transactions-icon .dashicons {
    font-size: 48px;
    color: #ccc;
    margin-bottom: 20px;
}

/* Status Badge Styles (Transactions Page specific) */
.transactions-page .status-badge {
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.transactions-page .status-badge .dashicons {
    font-size: 12px;
    width: 12px;
    height: 12px;
}

.transactions-page .status-success {
    background: #28a745;
    color: #ffffff;
    border: 1px solid #1e7e34;
}

.transactions-page .status-pending {
    background: #fff3cd;
    color: #856404;
}

.transactions-page .status-failed {
    background: #f8d7da;
    color: #721c24;
}

.transactions-page .status-none {
    background: #e7f3ff;
    color: #0073aa;
    border: 1px solid #b3d9ff;
}

.customer-info .customer-email {
    font-size: 11px;
    color: #666;
    margin-top: 2px;
}

.gateway-name {
    font-weight: 500;
    color: #0073aa;
}

/* Dashboard Page Styles */
.dashboard-page .formpays-pro-status {
    padding: 3px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.dashboard-page .formpays-pro-status .dashicons {
    font-size: 10px;
    width: 10px;
    height: 10px;
}

.dashboard-page .formpays-pro-status-success {
    background: #28a745;
    color: #ffffff;
    border: 1px solid #1e7e34;
}

.dashboard-page .formpays-pro-status-pending {
    background: #fff3cd;
    color: #856404;
}

.dashboard-page .formpays-pro-status-failed {
    background: #f8d7da;
    color: #721c24;
}

.dashboard-page .formpays-pro-status-none {
    background: #e7f3ff;
    color: #0073aa;
    border: 1px solid #b3d9ff;
}

.dashboard-page .formpays-pro-stat-card .dashboard-status-success {
    background: linear-gradient(to bottom right, #0e8984, #28a745);
}

.dashboard-page .formpays-pro-stat-card .dashboard-total-transactions {
    background: linear-gradient(to bottom right, #0850b1, #6e04ae);
}

.dashboard-page .formpays-pro-stat-card .dashboard-total-revenue {
    background: linear-gradient(to bottom right, #b18408, #ae2a04);
}

/* ==========================================================================
   Pagination Styles
   ========================================================================== */

/* Top Pagination */
.formpays-pro-pagination-top {
    display: flex;
    align-items: center;
}

.formpays-pro-pagination-top .pagination-info {
    font-size: 13px;
    color: #646970;
    margin-right: 15px;
}

.formpays-pro-pagination-top .pagination-controls {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Top Bulk Actions */
.formpays-pro-bulk-actions-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0 10px 0;
    padding: 10px 0;
}

.formpays-pro-bulk-actions-top .bulk-actions-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.formpays-pro-bulk-actions-top .bulk-actions-right {
    display: flex;
    align-items: center;
}

.formpays-pro-bulk-actions-top select {
    min-width: 120px;
}

/* Bottom Pagination */
.formpays-pro-pagination-bottom {
    display: inline-flex;
    align-items: center;
    margin-left: 15px;
}

/* WordPress pagination links styling */
.formpays-pro-pagination-top .page-numbers,
.formpays-pro-pagination-bottom .page-numbers {
    display: inline-block;
    padding: 6px 12px;
    margin: 0 2px;
    text-decoration: none;
    border: 1px solid #c3c4c7;
    border-radius: 3px;
    background: #fff;
    color: #2271b1;
    font-size: 13px;
    line-height: 1.4;
    transition: all 0.1s ease-in-out;
}

.formpays-pro-pagination-top .page-numbers:hover,
.formpays-pro-pagination-bottom .page-numbers:hover {
    background: #f6f7f7;
    border-color: #8c8f94;
    color: #135e96;
}

.formpays-pro-pagination-top .page-numbers.current,
.formpays-pro-pagination-bottom .page-numbers.current {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
    font-weight: 600;
}

.formpays-pro-pagination-top .page-numbers.current:hover,
.formpays-pro-pagination-bottom .page-numbers.current:hover {
    background: #135e96;
    border-color: #135e96;
    color: #fff;
}

/* Disabled pagination buttons */
.formpays-pro-pagination-top .page-numbers.dots,
.formpays-pro-pagination-bottom .page-numbers.dots {
    border: none;
    background: none;
    color: #646970;
    cursor: default;
}

.formpays-pro-pagination-top .page-numbers.dots:hover,
.formpays-pro-pagination-bottom .page-numbers.dots:hover {
    background: none;
    border: none;
    color: #646970;
}

/* Bulk Actions */
.formpays-pro-bulk-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0;
    padding: 10px 0;
}

.formpays-pro-bulk-actions .bulk-actions-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.formpays-pro-bulk-actions .bulk-actions-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.formpays-pro-bulk-actions .displaying-num {
    font-size: 13px;
    color: #646970;
}

.formpays-pro-bulk-actions select {
    min-width: 120px;
}

/* Checkbox column styling */
.check-column {
    width: 2.2em;
    text-align: center;
    vertical-align: middle;
}

.check-column input[type="checkbox"] {
    margin: 0;
}

/* Responsive pagination */
@media (max-width: 768px) {
    .formpays-pro-pagination-top {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .formpays-pro-pagination-top .pagination-controls,
    .formpays-pro-pagination-bottom {
        justify-content: center;
    }
    
    .formpays-pro-pagination-top .page-numbers,
    .formpays-pro-pagination-bottom .page-numbers {
        padding: 4px 8px;
        font-size: 12px;
    }
    
    .formpays-pro-bulk-actions {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

