/* XpressJobs Filter Plugin Styles */

.xj-filter-wrapper {
    display: flex;
    min-height: 100vh;
    background: #f5f7fa;
    margin: 0 -15px; /* Compensate for WordPress container padding */
}

/* Sidebar Styles */
.xj-sidebar {
    width: 300px;
    background: white;
    box-shadow: 2px 0 8px rgba(0,0,0,0.1);
    padding: 20px;
    overflow-y: auto;
    position: sticky;
    height: 100vh;
    top: 0;
    flex-shrink: 0;
}

.xj-sidebar-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e9ecef;
}

.xj-sidebar-header h2 {
    color: #2c3e50;
    font-size: 20px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 0;
}

.xj-sidebar-header p {
    color: #7f8c8d;
    font-size: 13px;
    margin: 0;
}

.xj-selected-badge {
    display: inline-block;
    padding: 2px 10px;
    background: #001e3b;
    color: white;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.xj-filter-list {
    margin-bottom: 20px;
}

.xj-filter-item {
    display: flex;
    align-items: flex-start;
    padding: 12px;
    margin-bottom: 8px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.xj-filter-item:hover {
    background: #e9ecef;
    border-color: #dee2e6;
}

.xj-filter-item.active {
    background: #e3f2fd;
    border-color: #001e3b;
}

.xj-filter-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: #001e3b;
    flex-shrink: 0;
}

.xj-filter-label {
    flex: 1;
    color: #2c3e50;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    line-height: 1.4;
}

.xj-filter-item.active .xj-filter-label {
    color: #001e3b;
}

.xj-sidebar-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #e9ecef;
}

.xj-btn {
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.xj-btn-primary {
    background: #001e3b;
    color: white;
}

.xj-btn-primary:hover {
    background: #001e3b;
}

.xj-btn-secondary {
    background: #e9ecef;
    color: #495057;
}

.xj-btn-secondary:hover {
    background: #dee2e6;
}

/* Main Content Area */
.xj-main-content {
    flex: 1;
    padding: 20px;
}

.xj-content-header {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.xj-content-header h1 {
    color: #2c3e50;
    font-size: 28px;
    margin-bottom: 8px;
    margin-top: 0;
}

.xj-content-header p {
    color: #7f8c8d;
    font-size: 14px;
    margin: 0;
}

/* Widget Container */
#xj-it {
    text-align: left;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    min-height: 400px;
}

#xj-it * {
    text-align: left !important;
}

.xj-loading-state {
    text-align: center;
    padding: 60px 20px;
    color: #7f8c8d;
    font-size: 16px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .xj-filter-wrapper {
        flex-direction: column;
    }

    .xj-sidebar {
        width: 100%;
        position: relative;
        height: auto;
    }

    .xj-main-content {
        padding: 15px;
    }
}

/* Admin Editor Support */
.block-editor-writing-flow .xj-filter-wrapper {
    pointer-events: none;
    opacity: 0.6;
}

.block-editor-writing-flow .xj-filter-wrapper::after {
    content: "Preview in frontend";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 14px;
    pointer-events: none;
}