/**
 * Portfolio Filter Gallery - Admin Styles
 * Modern, clean admin UI
 * 
 * @package Portfolio_Filter_Gallery
 * @version 2.0.0
 */

/* ==========================================================================
   CSS Variables
   ========================================================================== */

:root {
    --pfg-primary: #3858e9;
    --pfg-primary-hover: #2945c9;
    --pfg-primary-light: rgba(56, 88, 233, 0.1);
    --pfg-success: #10b981;
    --pfg-warning: #f59e0b;
    --pfg-error: #ef4444;
    --pfg-text: #1e293b;
    --pfg-text-muted: #64748b;
    --pfg-text-light: #94a3b8;
    --pfg-bg: #f8fafc;
    --pfg-card-bg: #ffffff;
    --pfg-border: #e2e8f0;
    --pfg-border-light: #f1f5f9;
    --pfg-radius: 8px;
    --pfg-radius-lg: 12px;
    --pfg-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --pfg-shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --pfg-transition: 0.2s ease;
}

/* ==========================================================================
   General Layout
   ========================================================================== */

.meta-box-sortables select {
    max-width: fit-content !important;
}

.pfg-admin-wrap {
    max-width: 1400px;
    margin: 20px auto;
    padding: 0 20px;
}

.pfg-admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--pfg-border);
}

.pfg-admin-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--pfg-text);
    margin: 0;
}

.pfg-admin-subtitle {
    color: #ffffff;
    opacity: 0.9;
    font-size: 14px;
    margin-top: 5px;
}

/* ==========================================================================
   Cards
   ========================================================================== */

.pfg-card {
    background: var(--pfg-card-bg);
    border-radius: var(--pfg-radius-lg);
    box-shadow: var(--pfg-shadow);
    padding: 24px;
    margin-bottom: 20px;
}

.pfg-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--pfg-border-light);
}

.pfg-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--pfg-text);
    margin: 0;
}

.pfg-card-description {
    color: var(--pfg-text-muted);
    font-size: 13px;
    margin-top: 4px;
}

/* ==========================================================================
   Tabs
   ========================================================================== */

.pfg-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--pfg-border);
    margin-bottom: 24px;
}

.pfg-tab {
    padding: 12px 20px;
    border: none;
    background: transparent;
    color: var(--pfg-text-muted);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all var(--pfg-transition);
}

.pfg-tab:hover {
    color: var(--pfg-text);
}

.pfg-tab.active,
.pfg-tab:focus {
    color: var(--pfg-primary);
    border-bottom-color: var(--pfg-primary);
    outline: none;
}

.pfg-tab-content {
    display: none;
}

.pfg-tab-content.active {
    display: block;
}

/* ==========================================================================
   Form Elements
   ========================================================================== */

.pfg-form-row {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 20px;
    align-items: start;
    padding: 16px 0;
    border-bottom: 1px solid var(--pfg-border-light);
}

.pfg-form-row:last-child {
    border-bottom: none;
}

.pfg-form-label {
    font-weight: 500;
    color: var(--pfg-text);
    padding-top: 8px;
}

.pfg-form-label small {
    display: block;
    font-weight: 400;
    color: var(--pfg-text-muted);
    font-size: 12px;
    margin-top: 4px;
}

.pfg-input,
.pfg-select,
.pfg-textarea {
    width: 100%;
    max-width: 400px;
    padding: 10px 14px;
    border: 1px solid var(--pfg-border);
    border-radius: var(--pfg-radius);
    font-size: 14px;
    color: var(--pfg-text);
    background: var(--pfg-card-bg);
    transition: border-color var(--pfg-transition), box-shadow var(--pfg-transition);
}

.pfg-input:focus,
.pfg-select:focus,
.pfg-textarea:focus {
    outline: none;
    border-color: var(--pfg-primary);
    box-shadow: 0 0 0 3px var(--pfg-primary-light);
}

.pfg-textarea {
    min-height: 100px;
    resize: vertical;
}

.pfg-select {
    appearance: none;
    background-image: url('data:image/svg+xml;charset=utf-8,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"%3E%3Cpath fill="%2364748b" d="M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z"/%3E%3C/svg%3E');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

/* Toggle switch */
.pfg-toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
}

.pfg-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.pfg-toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--pfg-border);
    border-radius: 26px;
    transition: background var(--pfg-transition);
}

.pfg-toggle-slider::before {
    content: '';
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: transform var(--pfg-transition);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.pfg-toggle input:checked + .pfg-toggle-slider {
    background: var(--pfg-primary);
}

.pfg-toggle input:checked + .pfg-toggle-slider::before {
    transform: translateX(22px);
}

.pfg-toggle input:focus + .pfg-toggle-slider {
    box-shadow: 0 0 0 3px var(--pfg-primary-light);
}

/* Color picker */
.pfg-color-picker {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pfg-color-preview {
    width: 36px;
    height: 36px;
    border-radius: var(--pfg-radius);
    border: 1px solid var(--pfg-border);
    cursor: pointer;
}

/* Range slider */
.pfg-range {
    display: flex;
    align-items: center;
    gap: 15px;
}

.pfg-range input[type="range"] {
    flex: 1;
    max-width: 200px;
    height: 6px;
    border-radius: 3px;
    background: var(--pfg-border);
    appearance: none;
}

.pfg-range input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--pfg-primary);
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.pfg-range-value {
    min-width: 40px;
    text-align: center;
    font-size: 14px;
    color: var(--pfg-text-muted);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.pfg-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: none;
    border-radius: var(--pfg-radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--pfg-transition);
}

.pfg-btn-primary {
    background: var(--pfg-primary);
    color: white;
}

.pfg-btn-primary:hover {
    background: var(--pfg-primary-hover);
}

.pfg-btn-secondary {
    background: var(--pfg-bg);
    color: var(--pfg-text);
    border: 1px solid var(--pfg-border);
}

.pfg-btn-secondary:hover {
    background: var(--pfg-border-light);
}

.pfg-btn-success {
    background: var(--pfg-success);
    color: white;
}

.pfg-btn-danger {
    background: var(--pfg-error);
    color: white;
}

.pfg-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pfg-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* ==========================================================================
   Image Grid (Gallery Editor)
   ========================================================================== */

.pfg-image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.pfg-image-item {
    position: relative;
    background: var(--pfg-bg);
    border-radius: var(--pfg-radius);
    overflow: hidden;
    cursor: move;
    transition: transform var(--pfg-transition), box-shadow var(--pfg-transition);
}

.pfg-image-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--pfg-shadow-lg);
}

.pfg-image-item.ui-sortable-helper {
    box-shadow: var(--pfg-shadow-lg);
    transform: rotate(2deg);
}

.pfg-image-thumb {
    aspect-ratio: 1;
    width: 100%;
    object-fit: cover;
}

.pfg-image-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity var(--pfg-transition);
}

.pfg-image-item:hover .pfg-image-actions {
    opacity: 1;
}

.pfg-image-action {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: var(--pfg-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--pfg-transition);
}

.pfg-image-action:hover {
    background: white;
}

.pfg-image-action.pfg-image-delete:hover {
    background: var(--pfg-error);
    color: white;
}

.pfg-image-info {
    padding: 12px;
}

.pfg-image-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--pfg-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0 0 4px;
}

.pfg-image-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.pfg-image-filter-tag {
    padding: 2px 8px;
    background: var(--pfg-primary-light);
    color: var(--pfg-primary);
    font-size: 11px;
    font-weight: 500;
    border-radius: 4px;
}

/* Upload area */
.pfg-upload-area {
    border: 2px dashed var(--pfg-border);
    border-radius: var(--pfg-radius-lg);
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: border-color var(--pfg-transition), background var(--pfg-transition);
}

.pfg-upload-area:hover {
    border-color: var(--pfg-primary);
    background: var(--pfg-primary-light);
}

.pfg-upload-area.pfg-dragover {
    border-color: var(--pfg-primary);
    background: var(--pfg-primary-light);
    border-style: solid;
    box-shadow: 0 0 0 4px rgba(56, 88, 233, 0.2);
}

.pfg-upload-area.pfg-uploading {
    opacity: 0.7;
    pointer-events: none;
}

.pfg-upload-icon {
    font-size: 48px;
    color: var(--pfg-text-light);
    margin-bottom: 15px;
}

.pfg-upload-text {
    font-size: 16px;
    color: var(--pfg-text);
    margin-bottom: 5px;
}

.pfg-upload-hint {
    font-size: 13px;
    color: var(--pfg-text-muted);
}

/* Upload actions button container */
.pfg-upload-actions {
    display: flex;
    gap: 12px;
    margin: 20px 0;
    padding: 0 15px;
}

/* Empty state styling */
.pfg-no-images {
    text-align: center;
    padding: 40px 20px;
    color: var(--pfg-text-muted);
}

.pfg-no-images .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: var(--pfg-border);
    display: block;
    margin: 0 auto 15px;
}

.pfg-no-images p {
    margin: 0;
    font-size: 14px;
    color: var(--pfg-text-muted);
}

/* ==========================================================================
   Shortcode Box
   ========================================================================== */

.pfg-shortcode-box {
    background: var(--pfg-bg);
    border-radius: var(--pfg-radius);
    padding: 15px;
}

.pfg-shortcode-wrapper {
    display: flex;
    gap: 10px;
    margin: 10px 0;
}

.pfg-shortcode-wrapper code {
    flex: 1;
    padding: 10px 14px;
    background: white;
    border: 1px solid var(--pfg-border);
    border-radius: var(--pfg-radius);
    font-size: 13px;
    color: var(--pfg-primary);
}

.pfg-copy-shortcode {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.pfg-shortcode-note {
    font-size: 12px;
    color: var(--pfg-text-muted);
    margin: 10px 0 0;
}

.pfg-shortcode-note code {
    background: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
}

/* ==========================================================================
   Filters Page
   ========================================================================== */

.pfg-filters-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pfg-filter-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--pfg-card-bg);
    border: 1px solid var(--pfg-border);
    border-radius: var(--pfg-radius);
    margin-bottom: 10px;
    cursor: move;
}

.pfg-filter-item:hover {
    border-color: var(--pfg-primary);
}

.pfg-filter-drag {
    color: var(--pfg-text-light);
    cursor: move;
}

.pfg-filter-name-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--pfg-border);
    border-radius: var(--pfg-radius);
    font-size: 14px;
}

.pfg-filter-slug {
    color: var(--pfg-text-muted);
    font-size: 12px;
    min-width: 120px;
}

.pfg-filter-delete {
    color: var(--pfg-text-light);
    cursor: pointer;
    transition: color var(--pfg-transition);
}

.pfg-filter-delete:hover {
    color: var(--pfg-error);
}

/* ==========================================================================
   Notices
   ========================================================================== */

.pfg-notice {
    padding: 15px 20px;
    border-radius: var(--pfg-radius);
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.pfg-notice-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

.pfg-notice-success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.pfg-notice-warning {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    color: #92400e;
}

.pfg-notice-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.pfg-notice-icon {
    flex-shrink: 0;
}

.pfg-notice-content {
    flex: 1;
}

.pfg-notice-title {
    font-weight: 600;
    margin-bottom: 4px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 782px) {
    .pfg-admin-wrap {
        padding: 0 10px;
    }

    .pfg-form-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .pfg-form-label {
        padding-top: 0;
    }

    .pfg-image-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }

    .pfg-tabs {
        overflow-x: auto;
    }

    .pfg-tab {
        white-space: nowrap;
    }
}



/* ==========================================================================
   Filter Checkbox Hierarchy Styles (Edit Image Modal)
   ========================================================================== */

.pfg-filter-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    max-height: 250px;
    overflow-y: auto;
}

.pfg-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    color: #475569;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.pfg-checkbox-label:hover {
    border-color: var(--pfg-primary);
    background: var(--pfg-primary-light);
}

.pfg-checkbox-label input[type="checkbox"] {
    width: 14px;
    height: 14px;
    margin: 0;
    cursor: pointer;
}

.pfg-checkbox-label input[type="checkbox"]:checked + .pfg-filter-dot {
    box-shadow: 0 0 0 2px rgba(56, 88, 233, 0.3);
}

.pfg-filter-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.pfg-tree-connector {
    color: #94a3b8;
    font-size: 12px;
    margin-right: 2px;
}

.pfg-filter-name {
    color: inherit;
}

/* Children group container */
.pfg-filter-children-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 0;
    margin-top: 4px;
}

/* =====================================
   Tree-style Filter Checkboxes
   ===================================== */

/* Container for tree items */
.pfg-tree-filter-item {
    display: block;
}

/* Each filter row */
.pfg-tree-filter-row {
    display: flex;
    align-items: center;
    padding: 2px 0;
}

/* Checkbox label - wraps all content */
.pfg-tree-checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.15s ease;
    font-size: 13px;
    color: #475569;
}

.pfg-tree-checkbox-label:hover {
    background: #f1f5f9;
}

.pfg-tree-checkbox-label:has(input:checked) {
    background: var(--pfg-primary-light, #eef2ff);
    color: var(--pfg-primary, #3858e9);
}

/* Custom checkbox styling */
.pfg-tree-checkbox-label input[type="checkbox"] {
    width: 14px;
    height: 14px;
    margin: 0;
    cursor: pointer;
    accent-color: var(--pfg-primary, #3858e9);
}

/* Toggle button (+/-) for parents */
.pfg-tree-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    font-size: 14px;
    font-weight: bold;
    color: #64748b;
    background: #e2e8f0;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.pfg-tree-toggle:hover {
    background: var(--pfg-primary-light, #eef2ff);
    color: var(--pfg-primary, #3858e9);
}

/* Spacer when no toggle - hide it completely */
.pfg-tree-toggle-spacer {
    display: none;
}

/* Toggle icons using ::before - direct child only to avoid affecting nested */
.pfg-filter-collapsible-group[data-expanded="false"] > .pfg-tree-filter-row .pfg-tree-toggle::before,
.pfg-filter-collapsible-group[data-expanded="false"] > div > .pfg-tree-filter-row .pfg-tree-toggle::before {
    content: "+";
}

.pfg-filter-collapsible-group[data-expanded="true"] > .pfg-tree-filter-row .pfg-tree-toggle::before,
.pfg-filter-collapsible-group[data-expanded="true"] > div > .pfg-tree-filter-row .pfg-tree-toggle::before {
    content: "−";
}

/* Default state for toggle */
.pfg-tree-toggle::before {
    content: "−";
    font-size: 14px;
}

.pfg-tree-toggle {
    font-size: 0; /* Hide any text content */
}

/* Hide children when collapsed */
.pfg-filter-collapsible-group[data-expanded="false"] .pfg-collapsible-content {
    display: none;
}

/* Tree connector */
.pfg-tree-connector {
    color: #94a3b8;
    font-size: 12px;
    margin-right: 2px;
    flex-shrink: 0;
}

/* Color dot */
.pfg-tree-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Filter name */
.pfg-tree-filter-name {
    color: inherit;
}

/* Children container */
.pfg-tree-children {
    display: block;
}

/* Collapsible content transition */
.pfg-collapsible-content {
    overflow: hidden;
    transition: all 0.2s ease-out;
}

/* Legacy compatibility - keep old classes working */
.pfg-filter-collapsible-group {
    display: block;
}

.pfg-collapse-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    font-size: 8px;
    color: #94a3b8;
    background: #f1f5f9;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-right: 4px;
}

.pfg-collapse-toggle:hover {
    background: var(--pfg-primary-light, #eef2ff);
    color: var(--pfg-primary, #3858e9);
}

/* Collapsed state - rotate arrow */
.pfg-filter-collapsible-group[data-expanded="false"] .pfg-collapse-toggle {
    transform: rotate(-90deg);
}

/* Parent filter styling */
.pfg-checkbox-label.pfg-parent-filter {
    font-weight: 500;
}

/* Child filter styling */
.pfg-checkbox-label.pfg-child-filter {
    font-size: 12px;
    padding: 5px 10px;
}

/* Checked state */
.pfg-checkbox-label:has(input:checked) {
    background: var(--pfg-primary-light);
    border-color: var(--pfg-primary);
    color: var(--pfg-primary);
}

/* Editable slug field styling */
.pfg-col-slug input.pfg-editable-slug {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 12px;
    font-family: 'Monaco', 'Consolas', monospace;
    color: var(--pfg-primary);
    background: transparent;
    transition: all 0.2s ease;
}

.pfg-col-slug input.pfg-editable-slug:hover {
    background: #f1f5f9;
}

.pfg-col-slug input.pfg-editable-slug:focus {
    background: white;
    border-color: var(--pfg-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(56, 88, 233, 0.1);
}

/* Duplicate slug warning */
.pfg-col-slug input.pfg-editable-slug.pfg-slug-warning {
    border-color: #f59e0b;
    background: #fffbeb;
}

.pfg-col-slug input.pfg-editable-slug.pfg-slug-duplicate {
    border-color: #ef4444;
    background: #fef2f2;
}

/* ==========================================================================
   Disabled Form Rows (Layout-dependent settings)
   ========================================================================== */

.pfg-form-row.pfg-row-disabled {
    opacity: 0.5;
    pointer-events: none;
    position: relative;
}

.pfg-form-row.pfg-row-disabled::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    cursor: not-allowed;
}

.pfg-form-row.pfg-row-disabled select,
.pfg-form-row.pfg-row-disabled input {
    cursor: not-allowed;
    background-color: #f1f5f9;
}

/* ==========================================================================
   Page Filters
   ========================================================================== */
.pfg-filters-page { max-width: 1200px; }

.pfg-admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 20px 25px;
    background: linear-gradient(135deg, #3858e9 0%, #1e40af 100%);
    border-radius: 12px;
    color: #fff;
}
.pfg-admin-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 5px 0;
    font-size: 24px;
    color: #fff;
}
.pfg-admin-title .dashicons { font-size: 28px; width: 28px; height: 28px; }
.pfg-admin-subtitle { margin: 0; opacity: 0.9; font-size: 14px; color: #ffffff; }

.pfg-stat-box {
    text-align: center;
    background: rgba(255,255,255,0.15);
    padding: 15px 25px;
    border-radius: 8px;
}
.pfg-stat-number { display: block; font-size: 32px; font-weight: 700; }
.pfg-stat-label { font-size: 12px; opacity: 0.8; text-transform: uppercase; letter-spacing: 0.5px; }

.pfg-filters-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 25px;
    align-items: start;
}

/* Panels */
.pfg-panel {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    overflow: hidden;
}
.pfg-panel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 20px;
    border-bottom: 1px solid #f1f5f9;
    background: #fafbfc;
}
.pfg-panel-header h3 { margin: 0; font-size: 15px; font-weight: 600; color: #1e293b; }
.pfg-panel-header .dashicons { color: #3858e9; }

.pfg-panel-title { display: flex; align-items: center; gap: 10px; }
.pfg-panel-actions { margin-left: auto; }

/* Add Form */
.pfg-add-form { padding: 20px; }
.pfg-form-group { margin-bottom: 16px; }
.pfg-form-group label { display: block; font-size: 13px; font-weight: 500; color: #475569; margin-bottom: 6px; }
.pfg-form-row-2col { 
    display: flex; 
    gap: 16px; 
    align-items: flex-start;
}
.pfg-form-row-2col > .pfg-form-group {
    margin-bottom: 16px;
}
.pfg-form-row-2col > .pfg-form-group:first-child {
    flex: 1;
}
.pfg-form-row-2col > .pfg-form-group:last-child {
    width: auto;
}

.pfg-input, .pfg-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s;
}
.pfg-input:focus, .pfg-select:focus {
    border-color: #3858e9;
    outline: none;
    box-shadow: 0 0 0 3px rgba(56, 88, 233, 0.1);
}
.pfg-input-lg { padding: 12px 16px; font-size: 15px; }
.pfg-color-input { width: 100%; height: 42px; padding: 4px; border: 1px solid #e2e8f0; border-radius: 8px; cursor: pointer; }

.pfg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.pfg-btn-primary { background: #3858e9; color: #fff; }
.pfg-btn-primary:hover { background: #2d4ad4; }
.pfg-btn-lg { padding: 14px 24px; font-size: 15px; }
.pfg-btn-full { width: 100%; }

/* Hierarchy Chart */
.pfg-hierarchy-chart {
    margin: 20px;
    padding: 15px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}
.pfg-hierarchy-chart h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px 0;
    font-size: 13px;
    color: #475569;
}
.pfg-hierarchy-chart h4 .dashicons { color: #3858e9; }
.pfg-hierarchy-tree { font-size: 12px; }
.pfg-tree-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 0;
}
.pfg-tree-line { color: #cbd5e1; font-family: monospace; }
.pfg-tree-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.pfg-tree-name { color: #334155; font-weight: 500; }

/* Tips */
.pfg-quick-tips {
    margin: 20px;
    padding: 15px;
    background: #f0f9ff;
    border-radius: 8px;
    border-left: 3px solid #0ea5e9;
}
.pfg-quick-tips h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px 0; font-size: 13px; color: #0369a1; }
.pfg-quick-tips ul { margin: 0; padding-left: 18px; }
.pfg-quick-tips li { font-size: 12px; color: #475569; margin-bottom: 4px; }

/* Search */
.pfg-search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f1f5f9;
    padding: 6px 12px;
    border-radius: 6px;
}
.pfg-search-box .dashicons { color: #94a3b8; font-size: 16px; }
.pfg-search-box input { border: none; background: none; font-size: 13px; width: 150px; outline: none; }

/* Empty State */
.pfg-empty-state { text-align: center; padding: 50px 30px; }
.pfg-empty-icon { margin-bottom: 15px; }
.pfg-empty-icon .dashicons { font-size: 48px; width: 48px; height: 48px; color: #cbd5e1; }
.pfg-empty-state h3 { margin: 0 0 8px 0; color: #475569; }
.pfg-empty-state p { margin: 0; color: #94a3b8; font-size: 14px; }

/* Table */
.pfg-filters-table-wrap { max-height: 500px; overflow-y: auto; }
.pfg-filters-table { width: 100%; border-collapse: collapse; }
.pfg-filters-table th {
    text-align: left;
    padding: 12px 15px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
}
.pfg-filters-table td { padding: 10px 15px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.pfg-filter-row:hover { background: #f8fafc; }

.pfg-col-drag { width: 40px; text-align: center; }
.pfg-col-color { width: 50px; }
.pfg-col-slug { width: 120px; }
.pfg-col-parent { width: 140px; }
.pfg-col-actions { width: 60px; text-align: center; }

.pfg-drag-handle { cursor: move; color: #cbd5e1; }
.pfg-drag-handle:hover { color: #3858e9; }

/* Color Picker Wrap */
.pfg-color-picker-wrap {
    position: relative;
    display: inline-block;
}
.pfg-color-picker-wrap .pfg-row-color {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}
.pfg-color-label {
    display: block;
    width: 28px;
    height: 28px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}
.pfg-color-label:hover {
    border-color: #3858e9;
    transform: scale(1.1);
}

/* Add Form Color Picker */
.pfg-add-color-picker {
    display: inline-block;
}
.pfg-add-color-picker .pfg-color-label {
    width: 52px;
    height: 32px;
}
.pfg-color-input-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}


.pfg-editable-name {
    width: 100%;
    border: 1px solid transparent;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    background: transparent;
}
.pfg-editable-name:hover { background: #f8fafc; }
.pfg-editable-name:focus { border-color: #3858e9; background: #fff; outline: none; }

.pfg-col-slug code { font-size: 11px; color: #64748b; background: #f1f5f9; padding: 3px 8px; border-radius: 4px; }

.pfg-parent-select {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 12px;
    background: #fff;
}
.pfg-parent-select:focus { border-color: #3858e9; outline: none; }

.pfg-action-btn {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.2s;
}
.pfg-btn-delete:hover { background: #fef2f2; color: #ef4444; }
.pfg-action-btn .dashicons { font-size: 16px; }

.pfg-filter-row.ui-sortable-helper { background: #fff; box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.pfg-filter-row.ui-sortable-placeholder td { background: #eff6ff; height: 50px; }

.pfg-panel-footer {
    padding: 12px 20px;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
}
.pfg-footer-hint { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #64748b; }
.pfg-footer-hint .dashicons { font-size: 14px; }

@media (max-width: 900px) {
    .pfg-filters-layout { grid-template-columns: 1fr; }
    .pfg-admin-header { flex-direction: column; text-align: center; gap: 15px; }
}

/* Filter Limit Notice */
.pfg-filter-limit-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 12px;
    margin-bottom: 15px;
}
.pfg-filter-limit-notice .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}
.pfg-limit-warning {
    background: #fef3c7;
    border: 1px solid #fbbf24;
    color: #92400e;
}
.pfg-limit-reached {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #dc2626;
}
.pfg-upgrade-link {
    margin-left: auto;
    font-weight: 600;
    text-decoration: none;
    color: inherit;
    white-space: nowrap;
}
.pfg-upgrade-link:hover {
    text-decoration: underline;
}



/* Disabled select styling */
.pfg-parent-select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f1f5f9;
}

/* Secondary button styling */
.pfg-btn-secondary {
    background: #64748b;
    color: #fff;
}
.pfg-btn-secondary:hover {
    background: #475569;
}
.pfg-btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}
.pfg-panel-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* ==========================================================================
   Shortcode Meta Box
   ========================================================================== */
.pfg-params-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 13px;
}
.pfg-params-table th,
.pfg-params-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}
.pfg-params-table th {
    background: #f8fafc;
    font-weight: 600;
}
.pfg-params-table code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
}
.pfg-gutenberg-tip {
    margin-top: 20px;
    padding: 12px 15px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    color: #1e40af;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ==========================================================================
   Gallery Tools
   ========================================================================== */
.pfg-gallery-tools {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}
.pfg-gallery-tools h4 {
    margin: 0 0 15px 0;
    font-size: 14px;
    color: #334155;
}
.pfg-tool-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
}
.pfg-tool-info {
    flex: 1;
}
.pfg-tool-info strong {
    display: block;
    margin-bottom: 4px;
    color: #334155;
}
.pfg-tool-info p {
    margin: 0;
    font-size: 12px;
    color: #64748b;
}
.pfg-spin {
    animation: pfg-spin 1s linear infinite;
}
@keyframes pfg-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
/* Extracted from meta-box-settings.php */
/* Select field sizing */
.meta-box-sortables select {
    max-width: 20%;
}

/* Template Grid Styles */
.pfg-template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    margin-top: 10px;
}
.pfg-template-card {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}
.pfg-template-card:hover {
    border-color: #94a3b8;
    background: #fff;
}
.pfg-template-card.selected {
    border-color: #3858e9;
    background: #eff6ff;
    box-shadow: 0 0 0 3px rgba(56, 88, 233, 0.15);
}
.pfg-template-preview {
    width: 60px;
    height: 60px;
    margin: 0 auto 10px;
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pfg-template-preview .dashicons {
    font-size: 28px;
    width: 28px;
    height: 28px;
    color: #3b82f6;
}
.pfg-template-card.selected .pfg-template-preview {
    background: linear-gradient(135deg, #3858e9 0%, #1e40af 100%);
}
.pfg-template-card.selected .pfg-template-preview .dashicons {
    color: #fff;
}
.pfg-template-name {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #475569;
}
.pfg-template-card.selected .pfg-template-name {
    color: #1e40af;
}
.pfg-template-type {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 6px;
    border-radius: 3px;
    margin-top: 6px;
}
.pfg-type-grid {
    background: #f1f5f9;
    color: #64748b;
}
.pfg-type-masonry {
    background: #dbeafe;
    color: #2563eb;
}
.pfg-type-justified {
    background: #dcfce7;
    color: #16a34a;
}
.pfg-type-packed {
    background: #fef3c7;
    color: #d97706;
}



.pfg-template-notice {
    margin-top: 10px;
    padding: 8px 14px;
    background: #e0f2fe;
    border: 1px solid #7dd3fc;
    border-radius: 6px;
    color: #0369a1;
    font-size: 12px;
    text-align: center;
    animation: pfgFadeIn 0.3s ease;
}
@keyframes pfgFadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}
/* Section Separator and Title */
.pfg-form-separator {
    border: none;
    border-top: 1px solid #e2e8f0;
    margin: 25px 0 20px;
}
.pfg-form-section-title {
    margin: 0 0 15px;
    padding: 0;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    letter-spacing: -0.01em;
}
.pfg-form-section-title.pfg-section-icon {
    display: flex;
    align-items: center;
    gap: 8px;
}
.pfg-form-section-title .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    color: #3858e9;
}





/* Upsell Banner */
.pfg-upsell-banner {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #fbbf24;
    border-radius: 8px;
    margin-bottom: 20px;
}
.pfg-upsell-banner.pfg-upsell-inline {
    padding: 10px 15px;
    margin-bottom: 15px;
    font-size: 13px;
}
.pfg-upsell-banner h3 {
    margin: 0 0 5px 0;
    font-size: 15px;
    color: #92400e;
}
.pfg-upsell-banner p {
    margin: 0;
    font-size: 13px;
    color: #78350f;
}
.pfg-upsell-content {
    flex: 1;
}
.pfg-upsell-btn {
    display: inline-block;
    padding: 8px 16px;
    background: #d97706;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    font-size: 13px;
    transition: background 0.2s;
}
.pfg-upsell-btn:hover {
    background: #b45309;
    color: #fff;
}
.pfg-upsell-link {
    color: #92400e;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}
.pfg-upsell-link:hover {
    color: #78350f;
    text-decoration: underline;
}
.pfg-upsell-icon {
    display: inline-flex;
    gap: 2px;
    margin-right: 8px;
    color: #92400e;
}
.pfg-upsell-icon .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}
/* Device Type Responsive Columns */
.pfg-responsive-columns {
    display: flex;
    align-items: center;
    gap: 15px;
}
.pfg-device-toggle {
    display: inline-flex;
    background: #f1f5f9;
    border-radius: 8px;
    padding: 4px;
    gap: 2px;
}
.pfg-device-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 32px;
    border: 2px solid transparent;
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #64748b;
    position: relative;
}
.pfg-device-btn:hover {
    background: #e2e8f0;
    color: #475569;
}
.pfg-device-btn.active {
    background: #fff;
    border-color: #3858e9;
    color: #3858e9;
    box-shadow: 0 1px 3px rgba(56, 88, 233, 0.2);
}
.pfg-device-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}
.pfg-device-panel {
    display: none;
    flex: 1;
}
.pfg-device-panel.active {
    display: block;
}
.pfg-device-panel .pfg-range {
    min-width: 200px;
}



/* Extracted from page-filters.php */
/* Page Layout */
.pfg-filters-page { max-width: 1200px; }

.pfg-admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 20px 25px;
    background: linear-gradient(135deg, #3858e9 0%, #1e40af 100%);
    border-radius: 12px;
    color: #fff;
}
.pfg-admin-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 5px 0;
    font-size: 24px;
    color: #fff;
}
.pfg-admin-title .dashicons { font-size: 28px; width: 28px; height: 28px; }
.pfg-admin-subtitle { margin: 0; opacity: 0.9; font-size: 14px; color: #ffffff; }

.pfg-stat-box {
    text-align: center;
    background: rgba(255,255,255,0.15);
    padding: 15px 25px;
    border-radius: 8px;
}
.pfg-stat-number { display: block; font-size: 32px; font-weight: 700; }
.pfg-stat-label { font-size: 12px; opacity: 0.8; text-transform: uppercase; letter-spacing: 0.5px; }

.pfg-filters-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 25px;
    align-items: start;
}

/* Panels */
.pfg-panel {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    overflow: hidden;
}
.pfg-panel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 20px;
    border-bottom: 1px solid #f1f5f9;
    background: #fafbfc;
}
.pfg-panel-header h3 { margin: 0; font-size: 15px; font-weight: 600; color: #1e293b; }
.pfg-panel-header .dashicons { color: #3858e9; }

.pfg-panel-title { display: flex; align-items: center; gap: 10px; }
.pfg-panel-actions { margin-left: auto; }

/* Add Form */
.pfg-add-form { padding: 20px; }
.pfg-form-group { margin-bottom: 16px; }
.pfg-form-group label { display: block; font-size: 13px; font-weight: 500; color: #475569; margin-bottom: 6px; }
.pfg-form-row-2col { 
    display: flex; 
    gap: 16px; 
    align-items: flex-start;
}
.pfg-form-row-2col > .pfg-form-group {
    margin-bottom: 16px;
}
.pfg-form-row-2col > .pfg-form-group:first-child {
    flex: 1;
}
.pfg-form-row-2col > .pfg-form-group:last-child {
    width: auto;
}

.pfg-input, .pfg-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s;
}
.pfg-input:focus, .pfg-select:focus {
    border-color: #3858e9;
    outline: none;
    box-shadow: 0 0 0 3px rgba(56, 88, 233, 0.1);
}
.pfg-input-lg { padding: 12px 16px; font-size: 15px; }
.pfg-color-input { width: 100%; height: 42px; padding: 4px; border: 1px solid #e2e8f0; border-radius: 8px; cursor: pointer; }

.pfg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.pfg-btn-primary { background: #3858e9; color: #fff; }
.pfg-btn-primary:hover { background: #2d4ad4; }
.pfg-btn-lg { padding: 14px 24px; font-size: 15px; }
.pfg-btn-full { width: 100%; }

/* Hierarchy Chart */
.pfg-hierarchy-chart {
    margin: 20px;
    padding: 15px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}
.pfg-hierarchy-chart h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px 0;
    font-size: 13px;
    color: #475569;
}
.pfg-hierarchy-chart h4 .dashicons { color: #3858e9; }
.pfg-hierarchy-tree { font-size: 12px; }
.pfg-tree-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 0;
}
.pfg-tree-line { color: #cbd5e1; font-family: monospace; }
.pfg-tree-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.pfg-tree-name { color: #334155; font-weight: 500; }

/* Tips */
.pfg-quick-tips {
    margin: 20px;
    padding: 15px;
    background: #f0f9ff;
    border-radius: 8px;
    border-left: 3px solid #0ea5e9;
}
.pfg-quick-tips h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px 0; font-size: 13px; color: #0369a1; }
.pfg-quick-tips ul { margin: 0; padding-left: 18px; }
.pfg-quick-tips li { font-size: 12px; color: #475569; margin-bottom: 4px; }

/* Search */
.pfg-search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f1f5f9;
    padding: 6px 12px;
    border-radius: 6px;
}
.pfg-search-box .dashicons { color: #94a3b8; font-size: 16px; }
.pfg-search-box input { border: none; background: none; font-size: 13px; width: 150px; outline: none; }

/* Empty State */
.pfg-empty-state { text-align: center; padding: 50px 30px; }
.pfg-empty-icon { margin-bottom: 15px; }
.pfg-empty-icon .dashicons { font-size: 48px; width: 48px; height: 48px; color: #cbd5e1; }
.pfg-empty-state h3 { margin: 0 0 8px 0; color: #475569; }
.pfg-empty-state p { margin: 0; color: #94a3b8; font-size: 14px; }

/* Table */
.pfg-filters-table-wrap { max-height: 500px; overflow-y: auto; }
.pfg-filters-table { width: 100%; border-collapse: collapse; }
.pfg-filters-table th {
    text-align: left;
    padding: 12px 15px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
}
.pfg-filters-table td { padding: 10px 15px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.pfg-filter-row:hover { background: #f8fafc; }

.pfg-col-drag { width: 40px; text-align: center; }
.pfg-col-color { width: 50px; }
.pfg-col-slug { width: 120px; }
.pfg-col-parent { width: 140px; }
.pfg-col-actions { width: 60px; text-align: center; }

.pfg-drag-handle { cursor: move; color: #cbd5e1; }
.pfg-drag-handle:hover { color: #3858e9; }

/* Color Picker Wrap */
.pfg-color-picker-wrap {
    position: relative;
    display: inline-block;
}
.pfg-color-picker-wrap .pfg-row-color {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}
.pfg-color-label {
    display: block;
    width: 28px;
    height: 28px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}
.pfg-color-label:hover {
    border-color: #3858e9;
    transform: scale(1.1);
}

/* Add Form Color Picker */
.pfg-add-color-picker {
    display: inline-block;
}
.pfg-add-color-picker .pfg-color-label {
    width: 52px;
    height: 32px;
}
.pfg-color-input-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}



.pfg-editable-name {
    width: 100%;
    border: 1px solid transparent;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    background: transparent;
}
.pfg-editable-name:hover { background: #f8fafc; }
.pfg-editable-name:focus { border-color: #3858e9; background: #fff; outline: none; }

.pfg-col-slug code { font-size: 11px; color: #64748b; background: #f1f5f9; padding: 3px 8px; border-radius: 4px; }

.pfg-parent-select {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 12px;
    background: #fff;
}
.pfg-parent-select:focus { border-color: #3858e9; outline: none; }

.pfg-action-btn {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.2s;
}
.pfg-btn-delete:hover { background: #fef2f2; color: #ef4444; }
.pfg-action-btn .dashicons { font-size: 16px; }

.pfg-filter-row.ui-sortable-helper { background: #fff; box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.pfg-filter-row.ui-sortable-placeholder td { background: #eff6ff; height: 50px; }

.pfg-panel-footer {
    padding: 12px 20px;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
}
.pfg-footer-hint { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #64748b; }
.pfg-footer-hint .dashicons { font-size: 14px; }

@media (max-width: 900px) {
    .pfg-filters-layout { grid-template-columns: 1fr; }
    .pfg-admin-header { flex-direction: column; text-align: center; gap: 15px; }
}

/* Filter Limit Notice */
.pfg-filter-limit-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 12px;
    margin-bottom: 15px;
}
.pfg-filter-limit-notice .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}
.pfg-limit-warning {
    background: #fef3c7;
    border: 1px solid #fbbf24;
    color: #92400e;
}
.pfg-limit-reached {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #dc2626;
}
.pfg-upgrade-link {
    margin-left: auto;
    font-weight: 600;
    text-decoration: none;
    color: inherit;
    white-space: nowrap;
}
.pfg-upgrade-link:hover {
    text-decoration: underline;
}



/* Disabled select styling */
.pfg-parent-select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f1f5f9;
}

/* Secondary button styling */
.pfg-btn-secondary {
    background: #64748b;
    color: #fff;
}
.pfg-btn-secondary:hover {
    background: #475569;
}
.pfg-btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}
.pfg-panel-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Extracted from page-docs.php */
.pfg-docs-wrap {
    max-width: 1400px;
}
.pfg-docs-container {
    display: flex;
    gap: 30px;
    margin-top: 20px;
}
.pfg-docs-sidebar {
    width: 220px;
    flex-shrink: 0;
}
.pfg-docs-nav {
    position: sticky;
    top: 32px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.pfg-doc-link {
    display: block;
    padding: 10px 14px;
    color: #475569;
    text-decoration: none;
    font-size: 13px;
    border-radius: 6px;
    transition: all 0.2s;
}
.pfg-doc-link:hover,
.pfg-doc-link.active {
    background: #f1f5f9;
    color: #1e293b;
}

.pfg-docs-content {
    flex: 1;
    min-width: 0;
}
.pfg-doc-section {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 24px;
}
.pfg-doc-section h2 {
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e2e8f0;
}
.pfg-doc-section h3 {
    font-size: 16px;
    font-weight: 600;
    color: #334155;
    margin: 24px 0 12px;
}
.pfg-doc-section h4 {
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    margin: 16px 0 8px;
}
.pfg-doc-section p,
.pfg-doc-section li {
    font-size: 14px;
    line-height: 1.7;
    color: #475569;
}
.pfg-doc-section ul,
.pfg-doc-section ol {
    margin: 10px 0;
    padding-left: 24px;
}
.pfg-doc-section li {
    margin-bottom: 6px;
}
.pfg-steps li {
    margin-bottom: 16px;
}
.pfg-steps li strong {
    color: #1e293b;
    display: block;
    margin-bottom: 4px;
}
.pfg-steps li p {
    margin: 0;
}
.pfg-code-block {
    display: block;
    background: #1e293b;
    color: #e2e8f0;
    padding: 15px 20px;
    border-radius: 8px;
    font-family: monospace;
    font-size: 14px;
    margin: 12px 0;
    overflow-x: auto;
}

.pfg-faq-item {
    padding: 16px 0;
    border-bottom: 1px solid #f1f5f9;
}
.pfg-faq-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.pfg-faq-item h4 {
    margin-top: 0;
}
.pfg-faq-item p {
    margin: 0;
}
.pfg-support-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 16px;
}
.pfg-support-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s;
}
.pfg-support-card:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    transform: translateY(-2px);
}
.pfg-support-card .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
    color: #6366f1;
    margin-bottom: 12px;
}
.pfg-support-card strong {
    color: #1e293b;
    font-size: 14px;
    margin-bottom: 4px;
}
.pfg-support-card span:last-child {
    color: #64748b;
    font-size: 12px;
}
.pfg-support-upgrade {
    background: linear-gradient(135deg, #f5f3ff, #ede9fe);
    border-color: #c4b5fd;
}
.pfg-support-upgrade .dashicons {
    color: #8b5cf6;
}
@media (max-width: 960px) {
    .pfg-docs-container {
        flex-direction: column;
    }
    .pfg-docs-sidebar {
        width: 100%;
    }
    .pfg-docs-nav {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
    }
}

/* Extracted from setup-wizard.php */
.pfg-setup-body { margin: 0; padding: 0; box-sizing: border-box; }
        .pfg-setup-body { 
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 20px;
        }
        
        .pfg-wizard {
            background: #fff;
            border-radius: 16px;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
            max-width: 600px;
            width: 100%;
            overflow: hidden;
        }
        
        .pfg-wizard-header {
            background: linear-gradient(135deg, #3858e9 0%, #1e40af 100%);
            padding: 30px;
            text-align: center;
            color: #fff;
        }
        
        .pfg-wizard-logo {
            width: 60px;
            height: 60px;
            background: rgba(255, 255, 255, 0.2);
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 15px;
        }
        
        .pfg-wizard-logo .dashicons {
            font-size: 32px;
            width: 32px;
            height: 32px;
        }
        
        .pfg-wizard-header h1 {
            font-size: 22px;
            font-weight: 600;
            margin: 0;
        }
        
        .pfg-wizard-progress {
            display: flex;
            justify-content: center;
            gap: 8px;
            padding: 20px;
            background: #f8fafc;
            border-bottom: 1px solid #e2e8f0;
        }
        
        .pfg-wizard-progress-dot {
            width: 12px;
            height: 12px;
            border-radius: 50%;
            background: #cbd5e1;
            transition: all 0.3s;
        }
        
        .pfg-wizard-progress-dot.active {
            background: #3858e9;
            transform: scale(1.2);
        }
        
        .pfg-wizard-progress-dot.completed {
            background: #10b981;
        }
        
        .pfg-wizard-content {
            padding: 40px 30px;
            text-align: center;
        }
        
        .pfg-wizard-step-icon {
            width: 80px;
            height: 80px;
            background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 20px;
        }
        
        .pfg-wizard-step-icon .dashicons {
            font-size: 40px;
            width: 40px;
            height: 40px;
            color: #3858e9;
        }
        
        .pfg-wizard-content h2 {
            font-size: 24px;
            font-weight: 600;
            color: #1e293b;
            margin-bottom: 15px;
        }
        
        .pfg-wizard-content p {
            font-size: 15px;
            color: #64748b;
            line-height: 1.6;
            margin-bottom: 20px;
        }
        
        .pfg-wizard-features {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 12px;
            margin: 25px 0;
            text-align: left;
        }
        
        .pfg-wizard-feature {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 12px;
            background: #f8fafc;
            border-radius: 8px;
        }
        
        .pfg-wizard-feature .dashicons {
            color: #10b981;
            font-size: 18px;
            width: 18px;
            height: 18px;
        }
        
        .pfg-wizard-feature span {
            font-size: 13px;
            color: #334155;
        }
        
        .pfg-wizard-actions {
            padding: 20px 30px 30px;
            display: flex;
            gap: 12px;
            justify-content: center;
        }
        
        .pfg-wizard-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            padding: 12px 24px;
            border-radius: 8px;
            font-size: 14px;
            font-weight: 500;
            text-decoration: none;
            cursor: pointer;
            transition: all 0.2s;
            border: none;
        }
        
        .pfg-wizard-btn-primary {
            background: linear-gradient(135deg, #3858e9 0%, #1e40af 100%);
            color: #fff;
        }
        
        .pfg-wizard-btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(56, 88, 233, 0.4);
        }
        
        .pfg-wizard-btn-secondary {
            background: #f1f5f9;
            color: #64748b;
        }
        
        .pfg-wizard-btn-secondary:hover {
            background: #e2e8f0;
        }
        
        .pfg-wizard-btn-success {
            background: linear-gradient(135deg, #10b981 0%, #059669 100%);
            color: #fff;
        }
        
        .pfg-wizard-btn-success:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
        }
        
        .pfg-wizard-skip {
            margin-top: 15px;
        }
        
        .pfg-wizard-skip a {
            color: #94a3b8;
            font-size: 13px;
            text-decoration: none;
        }
        
        .pfg-wizard-skip a:hover {
            color: #64748b;
        }

/* Extracted from meta-box-images.php */
/* Progress Modal Styles for Chunked Save */
#pfg-save-progress-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 200000;
    display: flex;
    align-items: center;
    justify-content: center;
}
#pfg-save-progress-modal .pfg-progress-content {
    background: #fff;
    border-radius: 16px;
    padding: 40px 50px;
    text-align: center;
    min-width: 350px;
    max-width: 450px;
    box-shadow: 0 25px 80px rgba(0,0,0,0.4);
}
#pfg-save-progress-modal .pfg-progress-icon {
    margin-bottom: 20px;
}
#pfg-save-progress-modal .pfg-progress-icon .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: #3858e9;
    animation: pfg-spin 1s linear infinite;
}
#pfg-save-progress-modal .pfg-progress-icon .dashicons-warning {
    color: #ef4444;
    animation: none;
}
@keyframes pfg-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
#pfg-save-progress-modal h3 {
    margin: 0 0 25px 0;
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
}
#pfg-save-progress-modal .pfg-progress-bar {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 15px;
}
#pfg-save-progress-modal .pfg-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3858e9 0%, #667eea 100%);
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s ease;
}
#pfg-save-progress-modal .pfg-progress-text {
    margin: 0;
    color: #64748b;
    font-size: 14px;
}

/* Modal Styles */
.pfg-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pfg-modal-content {
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.pfg-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}
.pfg-modal-header h3 { margin: 0; font-size: 18px; color: #1e293b; }
.pfg-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #64748b;
    cursor: pointer;
    line-height: 1;
}
.pfg-modal-close:hover { color: #1e293b; }
.pfg-modal-nav {
    background: #e2e8f0;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    transition: all 0.2s;
    flex-shrink: 0;
}
.pfg-modal-nav:hover { background: #3858e9; color: #fff; }
.pfg-modal-nav:disabled { opacity: 0.4; cursor: not-allowed; }
.pfg-modal-nav:disabled:hover { background: #e2e8f0; color: #475569; }
.pfg-modal-nav .dashicons { font-size: 20px; width: 20px; height: 20px; }
.pfg-modal-counter { font-size: 13px; font-weight: normal; color: #64748b; }
.pfg-modal-header h3 { margin: 0; font-size: 18px; color: #1e293b; flex-grow: 1; text-align: center; }
.pfg-modal-body {
    padding: 25px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 25px;
}
.pfg-modal-preview img {
    width: 100%;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}
.pfg-modal-fields { display: flex; flex-direction: column; gap: 15px; }
#pfg-image-modal .pfg-form-row { display: block; margin-bottom: 0; padding: 0; border: none; }
#pfg-image-modal .pfg-form-label { display: block; font-weight: 500; margin-bottom: 6px; color: #475569; font-size: 13px; padding: 0; }
.pfg-input, .pfg-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
}
.pfg-input:focus, .pfg-textarea:focus {
    border-color: #3858e9;
    outline: none;
    box-shadow: 0 0 0 3px rgba(56, 88, 233, 0.1);
}
.pfg-filter-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
    background: #f8fafc;
    border-radius: 6px;
    max-height: 150px;
    overflow-y: auto;
}
.pfg-checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}
.pfg-checkbox-label:hover { border-color: #3858e9; }
.pfg-checkbox-label input:checked + span,
.pfg-checkbox-label:has(input:checked) {
    background: #eff6ff;
    border-color: #3858e9;
    color: #1e40af;
}
.pfg-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 25px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}
.pfg-btn { padding: 10px 20px; border-radius: 6px; font-size: 14px; font-weight: 500; cursor: pointer; border: none; transition: all 0.2s; }
.pfg-btn-primary { background: #3858e9; color: #fff; }
.pfg-btn-primary:hover { background: #2d4ad4; }
.pfg-btn-secondary { background: #e2e8f0; color: #475569; }
.pfg-btn-secondary:hover { background: #cbd5e1; }

/* Image Grid Styles */
.pfg-image-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}
.pfg-image-thumb { width: 100%; height: 150px; object-fit: cover; display: block; }
.pfg-image-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 5px;
    opacity: 0;
    transition: opacity 0.2s;
}
.pfg-image-item:hover .pfg-image-actions { opacity: 1; }
.pfg-image-action {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.95);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    color: #475569;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.pfg-image-action:hover { background: #fff; color: #3858e9; }
.pfg-image-delete:hover { color: #ef4444; }
.pfg-image-info { padding: 10px; }
.pfg-image-title { margin: 0; font-size: 13px; font-weight: 500; color: #1e293b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pfg-image-filters { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.pfg-image-filter-tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; background: #eff6ff; color: #3858e9; border-radius: 10px; font-size: 11px; }
.pfg-tag-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.pfg-tag-connector { color: #94a3b8; font-size: 10px; margin-right: -2px; }

/* Type indicator badges */
/* Type indicator badges */
.pfg-image-type-badge {
    position: absolute;
    top: 118px; /* Position inside the 150px image area, 8px from bottom */
    left: 8px;
    z-index: 5;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3858e9 0%, #667eea 100%);
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(56, 88, 233, 0.4);
}
.pfg-image-type-badge .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    color: #fff;
}
/* YouTube badge - red */
.pfg-image-type-badge.pfg-badge-youtube {
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
    box-shadow: 0 2px 6px rgba(255, 0, 0, 0.4);
}
/* Vimeo badge - cyan blue */
.pfg-image-type-badge.pfg-badge-vimeo {
    background: linear-gradient(135deg, #1ab7ea 0%, #0095d5 100%);
    box-shadow: 0 2px 6px rgba(26, 183, 234, 0.4);
}
/* Generic video badge - orange/red */
.pfg-image-type-badge.pfg-badge-video {
    background: linear-gradient(135deg, #ef4444 0%, #f97316 100%);
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
}

/* Selected state for bulk selection */
.pfg-image-item.selected {
    border-color: #3858e9;
    box-shadow: 0 0 0 3px rgba(56, 88, 233, 0.2);
}
.pfg-image-item.selected .pfg-image-checkbox {
    opacity: 1;
}
.pfg-image-checkbox {
    opacity: 0;
    transition: opacity 0.2s;
}
.pfg-image-item:hover .pfg-image-checkbox {
    opacity: 1;
}

@media (max-width: 600px) {
    .pfg-modal-body { grid-template-columns: 1fr; }
    .pfg-modal-preview { max-width: 200px; margin: 0 auto; }
}

/* Product Search Results */
.pfg-product-search-wrap {
    position: relative;
}
.pfg-product-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    max-height: 250px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}
.pfg-product-results:not(:empty) {
    display: block;
}
.pfg-product-result {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
    transition: background 0.15s;
}
.pfg-product-result:hover {
    background: #f1f5f9;
}
.pfg-product-result-img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}
.pfg-product-result-name {
    flex: 1;
    font-size: 13px;
    color: #1e293b;
}
.pfg-product-result-price {
    font-size: 12px;
    color: #64748b;
    white-space: nowrap;
}
.pfg-searching, .pfg-no-results, .pfg-error {
    padding: 15px;
    text-align: center;
    color: #64748b;
    font-size: 13px;
}
.pfg-error {
    color: #ef4444;
}

/* Extracted from meta-box-images.php */
.pfg-product-picker-item {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
}
.pfg-product-picker-item:hover {
    border-color: #3858e9;
}
.pfg-product-picker-item.selected {
    border-color: #3858e9;
    box-shadow: 0 0 0 3px rgba(56, 88, 233, 0.2);
}
.pfg-product-picker-item.selected::after {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 8px;
    background: #3858e9;
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}
.pfg-product-picker-item {
    position: relative;
}
.pfg-product-picker-item img {
    width: 100%;
    height: 100px;
    object-fit: cover;
}
.pfg-product-picker-item .title {
    padding: 8px;
    font-size: 12px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pfg-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #64748b;
}
.pfg-loading .spinner {
    float: none;
    margin: 0 5px 0 0;
}

/* Extracted from page-settings.php */
.pfg-settings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}
.pfg-card-full {
    grid-column: span 2;
}
.pfg-code-editor {
    font-family: monospace;
    font-size: 13px;
}
.pfg-info-table {
    width: 100%;
    border-collapse: collapse;
}
.pfg-info-table th,
.pfg-info-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}
.pfg-info-table th {
    font-weight: 600;
    width: 40%;
}
.pfg-text-danger {
    color: #ef4444;
}
.pfg-form-actions {
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}
@media (max-width: 1024px) {
    .pfg-settings-grid {
        grid-template-columns: 1fr;
    }
    .pfg-card-full {
        grid-column: auto;
    }
}

/* Added to resolve Security Audit Task 2 & 7: Inline Styles/JS replacement */
.pfg-bulk-filter-item:hover {
    background: #f1f5f9 !important;
}
.pfg-depth-level-1 { padding-left: 20px !important; }
.pfg-depth-level-2 { padding-left: 40px !important; }
.pfg-depth-level-3 { padding-left: 60px !important; }
.pfg-depth-level-4 { padding-left: 80px !important; }
.pfg-depth-level-5 { padding-left: 100px !important; }

/* ==========================================================================
   Pro Features Page
   ========================================================================== */

.pfg-pro-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin: 24px 0;
}
.pfg-pro-card {
    background: #fff;
    border: 1px solid var(--pfg-border);
    border-radius: var(--pfg-radius-lg);
    padding: 28px 24px;
    transition: all var(--pfg-transition);
}
.pfg-pro-card:hover {
    border-color: var(--pfg-primary);
    box-shadow: 0 4px 16px rgba(56, 88, 233, 0.1);
    transform: translateY(-2px);
}
.pfg-pro-card-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
    border-radius: var(--pfg-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}
.pfg-pro-card-icon .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
    color: var(--pfg-primary);
}
.pfg-pro-card h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--pfg-text);
    margin: 0 0 8px 0;
}
.pfg-pro-card p {
    font-size: 14px;
    color: var(--pfg-text-muted);
    line-height: 1.5;
    margin: 0;
}
.pfg-pro-cta {
    text-align: center;
    padding: 48px 24px;
    background: linear-gradient(135deg, #f8fafc, #eef2ff);
    border-radius: 16px;
    margin: 32px 0;
    border: 1px solid var(--pfg-border);
}
.pfg-pro-cta h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--pfg-text);
    margin: 0 0 8px 0;
}
.pfg-pro-cta p {
    font-size: 16px;
    color: var(--pfg-text-muted);
    margin: 0 0 24px 0;
}
.pfg-pro-cta .pfg-btn {
    font-size: 16px;
    padding: 14px 32px;
    text-decoration: none;
    display: inline-block;
}
.pfg-pro-star-icon {
    color: #f59e0b;
}
/* Pro Exact Banner */
.pfg-pro-exact-banner {
    margin-top: 30px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: #f3f3f4;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.pfg-pro-exact-banner.pfg-bg-white {
    background: #ffffff;
}

.pfg-pro-exact-banner .pfg-pro-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.pfg-pro-exact-banner .pfg-pro-header-content {
    flex: 1;
}

.pfg-pro-exact-banner .pfg-pro-badge {
    display: inline-flex;
    align-items: center;
    background: #cea700;
    color: #fff;
    padding: 4px 12px;
    border-radius: 8px;
    font-weight: 900;
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 12px;
    box-shadow: 0 0 15px rgba(241, 196, 15, 0.3);
}

.pfg-pro-exact-banner .pfg-pro-title {
    margin: 0 0 8px 0;
    font-size: 22px;
    font-weight: 700;
    color: #1a1c1d;
    letter-spacing: -0.02em;
}

.pfg-pro-exact-banner .pfg-pro-desc {
    margin: 0;
    font-size: 14px;
    color: #414750;
}

.pfg-pro-exact-banner .pfg-pro-features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    width: 100%;
}

.pfg-pro-exact-banner .pfg-pro-feature {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 12px 32px rgba(26,28,29,0.06);
}

.pfg-pro-exact-banner .pfg-pro-feature-img-box {
    height: 128px;
    margin-bottom: 16px;
    background: #eeeeef;
    border-radius: 8px;
    box-sizing: border-box;
}

.pfg-pro-exact-banner .pfg-pro-feature-img-box.pfg-feature-grids {
    overflow: hidden;
    display: flex;
    gap: 4px;
    padding: 4px;
}

.pfg-pro-exact-banner .pfg-pro-feature-img-left {
    width: 50%;
    height: 100%;
    background: #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
}

.pfg-pro-exact-banner .pfg-pro-feature-img-left img,
.pfg-pro-exact-banner .pfg-pro-feature-img-right-top img,
.pfg-pro-exact-banner .pfg-pro-feature-img-right-bottom img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pfg-pro-exact-banner .pfg-pro-feature-img-right {
    width: 50%;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pfg-pro-exact-banner .pfg-pro-feature-img-right-top,
.pfg-pro-exact-banner .pfg-pro-feature-img-right-bottom {
    height: 50%;
    background: #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
}

.pfg-pro-exact-banner .pfg-pro-feature-img-box.pfg-feature-pagination {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.pfg-pro-exact-banner .pfg-pro-progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e2e3;
    border-radius: 999px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.pfg-pro-exact-banner .pfg-pro-progress-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 20%;
    background: #005891;
}

.pfg-pro-exact-banner .pfg-pro-pagination-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.pfg-pro-exact-banner .pfg-pro-load-more {
    background: #ffffff;
    border: 1px solid #c1c7d2;
    color: #414750;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: default;
    pointer-events: none;
}

.pfg-pro-exact-banner .pfg-pro-load-more .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

.pfg-pro-exact-banner .pfg-pro-page-text {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #717881;
    font-weight: 600;
}

.pfg-pro-exact-banner .pfg-feature-filters {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px;
}

.pfg-pro-exact-banner .pfg-pro-filter-pill {
    background: #d0e4ff;
    color: #00497a;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pfg-pro-exact-banner .pfg-feature-filters .dashicons {
    color: #717881;
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.pfg-pro-exact-banner .pfg-feature-more {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    padding: 16px;
}

.pfg-pro-exact-banner .pfg-pro-more-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pfg-pro-exact-banner .pfg-pro-more-item .dashicons {
    color: #2271b1;
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.pfg-pro-exact-banner .pfg-pro-more-item span:not(.dashicons) {
    font-size: 12px;
    font-weight: 600;
    color: #1a1c1d;
}

.pfg-pro-exact-banner h3 {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 700;
    color: #1a1c1d;
}

.pfg-pro-exact-banner p {
    margin: 0;
    font-size: 12px;
    color: #414750;
    line-height: 1.5;
}

/* Button overrides to handle anchor tag hover states */
a.pfg-btn-primary,
button.pfg-btn-primary {
    color: #ffffff;
    text-decoration: none !important;
}

a.pfg-btn-primary:focus,
a.pfg-btn-primary:hover,
button.pfg-btn-primary:focus,
button.pfg-btn-primary:hover {
    color: #ffffff !important;
    text-decoration: none !important;
}

