/**
 * Form Sentry CF7 - React Component Styles
 *
 * Styles for React components using WordPress design system
 *
 * @package FormSentry
 * @since 1.0.0
 */

// WordPress component imports
@import '~@wordpress/components/build-style/style.css';

// Global styles for Form Sentry Modal (outside of component scope)
.bccs-modal-enhanced {
    .components-modal__content {
        max-width: 1000px !important;
        width: 95vw !important;
        height: 90vh !important;
        max-height: 800px !important;
        background: rgba(255, 255, 255, 0.95) !important;
        backdrop-filter: blur(20px) !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
        border-radius: 20px !important;
        box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.1) !important;
        overflow: hidden !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .components-modal__header {
        display: none !important;
    }

    .modal-header {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 24px 32px !important;
        background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(59, 130, 246, 0.05) 100%) !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
        backdrop-filter: blur(10px) !important;

        .entry-number {
            background: #2563eb !important;
            color: white !important;
            padding: 8px 16px !important;
            border-radius: 12px !important;
            font-weight: 600 !important;
            font-size: 14px !important;
            box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25) !important;
        }

        .status-indicator {
            width: 8px !important;
            height: 8px !important;
            border-radius: 50% !important;
            background: #10b981 !important;
            box-shadow: 0 0 8px rgba(16, 185, 129, 0.5) !important;
            animation: pulse 2s infinite !important;
        }

        .modal-title {
            margin: 0 !important;
            font-size: 24px !important;
            font-weight: 700 !important;
            color: #1e1e1e !important;
            line-height: 1.3 !important;
        }

        .form-badge {
            display: flex !important;
            align-items: center !important;
            gap: 6px !important;
            margin-top: 4px !important;
            color: #64748b !important;
            font-size: 14px !important;
        }
    }

    .info-card {
        background: rgba(255, 255, 255, 0.7) !important;
        backdrop-filter: blur(15px) !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
        border-radius: 16px !important;
        padding: 24px !important;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1) !important;
        transition: all 0.3s ease !important;
        margin-bottom: 20px !important;

        &:hover {
            transform: translateY(-4px) !important;
            box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15) !important;
            background: rgba(255, 255, 255, 0.8) !important;
        }

        .card-header {
            display: flex !important;
            align-items: center !important;
            gap: 12px !important;
            margin-bottom: 20px !important;
            padding-bottom: 16px !important;
            border-bottom: 1px solid rgba(255, 255, 255, 0.3) !important;

            .card-icon {
                font-size: 24px !important;
                filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1)) !important;
            }

            h3 {
                margin: 0 !important;
                font-size: 18px !important;
                font-weight: 600 !important;
                color: #1e1e1e !important;
            }
        }
    }

    .components-tab-panel__tabs {
        background: rgba(255, 255, 255, 0.5) !important;
        backdrop-filter: blur(10px) !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
        padding: 0 32px !important;

        .components-tab-panel__tabs-item {
            background: transparent !important;
            border: none !important;
            border-radius: 12px 12px 0 0 !important;
            padding: 16px 24px !important;
            font-weight: 500 !important;
            color: #64748b !important;
            transition: all 0.3s ease !important;

            &:hover {
                background: rgba(255, 255, 255, 0.7) !important;
                color: #1e1e1e !important;
            }

            &.is-active {
                background: rgba(255, 255, 255, 0.9) !important;
                color: #1e1e1e !important;
                box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important;
            }
        }
    }

    .components-tab-panel__tab-content {
        background: rgba(255, 255, 255, 0.3) !important;
        padding: 32px !important;
    }

    .modal-footer {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 24px 32px !important;
        background: rgba(255, 255, 255, 0.7) !important;
        backdrop-filter: blur(10px) !important;
        border-top: 1px solid rgba(255, 255, 255, 0.2) !important;

        .close-button-footer {
            background: #2563eb !important;
            border: none !important;
            border-radius: 12px !important;
            padding: 12px 24px !important;
            color: white !important;
            font-weight: 600 !important;
            font-size: 14px !important;
            transition: all 0.3s ease !important;
            box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25) !important;

            &:hover {
                transform: translateY(-2px) !important;
                box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3) !important;
            }
        }
    }
}

// Animations
@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.2);
    }
}

// Component styles
.bccs-react {
    // Base styles for React components
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;

    // Table Container with Enhanced Styling
    &__table-container {
        overflow-x: auto;
        border-radius: 12px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
        border: 1px solid #e2e8f0;
        background: white;
        margin-bottom: 24px;

        .table-wrapper {
            position: relative;
            min-width: 100%;
        }
    }

    // Enhanced Empty State
    &__empty-state {
        text-align: center;
        padding: 80px 40px;
        background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
        border-radius: 12px;
        border: 1px solid #e2e8f0;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);

        .empty-state-icon {
            margin-bottom: 24px;

            .dashicons {
                font-size: 64px;
                color: #cbd5e1;
                opacity: 0.7;
                filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
            }
        }

        h3 {
            font-size: 20px;
            font-weight: 600;
            color: #1e1e1e;
            margin: 0 0 12px 0;
            line-height: 1.3;
        }

        p {
            font-size: 16px;
            color: #64748b;
            margin: 0;
            line-height: 1.5;
            max-width: 400px;
            margin-left: auto;
            margin-right: auto;
        }
    }

    // Entries table - Modern Design System
    &__entries-table {
        width: 100%;
        border-collapse: separate;
        border-spacing: 0;
        background: white;
        font-size: 14px;

        // Column width definitions
        .select-col { width: 60px; }
        .form-col { width: 220px; }
        .date-col { width: 180px; }
        .fields-col { width: auto; min-width: 300px; }
        .ip-col { width: 140px; }
        .actions-col { width: 160px; }

        // Custom styling for WordPress CheckboxControl components
        .components-checkbox-control__input {
            appearance: none;
            -webkit-appearance: none;
            width: 20px;
            height: 20px;
            border: 2px solid #d1d5db;
            border-radius: 6px;
            background: white;
            cursor: pointer;
            position: relative;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            margin: 0;

            &:hover {
                border-color: #2563eb;
                box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
                transform: scale(1.05);
            }

            &:checked {
                background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
                border-color: #2563eb;
                transform: scale(1.05);

                &::after {
                    content: '✓';
                    position: absolute;
                    top: 50%;
                    left: 50%;
                    transform: translate(-50%, -50%);
                    color: white;
                    font-size: 12px;
                    font-weight: bold;
                    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
                }
            }

            &:focus {
                outline: none;
                border-color: #2563eb;
                box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2);
            }
        }

        // Reset any WordPress default checkbox styling that might conflict
        .components-checkbox-control__input:checked::before {
            display: none !important;
            content: none !important;
        }

        // Reset WordPress CheckboxControl's built-in checkmark
        .components-checkbox-control__input[type="checkbox"]:checked::before {
            display: none !important;
            content: none !important;
        }

        // Also reset indeterminate state
        .components-checkbox-control__input[type="checkbox"][aria-checked="mixed"]::before {
            display: none !important;
            content: none !important;
        }

        // Reset WordPress SVG checkmarks that might overlay our custom ones
        .components-checkbox-control__checked,
        .components-checkbox-control__indeterminate {
            display: none !important;
        }

        // Handle indeterminate state for "select all" functionality
        .components-checkbox-control__input:indeterminate {
            background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
            border-color: #2563eb;

            &::after {
                content: '−';
                position: absolute;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
                color: white;
                font-size: 14px;
                font-weight: bold;
                line-height: 1;
            }
        }

        // Table header styling
        th {
            background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
            font-weight: 600;
            color: #1e1e1e;
            font-size: 13px;
            padding: 20px 24px;
            text-align: left;
            border-bottom: 1px solid #e2e8f0;
            letter-spacing: 0.025em;
            text-transform: uppercase;
            position: sticky;
            top: 0;
            z-index: 10;

            .table-header-content {
                display: flex;
                align-items: center;
                gap: 8px;
                font-weight: 600;

                .dashicons {
                    font-size: 16px;
                    color: #2563eb;
                    opacity: 0.8;
                }
            }

            &:first-child {
                border-top-left-radius: 12px;
            }

            &:last-child {
                border-top-right-radius: 12px;
            }
        }

        // Table row styling
        tbody tr {
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            background: white;

            &:hover {
                background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
                transform: translateY(-1px);
                box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
            }

            &.is-selected {
                background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
                box-shadow: inset 4px 0 0 #2563eb;

                &:hover {
                    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
                }
            }

            &:last-child td {
                border-bottom: none;

                &:first-child {
                    border-bottom-left-radius: 12px;
                }

                &:last-child {
                    border-bottom-right-radius: 12px;
                }
            }
        }

        // Table cell styling
        td {
            padding: 20px 24px;
            border-bottom: 1px solid #f1f5f9;
            vertical-align: top;
            color: #1e1e1e;
            font-size: 14px;
            line-height: 1.5;
        }

        // Form column enhanced styling
        .form-cell-content {
            .form-title {
                font-weight: 600;
                color: #1e1e1e;
                margin-bottom: 6px;
                font-size: 15px;
                line-height: 1.3;
            }

            .form-id-badge {
                display: inline-flex;
                align-items: center;
                gap: 4px;
                background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
                color: #64748b;
                font-size: 11px;
                font-weight: 500;
                padding: 4px 8px;
                border-radius: 6px;
                border: 1px solid #e2e8f0;
                font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;

                .dashicons {
                    font-size: 12px;
                    color: #94a3b8;
                }
            }
        }

        // Date column enhanced styling
        .date-cell-content {
            .date-primary {
                font-weight: 600;
                color: #1e1e1e;
                margin-bottom: 4px;
                font-size: 14px;
            }

            .date-secondary {
                font-size: 12px;
                color: #64748b;
                font-weight: 400;
            }
        }

        // Fields column enhanced styling
        .fields-cell-content {
            .field-item {
                margin-bottom: 6px;
                font-size: 13px;
                line-height: 1.4;

                .field-label {
                    font-weight: 600;
                    color: #64748b;
                    margin-right: 6px;
                }

                .field-value {
                    color: #1e1e1e;
                    font-weight: 400;
                }
            }

            .more-fields {
                display: inline-flex;
                align-items: center;
                gap: 4px;
                font-size: 11px;
                color: #94a3b8;
                font-style: italic;
                margin-top: 4px;
                padding: 2px 6px;
                background: #f8fafc;
                border-radius: 4px;

                .dashicons {
                    font-size: 12px;
                }
            }

            .no-fields {
                display: flex;
                align-items: center;
                gap: 6px;
                color: #94a3b8;
                font-style: italic;
                font-size: 13px;

                .dashicons {
                    color: #f59e0b;
                    font-size: 14px;
                }
            }
        }

        // IP Address enhanced styling
        .ip-cell-content {
            .ip-address {
                display: inline-flex;
                align-items: center;
                gap: 6px;
                font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
                font-size: 12px;
                background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
                color: #475569;
                padding: 6px 10px;
                border-radius: 8px;
                border: 1px solid #e2e8f0;
                font-weight: 500;

                &.clickable {
                    cursor: pointer;
                    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

                    &:hover {
                        background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
                        transform: translateY(-1px);
                        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
                    }

                    &:focus {
                        outline: none;
                        border-color: #2563eb;
                        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
                    }

                    &:active {
                        transform: translateY(0);
                        background: linear-gradient(135deg, #cbd5e1 0%, #94a3b8 100%);
                    }
                }

                .dashicons {
                    font-size: 12px;
                    color: #2563eb;
                }
            }

            .ip-address-empty {
                display: inline-flex;
                align-items: center;
                gap: 6px;
                color: #94a3b8;
                font-size: 12px;
                font-style: italic;

                .dashicons {
                    font-size: 14px;
                    color: #94a3b8;
                }
            }
        }

        // Actions column enhanced styling
        .entry-actions {
            display: flex;
            gap: 8px;
            align-items: center;
            justify-content: flex-start;

            .action-button {
                border-radius: 8px !important;
                font-size: 12px !important;
                font-weight: 500 !important;
                padding: 8px 12px !important;
                transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
                border: 1px solid transparent !important;
                min-height: 32px !important;
                display: inline-flex !important;
                align-items: center !important;
                justify-content: center !important;
                position: relative !important;
                overflow: hidden !important;

                // View button styling
                &.view-button {
                    color: #2563eb !important;
                    border-color: #2563eb !important;
                    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%) !important;

                    &:hover {
                        background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%) !important;
                        transform: translateY(-2px) !important;
                        box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2) !important;
                        border-color: #1e40af !important;
                    }

                    &:active {
                        transform: translateY(0) !important;
                    }
                }

                // Delete button styling
                &.delete-button {
                    color: #ef4444 !important;
                    border-color: #ef4444 !important;
                    background: linear-gradient(135deg, #ffffff 0%, #fef2f2 100%) !important;

                    &:hover {
                        background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%) !important;
                        color: #dc2626 !important;
                        border-color: #dc2626 !important;
                        transform: translateY(-2px) !important;
                        box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2) !important;
                    }

                    &:active {
                        transform: translateY(0) !important;
                    }
                }
            }
        }

        // Responsive Design - Mobile First Approach
        @media (max-width: 1200px) {
            .form-col { width: 180px; }
            .date-col { width: 160px; }
            .fields-col { min-width: 250px; }
            .ip-col { width: 120px; }
            .actions-col { width: 140px; }
        }

        @media (max-width: 1024px) {
            th, td {
                padding: 16px 20px;
                font-size: 13px;
            }

            .form-col { width: 160px; }
            .date-col { width: 140px; }
            .fields-col { min-width: 220px; }
            .ip-col { width: 100px; }
            .actions-col { width: 120px; }

            .entry-actions {
                gap: 6px;

                .action-button {
                    padding: 6px 10px !important;
                    font-size: 11px !important;
                }
            }
        }

        @media (max-width: 768px) {
            font-size: 12px;

            th, td {
                padding: 12px 16px;
            }

            th {
                font-size: 11px;

                .table-header-content {
                    gap: 4px;

                    .dashicons {
                        display: none; // Hide icons on mobile to save space
                    }
                }
            }

            .form-cell-content .form-title {
                font-size: 14px;
            }

            .date-cell-content {
                .date-primary {
                    font-size: 13px;
                }

                .date-secondary {
                    font-size: 11px;
                }
            }

            .fields-cell-content .field-item {
                font-size: 12px;

                .field-label {
                    display: block;
                    margin-bottom: 2px;
                }
            }

            .entry-actions {
                flex-direction: column;
                gap: 4px;

                .action-button {
                    width: 100%;
                    padding: 8px !important;
                    font-size: 10px !important;
                }
            }
        }

        @media (max-width: 600px) {
            // Stack table layout for very small screens
            thead {
                display: none;
            }

            tbody tr {
                display: block;
                background: white;
                border: 1px solid #e2e8f0;
                border-radius: 8px;
                margin-bottom: 16px;
                padding: 16px;
                box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);

                &:hover {
                    transform: none;
                    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
                }

                &.is-selected {
                    border-color: #2563eb;
                    box-shadow: inset 0 0 0 2px #2563eb, 0 4px 12px rgba(37, 99, 235, 0.1);
                }
            }

            tbody td {
                display: block;
                padding: 8px 0;
                border: none;
                text-align: left;
                position: relative;

                &::before {
                    content: attr(data-label);
                    font-weight: 600;
                    color: #64748b;
                    font-size: 11px;
                    text-transform: uppercase;
                    letter-spacing: 0.05em;
                    display: block;
                    margin-bottom: 4px;
                }

                &.entry-checkbox {
                    position: absolute;
                    top: 16px;
                    right: 16px;
                    padding: 0;

                    &::before {
                        display: none;
                    }
                }

                &.entry-actions-cell {
                    margin-top: 16px;
                    padding-top: 16px;
                    border-top: 1px solid #f1f5f9;

                    .entry-actions {
                        flex-direction: row;
                        justify-content: space-between;
                        gap: 8px;

                        .action-button {
                            flex: 1;
                            padding: 10px !important;
                            font-size: 12px !important;
                        }
                    }
                }
            }
        }
    }

    // Loading states
    &__loading {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 40px;
        color: #646970;
        font-style: italic;

        .components-spinner {
            margin-right: 12px;
        }
    }

    // Table container responsive adjustments
    &__table-container {
        @media (max-width: 768px) {
            border-radius: 8px;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
        }

        @media (max-width: 600px) {
            background: transparent;
            border: none;
            box-shadow: none;
            border-radius: 0;

            .table-wrapper {
                background: transparent;
            }
        }
    }

    // Filters bar - Enhanced Design System
    &__filters {
        background: white;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        padding: 24px;
        margin-bottom: 24px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
        transition: all 0.2s ease;

        &:hover {
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        }

        .bccs-filters-header {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-bottom: 20px;
            padding-bottom: 16px;
            border-bottom: 1px solid #f1f5f9;

            .dashicons {
                color: #2563eb;
                font-size: 20px;
            }

            h3 {
                margin: 0;
                font-size: 16px;
                font-weight: 600;
                color: #1e1e1e;
            }
        }

        .bccs-filters-row {
            display: grid;
            grid-template-columns: 2fr 1fr auto;
            gap: 20px;
            align-items: end;

            @media (max-width: 768px) {
                grid-template-columns: 1fr;
                gap: 16px;
            }
        }

        .bccs-filter-group {
            display: flex;
            flex-direction: column;
            gap: 6px;

            label {
                font-size: 13px;
                font-weight: 600;
                color: #475569;
                margin: 0;
            }
        }

        // Search Control Styling
        .components-search-control {
            .components-search-control__input {
                border: 1px solid #d1d5db;
                border-radius: 8px;
                padding: 10px 12px 10px 40px;
                font-size: 14px;
                background: #ffffff;
                transition: all 0.2s ease;
                min-height: 40px;

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

                &::placeholder {
                    color: #94a3b8;
                }
            }

            .components-search-control__icon {
                color: #64748b;
                left: 12px;
            }
        }

        // Select Control Styling
        .components-select-control__input {
            border: 1px solid #d1d5db;
            border-radius: 8px;
            padding: 10px 12px;
            font-size: 14px;
            background: white;
            transition: all 0.2s ease;
            min-height: 40px;

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

            &:disabled {
                background: #f8fafc;
                color: #94a3b8;
                cursor: not-allowed;
            }
        }

        // Export Button Styling
        .components-button {
            &.is-secondary {
                height: 40px;
                background: #2563eb;
                border-color: #2563eb;
                color: white !important;
                border-radius: 8px;
                font-weight: 600;
                font-size: 14px;
                padding: 10px 20px;
                box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
                transition: all 0.2s ease;
                display: flex;
                align-items: center;
                gap: 8px;
                min-width: 120px;
                justify-content: center;

                &:hover {
                    background: #1e40af !important;
                    border-color: #1e40af !important;
                    color: white !important;
                    transform: translateY(-1px);
                    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
                }

                &:focus {
                    background: #2563eb !important;
                    border-color: #2563eb !important;
                    color: white !important;
                    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.5);
                }

                &.is-busy {
                    opacity: 0.7;
                    cursor: not-allowed;
                    background: #2563eb !important;
                    color: white !important;
                }

                .dashicons {
                    font-size: 16px;
                    color: white !important;
                }
            }
        }
    }

    // Pagination
    &__pagination {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px;
        background: #fff;
        border: 1px solid #c3c4c7;
        border-radius: 4px;
        margin-top: 20px;

        &-info {
            color: #646970;
            font-size: 14px;
        }

        &-controls {
            display: flex;
            align-items: center;
            gap: 8px;
        }
    }

    /* Modal styles consolidated in modal-styles.css */

    // Action buttons
    &__actions {
        display: flex;
        gap: 8px;
        align-items: center;

        .components-button {
            &.is-small {
                height: 32px;
                padding: 0 12px;
            }
        }
    }

    // Bulk actions - Enhanced Design System
    &__bulk-actions {
        display: flex;
        align-items: center;
        gap: 16px;
        padding: 16px 20px;
        background: white;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        margin-bottom: 20px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
        transition: all 0.2s ease;

        &:hover {
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        }

        &.hidden {
            display: none;
        }

        .selected-count {
            font-weight: 600;
            color: #1e1e1e;
            background: #eff6ff;
            padding: 6px 12px;
            border-radius: 6px;
            font-size: 14px;
            border: 1px solid rgba(37, 99, 235, 0.2);
        }

        .components-button {
            &.is-secondary {
                height: 36px;
                border-radius: 8px;
                font-size: 13px;
                font-weight: 600;
                padding: 8px 16px;
                transition: all 0.2s ease;
                display: flex;
                align-items: center;
                gap: 6px;

                &:not(.is-destructive) {
                    color: #2563eb;
                    border-color: #2563eb;
                    background: white;

                    &:hover {
                        background: #eff6ff;
                        transform: translateY(-1px);
                        box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
                    }
                }

                &.is-destructive {
                    color: #ef4444;
                    border-color: #ef4444;
                    background: white;

                    &:hover {
                        background: #fef2f2;
                        color: #dc2626;
                        border-color: #dc2626;
                        transform: translateY(-1px);
                        box-shadow: 0 2px 8px rgba(239, 68, 68, 0.15);
                    }
                }

                .dashicons {
                    font-size: 14px;
                }
            }
        }
    }

    // Enhanced Responsive design
    @media (max-width: 1024px) {
        &__modal {
            .components-modal__content {
                width: 98vw !important;
                height: 95vh !important;
                max-height: none !important;
                border-radius: 12px !important;
            }

            .modal-header {
                padding: 20px 24px;

                .modal-title-section {
                    .title-content {
                        .modal-title {
                            font-size: 20px;
                        }
                    }
                }

                .modal-actions {
                    .action-buttons {
                        gap: 6px;

                        .action-button {
                            padding: 8px 12px !important;
                            font-size: 13px !important;
                        }
                    }
                }
            }

            .modal-content-wrapper {
                .enhanced-tabs {
                    .components-tab-panel__tabs {
                        padding: 0 24px !important;

                        .components-tab-panel__tabs-item {
                            padding: 12px 16px !important;
                            font-size: 14px !important;
                        }
                    }

                    .components-tab-panel__tab-content {
                        padding: 24px !important;
                    }
                }
            }

            .modal-footer {
                padding: 20px 24px;
                flex-direction: column;
                gap: 16px;
                text-align: center;

                .footer-info {
                    align-items: center;

                    .entry-stats {
                        justify-content: center;
                    }
                }
            }
        }
    }

    @media (max-width: 782px) {
        &__filters {
            padding: 20px;

            .bccs-filters-header {
                margin-bottom: 16px;
                padding-bottom: 12px;

                h3 {
                    font-size: 15px;
                }
            }

            .bccs-filters-row {
                grid-template-columns: 1fr;
                gap: 16px;
            }

            .bccs-filter-group {
                label {
                    font-size: 12px;
                }
            }

            .components-search-control {
                .components-search-control__input {
                    font-size: 13px;
                    padding: 8px 10px 8px 35px;
                    min-height: 36px;
                }
            }

            .components-select-control__input {
                font-size: 13px;
                padding: 8px 10px;
                min-height: 36px;
            }

            .components-button {
                &.is-secondary {
                    height: 36px;
                    font-size: 13px;
                    padding: 8px 16px;
                    align-self: stretch;
                    justify-content: center;
                }
            }
        }

        &__entries-table {
            font-size: 13px;
            border-radius: 8px;

            th, td {
                padding: 12px 16px;
            }

            .entry-actions {
                flex-direction: column;
                gap: 6px;

                .components-button {
                    font-size: 12px;
                    padding: 6px 10px;
                }
            }
        }

        &__pagination {
            flex-direction: column;
            gap: 16px;
            text-align: center;
            padding: 16px 20px;
        }

        &__bulk-actions {
            flex-direction: column;
            align-items: stretch;
            text-align: center;
            padding: 16px;
            gap: 12px;

            .selected-count {
                text-align: center;
                align-self: center;
            }

            .bulk-actions-buttons {
                display: flex;
                flex-direction: column;
                gap: 12px;

                .components-button {
                    &.is-secondary {
                        width: 100%;
                        justify-content: center;
                        height: 40px;
                        font-size: 14px;
                    }
                }
            }
        }
    }

    @media (max-width: 600px) {
        // Enhanced modal responsive styles
        &__modal {
            .components-modal__content {
                width: 100vw !important;
                height: 100vh !important;
                max-width: none !important;
                max-height: none !important;
                border-radius: 0 !important;
            }

            .modal-header {
                padding: 16px 20px;
                flex-direction: column;
                gap: 16px;
                align-items: stretch;

                .modal-title-section {
                    justify-content: center;
                    text-align: center;

                    .entry-badge-container {
                        .entry-number {
                            font-size: 12px;
                            padding: 6px 12px;
                        }
                    }

                    .title-content {
                        .modal-title {
                            font-size: 18px;
                        }

                        .form-badge {
                            justify-content: center;
                            font-size: 13px;
                        }
                    }
                }

                .modal-actions {
                    justify-content: space-between;

                    .action-buttons {
                        flex: 1;
                        justify-content: center;
                        gap: 12px;

                        .action-button {
                            flex: 1;
                            justify-content: center;
                            padding: 10px 8px !important;
                            font-size: 12px !important;
                        }
                    }

                    .close-button-header {
                        order: -1;
                        align-self: flex-start;
                    }
                }
            }

            .modal-content-wrapper {
                .enhanced-tabs {
                    .components-tab-panel__tabs {
                        padding: 0 20px !important;
                        flex-wrap: wrap;
                        justify-content: center;

                        .components-tab-panel__tabs-item {
                            padding: 10px 12px !important;
                            font-size: 13px !important;
                            flex: 1;
                            text-align: center;
                            min-width: 80px;
                        }
                    }

                    .components-tab-panel__tab-content {
                        padding: 20px 16px !important;
                    }
                }
            }

            .info-card {
                padding: 16px !important;
                border-radius: 12px !important;

                .card-header {
                    margin-bottom: 16px;
                    padding-bottom: 12px;

                    .card-icon {
                        font-size: 20px;
                    }

                    h3 {
                        font-size: 16px;
                    }
                }
            }

            .info-item {
                flex-direction: column;
                align-items: stretch;
                gap: 8px;
                padding: 8px 0;

                .info-label {
                    min-width: auto;
                    font-size: 13px;
                }

                .info-value {
                    text-align: left;
                    font-size: 13px;
                }
            }

            .form-data-tab {
                .data-summary {
                    padding: 16px !important;
                    flex-direction: column !important;
                    text-align: center !important;
                    gap: 12px !important;

                    .summary-icon {
                        font-size: 28px;
                    }

                    .summary-content {
                        h4 {
                            font-size: 16px;
                        }

                        p {
                            font-size: 13px;
                        }
                    }
                }

                .fields-grid {
                    grid-template-columns: 1fr !important;
                    gap: 16px !important;

                    .field-card {
                        .field-header {
                            .field-meta {
                                .field-name {
                                    font-size: 14px;
                                }
                            }
                        }

                        .field-content {
                            .modern-field-value {
                                font-size: 13px;
                            }

                            .expandable-content {
                                .expanded-content {
                                    padding: 12px;
                                    font-size: 13px;
                                }
                            }
                        }
                    }
                }
            }

            .modal-footer {
                padding: 16px 20px;

                .footer-info {
                    .submission-time-container {
                        font-size: 13px;
                    }

                    .entry-stats {
                        .stat-item {
                            font-size: 11px;
                        }
                    }
                }

                .close-button-footer {
                    padding: 10px 20px !important;
                    font-size: 13px !important;
                    width: 100%;
                }
            }
        }
    }

    @media (max-width: 600px) {
        &__entries-table {
            // Stack table cells on very small screens
            thead {
                display: none;
            }

            tbody, tr, td {
                display: block;
            }

            tr {
                padding: 16px;
                margin-bottom: 16px;
                border: 1px solid #c3c4c7;
                border-radius: 4px;
                background: #fff;

                &:hover {
                    background: #f6f7f7;
                }
            }

            td {
                border: none;
                padding: 4px 0;

                &:before {
                    content: attr(data-label) ': ';
                    font-weight: 600;
                    display: inline-block;
                    width: 100px;
                }
            }
        }

        // Ultra small screens (phones in portrait)
        &__modal {
            .modal-header {
                .modal-title-section {
                    .entry-badge-container {
                        flex-direction: column;
                        gap: 4px;
                    }
                }
            }

            .modal-content-wrapper {
                .enhanced-tabs {
                    .components-tab-panel__tabs {
                        .components-tab-panel__tabs-item {
                            padding: 8px 6px !important;
                            font-size: 11px !important;
                            min-width: 60px;
                        }
                    }
                }
            }

            .info-card {
                padding: 12px !important;

                .card-header {
                    .card-icon {
                        font-size: 18px;
                    }

                    h3 {
                        font-size: 14px;
                    }
                }
            }

            .form-data-tab {
                .data-summary {
                    padding: 12px !important;

                    .summary-icon {
                        font-size: 24px;
                    }

                    .summary-content {
                        h4 {
                            font-size: 14px;
                        }

                        p {
                            font-size: 12px;
                        }
                    }
                }
            }
        }
    }
}

// Enhanced Animation utilities
.fade-in {
    animation: fadeIn 0.4s ease-in-out;
}

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

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

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

// Pulse animation for status indicator
@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.2);
    }
}

// Floating animation for modal
@keyframes modalFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-2px);
    }
}

// Glass morphism backdrop
.glass-backdrop {
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.1);
}

// Smooth transitions
.smooth-transition {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

// Hover effects
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;

    &:hover {
        transform: translateY(-4px);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    }
}

// Glassmorphism utility classes
.glass-surface {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.glass-strong {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.glass-subtle {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}